Search the Community
Showing results for tags 'Mouse;'.
Found 1 result
Hello, I'm new to Phaser and i'm really getting into it. I've already made a couple of tutorials, and now i want to make my own game. In the game I'm trying to develop, when I press the screen with a touch or with the mouse, the player should move to the point I touched with a certain amount of acceleration. In the official Phaser examples i've got this piece of code: player.rotation = game.physics.arcade.moveToPointer(player, 600, game.input.activePointer, 600); With this code the player follows the mouse pointer and never stops unless the mouse is stopped, and i want to simply click or touch the screen and put the player moving to the point i've touched or clicked and stop there until i click or touch again in the screen. Can someone help me? Regards, António