Sign in to follow this  
Panicbox

A little advice on Collision and Contact

Recommended Posts

Hi.

I've been trying my hand at getting some form of a physics engine to work, and therefor I've been reading a lot of papers and stuff on the topic. One in particular that really interest's me is Guendelman's Non-convex stacking paper: [url="http://www.cs.ubc.ca/~rbridson/docs/rigid_bodies.pdf"]linked here.[/url]

However I'm slightly confused, I think, about the differences between collision and contact.

As far as I understand it, both are similar: a collision is found and an impulse applied to resolve it. The main difference between the two is that the coefficient of restitution for collision is high, whereas it is zero for contact.

Guendelman's method is roughly as follows:

Check/Resolve Collision
Integrate velocity
Check/Resolve Contact
Integrate Position

Guendelman states that: "The key to the algorithm is that contact modeling occurs directly after the velocity is updated with gravity. If instead either the collision step or a position update were to follow the velocity update, objects at rest will either incorrectly elastically bounce or move through the floor, respectively."

This is the part that I don't understand. I don't see how the order prevents these issues.

So, TL:DR:
- What are the differences between collision and contact and...
- Why does integrating the velocity before the contact stage help avoid erroneous bouncing/jittering?

All help is much appreciated, thanks in advance.

Share this post


Link to post
Share on other sites
The Guendelman paper is good, but now out of date.

Google for Box2d, and Erin Catto's presentations on sequential impulses. They're the new, cool way to do things, and do not distinguish between collision and resting contact :)

Cheers, Paul.

Share this post


Link to post
Share on other sites
Thanks wildbunny.

As it happens, since my last post I've read your tutorials on Speculative contacts and Collision detection and they've both been really helpful.

I have no working demo yet, but I'll look up Catto's presentations like you suggested.

Thanks for your advice.

Share this post


Link to post
Share on other sites

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