Sign in to follow this  

Object stacking again - Should this algorithem work?

This topic is 4037 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

Hello together, I am trying to get my physics engine to be able to be able to handle object stacking. I had and Idea about an algorithem, and I found similar Ideas in this forum what I am trying to do now is the following: ----------------------------------------------------------------- - Detect all object-object collisions and make a time sorted list of them. In this list, for every object only the first collision is inserted. while the collision-list is not empty do: - Take the first pair of objects from the list and do collision response. Do the following for both objects: - Test the object against all other objects in the world. Take the earliest collision. - Travel through the collision list. - If you find a earlier collision with the object, do not insert anything. - Otherwise, insert it at the correct position (so that the list remains time-sorted). return to beginning of loop ------------------------------------------------------------------- I think in theory this should work. But for more than 4 objects, the algorithem does not converge (meaning, the collision list never gets empty). Has it been done does way before? Is this just a bad Idea? Advice and Tips are welcome :) Thanks! Nathan

Share this post


Link to post
Share on other sites

This topic is 4037 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this