Jump to content

Physics body is being created at an offset related to camera


adamk33n3r
 Share

Recommended Posts

I'm having an issue where it appears that for the first frame (after the sprite is created) the physics body is offset by the camera. If you go to this sandbox I have created a test that demonstrates this. Once the game has loaded open your js console and hold the enter key for a little bit in game. Information will be printed demonstrating this bug after the third sprite has been created.

http://phaser.io/sandbox/sOSfDGjW/play

 

You can further investigate by adding a debugger statement in the first if statement in the update function. You can also move the camera left and right with the arrow keys. If you hold the right arrow key and the enter key you can see the flashing debug box move farther left.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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