bekovski

algovi_descr

Jul 26th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. The Separating Axis Theorem (SAT) can be used to check for collisions between two polygons or
  2. between a circle and a polygon. The polygons have to be convex, which, roughly speaking, means that
  3. any line drawn through the shape crosses it twice, and no more.
  4. To help visualizing it in your head: if there is a separating axis, you can draw a line (perpendicular to that
  5. separating axis) which does not touch the objects -> no collision.
  6.  
  7. In the animation there is a small coordinate system. A smaller range was needed because otherwise
  8. normalized vectors wouldn't be drawn correctly.
  9. 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