Sign in to follow this  

Axis Separation with multiple polygons

This topic is 2847 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

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 this post


Link to post
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

Share this post


Link to post
Share on other sites

This topic is 2847 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