#### Archived

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

# obb vs obb collision: finding collision point and normal

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

## 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 on other sites
What''s obb? Are you talking about two colliding boxes which aren''t using the same axes?

##### Share on other sites
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 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 on other sites
need to comment it though, and write a document for it.

1. 1
Rutin
49
2. 2
3. 3
4. 4
5. 5

• 11
• 16
• 9
• 10
• 13
• ### Forum Statistics

• Total Topics
633003
• Total Posts
3009846
• ### Who's Online (See full list)

There are no registered users currently online

×