Collision contact processing

Started by
4 comments, last by MGB 18 years, 9 months ago
Hi all, Moving slowly on with my physics :o Related to my other question about multiple contacts in coldet... Wondering about the case where e.g. something collides with a wing on an aircraft. The problem being that this will result in two collisions: one with the top poly and one with the bottom, both normals being almost opposite one another. How could the collision response handle this?! Calc the average normal from all contact surfaces? Or maybe 'collide' with the edge between them?!
Advertisement
If your objects move fast enough that they travel a significant fraction of the size of the smallest object, you need to do swept collision tests. This might be a matter of subdividing your collision detection, so you do overlap tests between the pair of old positions, then the pair of positions 10% between the old and new positions, etc. In this way your first collision you find would be with the leading edge of the wing, and the normal would be in the correct direction.

A cheaper, hackier solution might be that when you detect that your normals are really inconsistent with either each other, or the relative motion of the two colliding bodies, you assume that the two objects are intersecting so much you can use some guessed collision normal.
yeah, as a simple check, make sure the velocity is going towards the collision normal. If not, it's probably a back poly.

*BUT*, that can introduce bugs. Better, calculate the velocity at the contact point instead of just the velocity of the body.

Everything is better with Metal.

MrRowl: that would presumably mean I need edge info from the coldet lib, not just poly collisions?!

Oli: Time to add angular stuff to my engine!

Hmm - definitely looks like I need a better collision detection library!
Quote:Original post by Aph3x
MrRowl: that would presumably mean I need edge info from the coldet lib, not just poly collisions?!


No - when I said "leading edge" what I meant was "all the polygons that make up the leading part of the wing" - i.e. I didn't mean edge in the 'technical' sense!

You should still be able to approximate swept collisions by subdividing - try that before giving up on your existing collision detection library, since it should be a fairly simple thing to do.
Ah I see :) Well, my coldet lib only returns one collision poly per model, so I can't efficiently get all collisions.
Time to try OPCODE I think.

Thanks for the help Rowl/Olii

This topic is closed to new replies.

Advertisement