Collision Detection with SAT

Description

A program showing 2D collision detection and resolution using SAT (Separating Axis Theorem). The user can cycle which shape they are controlling and test its collision with other stationary shapes in the world.

I started looking for collision detection methods to improve my racing game when I found SAT. The main resource I used to understand SAT was this web page by Andy Sevenson. Other resources I used are included at relevant points in the source code.

This project helped me to think about using 2D vector maths in collision detections. I tried to optimise the code a little by minimising the number of square roots that are calculated each loop.

Tools usedTL-EngineGitHubDateOctober 2024