Axis Separation with multiple polygons

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

Recommended Posts

Hello, We are separating all our polygons to triangles. I have implemented the axis separation collision to detect collisions between the polygons by running on all the triangles inside them. We want to use the MTD (push vectors) to separate some of the polygons with regards to game logic. The ASC (Axis Separation Collision) algorithm creates push vectors which we use to separate the polygons. The problem is that when colliding with multiple triangles inside 1 polygon (or in multiple polygons) the push vectors are sometime in opposite directions. That means a triangle collides with 2 other different triangles which causes it to be pushed again and again in opposite directions which obviously causes a problem. What can be done to prevent this? Somehow combine the vectors so that the triangle is pushed somewhere where it is not intersected with both (or more) of the target triangles? Thanks in advance, Roy

Share on other sites
Are the polygons all convex? Or can they be non-convex?

Share on other sites
Hello,

All the game polygons can be non-convex.

That's why before using the axis separation algorithm we decomposed them into triangles using ear cutting algorithm we found.
(We do this only once)

So we work by calling a polygon's method of intersection and them checking all triangles of polygon A against all triangles of polygon B.

The problem occurs when polygon A collides also with polygon C.

Thanks,

Roy

1. 1
Rutin
37
2. 2
3. 3
4. 4
5. 5

• 11
• 12
• 14
• 9
• 9
• Forum Statistics

• Total Topics
633349
• Total Posts
3011464
• Who's Online (See full list)

There are no registered users currently online

×