SAT help me to understand.

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

Recommended Posts

I made a post before about collision and I was reffered to the seperating axis theorem. I think I understand the basic idea, but I have tons of questions. To help me understand I made some pictures. I was trying to figure out how SAT would work with a pentagon moving colliding with a rectangle. boundary point 0 to 1 boundary point 1 to 2 boundary point 2 to 3 boundary point 3 to 4 boundary point 4 back to 0 From what I've read you use the vector of the boundary. So I started with points 0 and 1 and made a perpendicular line, shown by the red line, by using the vector of 0 and 1 . I "projected" (I think that's the right word) the other points onto this line. The green line shows the range of the points for the objects and as you can see they don't cross in the first image. So it breaks and knows it doesn't have to check any further. However I included the pictures to show that if I did the checks it would conclude that my objects didn't collide. Okay so am I doing this all wrong or am I on the right track? I also need some links to some good and easy to understand tutorials about how this works. I've been using one I found for flash (I'm using C++) and it doesn't explain things well. I'll post more once I know I'm on the right direction. I have tons of questions still. (I did however write up a vector 2d class.) Thx for your help, I have tons of programming experience, but my math skills are a little weak.

Share on other sites
What you say in your post is correct so far. Don't forget that you can break even earlier by checking the distance between the centers of bounding spheres, or using a space partitioning scheme.

As for tutorials, I liked this one a lot.

• What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 17
• 14
• 10
• 9
• 11
• Forum Statistics

• Total Topics
634094
• Total Posts
3015498
×

Important Information

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!