Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- The Separating Axis Theorem (SAT) can be used to check for collisions between two polygons or
- between a circle and a polygon. The polygons have to be convex, which, roughly speaking, means that
- any line drawn through the shape crosses it twice, and no more.
- To help visualizing it in your head: if there is a separating axis, you can draw a line (perpendicular to that
- separating axis) which does not touch the objects -> no collision.
- In the animation there is a small coordinate system. A smaller range was needed because otherwise
- normalized vectors wouldn't be drawn correctly.
- The box on the right hand side keeps track of important values/calculations that are needed for the test.
Advertisement
Add Comment
Please, Sign In to add comment