• Advertisement

Archived

This topic is now archived and is closed to further replies.

obb vs obb collision: finding collision point and normal

This topic is 5095 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, how might one find the (average) contact point and normal between two colliding (penetrating) obb''s? i understand the separating axis algorithm can be used to determine intersection. i was wondering if the resulting interval overlaps could possibly be used to find an approximate (satisfactory) collision plane? would one need to use GJK to find the closest features of each obb in order to find the collision point and normal? i''m not looking for perfect results, just beleivable. thanks, dave.

Share this post


Link to post
Share on other sites
Advertisement
i''m talking about orientated bounding boxes d000hg. oliii seems to have answered my question in a previous post:

http://www.gamedev.net/community/forums/topic.asp?topic_id=205579

Share this post


Link to post
Share on other sites
quote:
Original post by Fusi0n
i''m talking about orientated bounding boxes d000hg. oliii seems to have answered my question in a previous post:

http://www.gamedev.net/community/forums/topic.asp?topic_id=205579


funny you asked that. I''ve got a wee demo working. get it here

or from the main page. It''s in 2D. What I do, not very efficiently, is get the support point on the boxes, then from it, checks if a connected edge is parallel to the collision plane. if so, return an edge as a ''supporting'' edge.

then, in the contact resolution, I ''clip'' edge vs edge, and point vs point.

for 3D, it''s a lot more complicated. I''d say, you need to get the surface / point / edge along the normal of collision. if it''s vertex vs edge, do a edge / vertex distance calculation. if it''s an edge / face, clip the edge with the polygon (project to 2D, for simplifcation), if it''s face / face, clip faces against each other, to get the intersection points.

you can see the pairs of contact points in red. because the demo runs on lots of boxes (yes, the tiny red dots );

Share this post


Link to post
Share on other sites

  • Advertisement