Jump to content

Whenever I move the camera, the positioning for placing elements is thrown off


ForgeableSum
 Share

Recommended Posts

Just like the title says... 

 

Camera: 800 x 400

Bounds 3000 x 3000

view: 800 x 400

 

No idea what the difference between view and camera is but that's beside the point. 

 

If I place a sprite using the x and y coordinates of the active pointer when pressed down, like so:

 

 x = game.add.sprite(clickedPosition.x, clickedPosition.y, 'x');

 

It works fine, until I move the camera. Then the sprite will be placed somewhere in the original window the browser loaded the page in (the window before the camera moved), but not where my pointer is.

 

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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