RigidBody class for 2D physics simulation Supports dynamic and static bodies, forces, impulses, and collision response
Apply a force to the center of mass
Apply an impulse (instant velocity change)
Get the kinetic energy of the body
Get the momentum of the body
Integrate physics using semi-implicit Euler method
Resolve collision using impulse-based response This should be called when a collision is detected with a Response object
Set mass and recalculate inverse mass
Set position directly
Manually set sleep state
Set the body as static (immovable)
Set velocity directly
Wake up the body
RigidBody class for 2D physics simulation Supports dynamic and static bodies, forces, impulses, and collision response