Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Mouse dont use normal coordinate.

0 is the center of the screen game

-1 for left, 1 for right

-1 for down, 1 for up


if you want to use pixel coordinate of game screen, you can use :

camera: Sup.Camera;

awake() {
    this.camera = Sup.getActor("Camera").camera;
}

update() {
    let mouse = Sup.Input.getMousePosition().unproject(this.camera);
}