Skip to content

jtacakiewicz/collision_simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic collision simulation

Some basic collision detection only for circles and convex polygons and resolution that includes:

  • calculating restitution reaction
  • calculating friction forces
  • rotational reaction
    Aka the basics of rigidbody collision simulation

Stress test:

demo

Used techniques:

  • narrow/broadphase division
  • SAT to detect polygon overlap
  • point to line distance to calculate circle-polygon collision
  • explicit euler integration
  • collision resolution using restition and friction
  • dormant objects (non moving objects) are skipped for better performance

Editor usage:

editor

note that yellow color means, that the object is sleeping and won't be considered during collision detection

rendering is done using SFML, GUI is done using imgui

About

a simple rigidbody(maybe not only) collision resolution and response simulation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published