Jump to content

Move to pointer issue


przemoo83
 Share

Recommended Posts

Hi

I'm using this simple function

game.physics.arcade.moveToPointer(object, 100);

to move an object around the screen. The issue is that the object is a long rectangle (800px width 20px height). When it moves to the pointer it always centers at the position x:0, y:0, however I want to center the ponter in the middle of my object which is x: object.width/2 and y: object.height/2. How can I achieve this?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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