• Advertisement
Sign in to follow this  

SAT help me to understand.

This topic is 4276 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 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 this post


Link to post
Share on other sites
Advertisement
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.

Share this post


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

  • Advertisement