Skip to content

Visualisation of methods for 2D collisions. Includes Collision Detection - AABB, Separating Axis Theorem - and Physics-based rebounds.

Notifications You must be signed in to change notification settings

HydraulicSheep/iceCollider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ICE Collider

Website GitHub last commit

Visualisation of various 2D collision algorithms for convex polygons.

Try it out on my my website!

Preview Image


Collision Algorithms:

  • Axis Aligned Bounding Box (AABB)
    • Each shape gets a rectangular bounding box against a common set of axes. If the bounding boxes overlap, there is a collision.
  • Separating Axis Theorem
    • An axis is made for each side of each shape. All the vertices are projected onto this axis and they are tested for overlap between the two shapes. If overlap occurs on every axis, a collision is occuring.

Rebound/Physics Algorithms:

  • Non-momentum Rebound
    • Velocity is changed based on relative velocity parallel to the collision direction.
  • 'Bad' Rebound
    • Absolute velocity parallel to the collision direction is reversed

About

Visualisation of methods for 2D collisions. Includes Collision Detection - AABB, Separating Axis Theorem - and Physics-based rebounds.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published