OwaisSiddiqui / sat-2d-collision-detection

A 2D SAT collision detection simulation between a circle and rectangle with collision response

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Separating Axis Theorem (SAT) 2D collision detection simulation (with collision reponse)

This is a 2D Separating Axis Theorem (SAT) circle with rectangle collision detection simulation with collision response using minimum translation vector method.

alt text

Installation

First git clone the repository: git clone https://github.com/OwaisSiddiqui/SAT-2D-Collision-Detection-Simulation Then, execute the following commands to run the simulation:

cd SAT-2D-Collision-Detection-Simulation
python3 -m pip install -r requirements.txt
python3 main.py 

Usage

Use your mouse to move the circle around the space and push the rectangle. Each time the circle detects being in contact with the rectangle, it turns red. The rectangle, in response, will move accordingly.

About

A 2D SAT collision detection simulation between a circle and rectangle with collision response


Languages

Language:Python 100.0%