Jump to content

Move in the direction of mouse click


Pietari
 Share

Recommended Posts

Here's one resource to start with: http://phaser.io/examples/v2/input/follow-mouse

This example stops when you release your mouse click though.  

You'll need to track:

  • Where the object is moving to
  • Whether or not the object is currently moving
  • If the spacebar is pushed change the bool on the object to false to stop it's movement

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...