Sign in to follow this  

Collision contact processing

This topic is 4555 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

This topic is 4555 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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