# Managed to find contact point(s) with SAT(2D), is there a better way than mine?

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

## Recommended Posts

I've been struggling to make this work and it seems it does now. So i'm calculating a mt vector using sat. Based on this i'm finding a separating plane like this: 1 -> Find the point(s) on object 1 that cause MAXIMUM projection values onto the minimum translation vector. 2 -> Select one of these points and calculate plane information (normal, distance), and test to see if the objects are separated by this plane 3 -> If they are NOT separated go to 4, if they are go to 5 4 -> Find the point(s) on object 1 that cause MINIMUM projection values onto the minimum translation vector, go to 5 5 -> Find the point(s) of object2 that lie onto the plane 6 -> If either the support features determined has 1 point return that as the contact point else go to 7 7 -> NewMTVector = Vector3(MTDVector.y, -MTDVector.x) (this will yield an edge direction). Calculate a plane with this normal and located in the origin. For all the 4 points (one edge from the first object and one from the second object), calculate the distance to the plane and sort them based on this distance, choose the second and third point as the line of collision. So what do you think? Is there a faster way to find the contact information? The complexity of the algorithm is O(N+M), where N = number of vertices of first polygon and M = number of vertices of second polygon. [Edited by - Deliverance on December 26, 2009 6:41:39 PM]

##### Share on other sites
I'm a bit confused about what you're asking here (possibly others are too given the lack of response): do you already have the minimum-translation-vector and you're trying to determine contact points, or you're trying to find MT and contacts using the process you're describing?

##### Share on other sites
Quote:
 Original post by raiganI'm a bit confused about what you're asking here (possibly others are too given the lack of response): do you already have the minimum-translation-vector and you're trying to determine contact points, or you're trying to find MT and contacts using the process you're describing?

I found the contact points and all that i need using the steps described above. My question is: can i find the contact points differently possibly using a another approach that could be better than the one i already use?

1. 1
2. 2
Rutin
25
3. 3
4. 4
5. 5

• 9
• 13
• 19
• 14
• 9
• ### Forum Statistics

• Total Topics
632940
• Total Posts
3009328
• ### Who's Online (See full list)

There are no registered users currently online

×