Hello guys, I have a test case running at the moment with well over 2000 dynamic bodies rolling around in troughs. There are times when my Dynamic bodies are not moving, and I’m wondering about havok’s approach on this. They are still being processed by the physics system and I don’t want this for obvious performance reasons. Is there a way for me to manually set these dynamic bodies to sleep? Or do I have to manually remove the PhsyicsVelocity component to achieve this. Any help would be great.
Here’s another note on this subject. I’m Guessing the sleep doesn’t work if the angular velocity continues to move? when my Dynamic bodies get close together on my troughs they continue to spin like so:
I think the Havok sleep system works when a object has not had any interaction for a few frames it will be put to sleep until it is hit again. So it will always be processed for collision detection, but not for movement update.
I wanted to use this but noticed that trigger events also stop when a physics body goes to sleep, so I have it currently disabled.
Stacked objects can all go to sleep, but as soon as one moves it will wake the others (if it applies a force to them when it moves). But I guess if your entire ‘testcase’ stops moving sleep should work.
To remove the angular velocity you could increase the Angular Damping on the physics body.