Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

igrok

Impulses on Rigid Bodies

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

I''ve implemented a fairly bog-standard rigid body simulator using impulses for collision response. Many scenarios are working great, including friction and stacking etc. However one case is coming up that just looks horrible. If a spinning box lands on one corner then it takes a long time to settle, if at all. If I turn off friction it has a tendancy to bounce on this one point, or bounce from point to point. Once it lands in a flat side, it tends to settle very quickly though. If friction is turned on, things get worse. It''s as though the friction and the collision response impulses are acting against each other and the box can end up spinning or bouncing on this one corner for ever. The usual tweaking of constants isn''t getting me very far so I''m hoping for some pointers or ideas of why this is happening and how it can be fixed. Thanks igrok.

Share this post


Link to post
Share on other sites
Advertisement
Unless your friction code understands point contacts with no tangential velocity, you''ll always spin forever. Like say a sphere ending with one vertex at the south pole, when dropped with initial angular velocity will stay spinning forever. The problem can be solved "implicitly" by adding more vertices to the tip, so that there is some tangential velocity.

Hope that helps.

Share this post


Link to post
Share on other sites
Are the impulses affecting the center of mass of the object or are you simulating for each corner of the box (or sphere or mesh...)?

Share this post


Link to post
Share on other sites
Thanks for the responses.

bpj1138:
I''m not entirely sure why you are saying NO tangential velocity. The friction system calculates the velocity at the contact point using both the linear and angular velocity. It calculates the tangent across the surface away from this direction and uses that to apply an impulse to represent friction. Are you suggesting I should only be taking in to account the linear velocity during this process?

void*:
The impulses are applied at the points of contact. So yes, that means the corner of the boxes in this case.

Share this post


Link to post
Share on other sites
*bump* (wrong thread. d'oh!)

[edited by - oliii on March 8, 2004 6:56:34 PM]

Share this post


Link to post
Share on other sites

Igrok,

Forget it, your problem is different than what I was talking about. What I was talking about was the case where you drop an already spinning object on the floor and it lands on one vertex and balances perfectly so that it stays spinning on that one vertex. Kinda like a perfect drop of the spinning top. The top at this point has zero linear velocity and some angular velocity, except it''s spinning exactly around the axis connecting the vertex in contact with the floor and the center of mass, so the vertex has no velocity (it is one of the eigenvectors of that rotation). Anyhow, so since the vertex has no tangential velocity, and if your friction code depends on tangent velocity, it will never slow down that system. The top will stay spinning forever.

Something to watch out for, fortunately, it doesn''t happen that often.

--Bart


Share this post


Link to post
Share on other sites

  • 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!