Jump to content

p2 body sleep


GameDemon
 Share

Recommended Posts

How do you tell if a P2 body is sleeping? I cant see any property for that on Body, only `allowSleep` and `sleepSpeedLimit` (both of those undocumented btw).

I just have some simple circle bodies with gravity atm, I wanted to colorise the sleeping bodies for debug purposes.

I tried turning p2 sleepmode on by declaring `game.physics.p2.sleepMode = 2;` 
I'm not sure how to set this properly, I saw World.BODY_SLEEPING=2 in the Phaser source, with standalone p2 its set via `p2.World.BODY_SLEEPING;

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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