Jump to content
  • Advertisement
Sign in to follow this  
cnboy0212

help! SAT with multiple shapes

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

I just learn how to use triangulation to turn a concave shape into triangles,but there is still a problem when i try to use SAT method. for example I have 2 dynamic object objectA and objectB if objectA and objectB are both convex and objectA touches objectB it will use the SAT method to find the smallest amount and direction to move back so it doesnt colliding with objectB and then bounce off to whatever direction it should be while objectB does nothing when they colliding. But the problem comes when objectB is a concave shape.if objectA touch objectB which objectB has been triangulate. what happen if objectA touches objectB and it touch not just 1 of objectB's triangle,maybe 2,or maybe even 3,how do i found the vector so i can move objectA so it doesnt colliding with objectB anymore? sorry for not explaining clearly,i was going to attach a picture of what i am trying to say,but i dont know how to attach it.

Share this post


Link to post
Share on other sites
Advertisement
Then it's a bit complicated. It's called contact reduction, or how to reduce the contact information in case of multiple simultaneous contacts.

In case of a concave shape decomposition, you can either

1) use all the contacts, and repeat the process until the objects are untangled.
2) use te smallest contact
3) average the contacts

and other forms. It can be quite complicated. Usually, you have a relaxation parameter, where you wiggle the objects out of each over slowly over time. It's not perfect, but the swept SAT can reduce that problem (basically, you'd be concerned only with the earliest contact).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!