Jump to content
  • Advertisement
Sign in to follow this  
EvilNando

How do I achieve a resting state for my objects

This topic is 2562 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

currently my objects bounce to each other a minimal amount and they never rest, specially when they are on top of each other


how do I fix this?

Share this post


Link to post
Share on other sites
Advertisement

currently my objects bounce to each other a minimal amount and they never rest, specially when they are on top of each other


how do I fix this?

Use a threshold for the speed of an object. When an object does not gain more speed than the threshold over a few seconds freeze it (no simulation any longer). When frozen you need some conditions to wake it up again. The obvious one is once an other object collides with it, but you need to save the last contacts too. Once an other object, which is registered as contact, moves, you need to wake up all objects which were in concat with this object and are still frozen. Think about a tower build up of objects, when you remove the bottom one, the upper one will fall down, in this case the bottom one was in contact with the next upper one etc.

Share this post


Link to post
Share on other sites
Well, if you properly simulate dumping and you don't explicitly move things out of collision, you don't need to "freeze" your objects. I think freezing is more an optimization thing than a physics stabilizing thing (or should be).

Share this post


Link to post
Share on other sites
If you modify the position of the objects to force them not to overlap each other.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!