Archived

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

Ace17

Computing contact forces

Recommended Posts

When I started to implement my physics engine I was thinking that I could manage "resting on the ground" with collision response. But I''ve found two problems : - The impulse to apply to prevent bodies from inter-penetrating never reaches 0, so the car seems to jump very fast and very low. - The impulse reaches 0, and the car finally penetrates in the land. Then, I''ve been told that resting contact shouldn''t be implemented with impulses, but contact forces. How should I compute them?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Modeling a contact situation with collision response is very critical. You will almost always get stability problems. I would model it with static/dynamic contact friction forces: if an object is determined to be ''in rest'', then static contact friction apply. Eg. you need a minimal force to get it moved again. Once this force is reached, the object starts moving, and static friction becomes dynamic contact friction. At the moment the contact situation ends (the object flies or whatever), then the static/dynamic contact friction becomes zero, and normal friction (eg. air resistance) applies. I found this working rather well.

- AH

Share this post


Link to post
Share on other sites
Thank you for your reply. I finally decided to represent "object resting" using collisions (impulses). Because the force to apply is too hard to compute (imagine a stack of several objects lying on the floor). It''s better, I think, to prevent interpenetration by directly changing the momentum.
If you have a better and easier trick let me know!

Share this post


Link to post
Share on other sites