Public Group

# Seperating Axis Therom Help

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

## Recommended Posts

For lack of a better way of putting it my math is not great. I need to know what kind of math i need to know. To use SAT for Collision detection in games. I know its probaly going to be a lot but i would like to know where i need to start from. So that i can apply and understand SAT for collision Detection of polygons. Thanks for taking the time to reply to my question. Regards Jouei.

##### Share on other sites
For the SAT, all you need is basic vector math.

Will this be 2-d or 3-d? And what types of shapes do you plan on using? The answers to these questions will help us in offering more specific advice.

##### Share on other sites
Have you tried looking up the SAT itself on the internet? There are many technical discussions of how it works, which should be more than enough to give you an idea of the math involved.

##### Share on other sites
Ok thanks for the reply as for the specifics i will be doing collision detection of polygons and some convex and concave shapes. Eg some edges may be rounded in or out its mostly for map use to give the 2D game environment a more interactive feel and it is a solid collision detection system as far as i have seen. Ok i understood that it is vector math but here is the thing what part of math is vectors apart of Calculus, algebra or something else i dont know.

I am bad at math or more so rather quite rusty to the point that i might as well get a replacement part and there is the likely hood that i will need to relearn lots but that is ok.

Regards jouei.

##### Share on other sites
Quote:
 Original post by JoueiOk thanks for the reply as for the specifics i will be doing collision detection of polygons and some convex and concave shapes. Eg some edges may be rounded in or out its mostly for map use to give the 2D game environment a more interactive feel and it is a solid collision detection system as far as i have seen. Ok i understood that it is vector math but here is the thing what part of math is vectors apart of Calculus, algebra or something else i dont know.I am bad at math or more so rather quite rusty to the point that i might as well get a replacement part and there is the likely hood that i will need to relearn lots but that is ok.Regards jouei.
You might consider using an existing physics library, such as Box2D. Implementing a robust collision detection and response system is tricky, so just be aware that there are other options.

As for your questions, the SAT works with convex shapes, so any non-convex shapes would need to be broken into multiple convex shapes in order to work with an SAT-based collision system. The rounded corners could be a problem as well (perhaps you could use a simpler approximation of these shapes for collision detection purposes).

The term 'vector' is overloaded in the context of math and computer science, but here we're mostly concerned with vectors as they relate to geometry and basic linear algebra. You don't need to know any calculus or advanced linear algebra to implement the SAT. The main thing you'll need to understand is the dot product and how it can be used to find a measure of the projection of one vector onto another.

At this point, I would recommed finding a good reference on the subject and diving in. If the material doesn't make sense or if you get stuck on something, post back with any specific questions you have.

##### Share on other sites
Responding to the collision is left mostly as an exercise to the reader, but if you've not yet seen the Metanet Software Tutorials it's well worth a look at the first one which covers SAT with examples and a sample implementation given in ActionScript.

1. 1
2. 2
3. 3
4. 4
Rutin
18
5. 5

• 12
• 12
• 9
• 12
• 37
• ### Forum Statistics

• Total Topics
631421
• Total Posts
2999997
×