box2d
Box2d is the primary physics engine for 2d games (even though this is the result of a historical accident). In this lecture we discuss its features and show how to use it effectively.
Box2d is a very simple physics engine to use. However, you need to know how all the pieces fit together. In particular, if you are relying on the Obstacle
classes from the labs, these classes hide important details. The purpose of an obstacle object is to combine a Body
and Fixture
objects into one simple class.
- Forces and Impulses (Optional)
- Using Fixtures (Optional)
- Collision Handlers (Optional)
March 16, 2022 | slides | demos |