Jump to content

World Wrap and P2 Physics


Nambiar
 Share

Recommended Posts

First off, you should use

world.wrap(sprite)

inside of update functions. Wasn't quite obvious to me at first, so putting it out there. 

 

Second - with a p2 physics body attached to a sprite, you should call

world.wrap(sprite.body)

for it to work properly. This isn't obvious either. 

 

I searched around and found nothing before trying it out. So here it is.

 

 

Link to comment
Share on other sites

  • 1 year later...
 Share

  • Recently Browsing   0 members

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