Jump to content

P2 Physics world sleeping


Recommended Posts


I'm just working with P2 and have hit a bit of a wall. I need to check whether all the bodies in the world are at rest (i.e. no longer moving)... in Box2D (as far as I recall) there was either a world.sleeping property (or perhaps world.active) so you could check when/if this had happened.

There doesn't seem to be an obvious way of doing this in P2.

One solution would be to loop thru all the bodies checking for velocity == 0, but this seems a little cumbersome.

Have I missed an obvious way to do this?

Link to comment
Share on other sites


  • Recently Browsing   0 members

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