How do you do: Collision Detection with Angular Velocity?

Started by
0 comments, last by sflare 22 years, 7 months ago
I have found many examples on how to do determine various stationary object intesections such as boxes and triangles. I have have found some examples of determining moving object intesections with a constant velocity using time. What I have not found is how to determine when objects intersect with a angular velocity (rotating at certain speed) I was wondering if anyone knows how to (or where to look for) determine such collison detection with any type of 3D object (At the moment I require OBB and triangle detection) that travels with a given velocity and angular velocity over a given amount of time. I also would like to know all points of contact and the nearest time at which a collision would occur. I can''t (at this current period of time) figure how to solve this problem do the lack of me being a math master. Many thanks to any help, The best place I have found to help is at www.magic-software.com They have a useful velocity (lacking angular) collsion detection procedure for both boxes and triangles but i still need the rotational part.
Advertisement
To determine when and where two objects collide you need a way of testing when they are in contact/overlapping. I use V-Clip for this: it''s a lot of code to implement but worth it as it''s very efficient. Go
here for links to info on V-Clip, other systems and related resources.

Once you have this you can use backtracking and interpolation to determine the precise point and time of collision: when you detect two overlapping objects rewind to the previous calculation step and see where the objects are cloest and how close they are. Interpolate between this seperation distance and the penetration distance to find out when they hit, then work out the positions at this time to find out where.

Angular velocity comes into resolving the collision in two ways. First the angular velocity adds (or subtracts) from the collision velocity, with the velocity of the collsion point being

v + r ^ w

where v is the object velocity, r the position of the colision point relative to the object centre and w the angular velocity about this centre.

Angular velocity also needs to be considered when calculating the collision results: for each object the impulse of the collision adds to both the rotatational and linear velocity, using formulae

v = v + J/m

and

w = w + I^-1 (r ^ J)

J = impulse, I = moment of inertia tensor (inverted here), m = mass, v r & w as before.

John BlackburneProgrammer, The Pitbull Syndicate

This topic is closed to new replies.

Advertisement