Jump to content

liakos1992
 Share

Recommended Posts

I want to combine phaser arcade physics with some custom physics of my own. But it seems that objects with velocity are playing 1 tick ahead of objects whose x and y properties are changed in the update function (like "sprite.x += 10;"). What I need is to render the game AFTER the update loop. Is there any way to do this? I've been searching this for weeks and haven't found anything yet.

Link to comment
Share on other sites

Render always happens after update. However update happens before the physics step, because it's the function in which you're supposed to change object speeds, check collisions, etc, so it can't happen after it.

If you need to do something post-update, but before the render, then use the prerender function to do it.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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