So I have an immovable physics wall, which uses the rotate behavior to make it spin. When my character moves into the wall, the wall pushes it for a short time before the character physics just goes to sleep and the wall starts passing through it.
a) How do I stop the physics object going to sleep?
b) I'm pretty sure the character sprite goes to sleep because its X and Y velocity show as 0 in the debugger... even though it is being pushed by the wall. Any suggestions as to how on earth that's possible??
TMAJA take a look at this simple demo and learn from it. And if you want more then try link below
https://www.dropbox.com/s/3c698s0b3enqu ... .capx?dl=0
https://www.dropbox.com/sh/eioscti86bpr ... 7YPza?dl=0
Thanks for your input - but it doesn't bring me at all closer to stopping the character physics object going to sleep. I already have a reasonable grasp of the physics plug in, but this is eluding me. Could anyone tell me how to stop a physics object going to sleep? (Even if its velocity is 0,0)??
Physics treats immovable objects as not moving so I imagine it thinks any objects in contact with it can sleep.
One idea would be to not make the obsticle immovable. Instead attach it with a revolute joint to another immovable object. Then set the angular velocity instead of using the rotate behavior.
Develop games in your browser. Powerful, performant & highly capable.
In the current version 216 there is a condition to check if Physics for object is sleeping. I've found that applying a force if that happens with 0 values is enough to prevent from sleeping.