Page 1 of 1

Newbie collision detection/response question

Posted: Thu Apr 26, 2012 7:02 am
by ChristopherSwe
We are a group of students that are going to implement a "simple" rigid body solver with oriented boxes.
We have read numerous articles and eberly's book Game Physics.

First of all we are a bit confused by all the different methods out there so honestly i don't really know what to call the method we
are thinking about implementing :)

So we were thinking about implementing a LPC-solver to handle multiple contact points and to solve for impulses to apply on the contact points. (this part we at least know how to do)

For the collision detection system we liked the idea of prediticing contact points assuming constant linear/angular velocity (also this we think we know how to do).

BUT there is one key part of the puzzle we can't get our heads around: How to connect the detection and response system.

Say that our "physics looop" looks like the following:

DoCollisionDetection
DoCollisionResponse
Move objects with ODE

(This is basically taken from eberly's book)
We start the loop with a state at time t. In the detection system we check all pairs in the timeframe t+dt. If there is a collision we save the pair and the time of collision. After it is done the detection system reports the largest time T[t,t+dt] for which no collision occurs and we choose T as the time step for the ode solver instead of dt.

But when do we create a contact to hand to the response system and generate impulse? Doing as above will only make dt smaller and smaller? And what to do with the time? For example say that we found a collision between two objects at time t+T, if we then move all objects to that time, we are at the time just before a collision is about to happen. We had an idea about sending a "contact" (for the pair that we found in the detection system) to the response system. Calculate impulse/impulses and THEN step the remaining time step dt-T.

Also we found it strange because it feels like we can never (almost) get more than 1 contact since we only step T i.e just before some pair collides. Yes numerical errors could be in the mix and see to it that there are several pairs colliding but in (my)theory the probability that two pair collide at exactly the same time t+T is slim.

Yes we are confused :) So any explanations/thoughts or guidance would be sooo appreciated :)

//Christopher

Re: Newbie collision detection/response question

Posted: Mon Jun 25, 2012 10:07 am
by mikeshafer
Just wondering, did you figure it out, or did you still need help with it?