Jump to content

Physics body is being created at an offset related to camera


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.



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


  • Recently Browsing   0 members

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