Skip to content

About

Physics Engine in C/C++

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

19 Commits

Folders and files

Repository files navigation

BulletPhysics Logo

Small but complete C++ physics engine. It works as a standalone physics library that can be plugged into any project that needs simulation, this way it serves as a submodule of the game engine BulletEngine.

Until now it grew on its own, in a vacuum, though always with the game engine in mind. From here it grows alongside it, driven by what the engine turns out to need.

Demo Simulation

Features

  • Bodies carry mass and inertia tensor, come as dynamic, kinematic or static, take forces and torques
  • 6DOF carried through the whole solver, so every body moves and turns as freely as it is allowed to
  • Constraints freeze position or rotation along chosen axes
  • Colliders of box, sphere, cylinder and infinite ground, each holds a material, a layer and a mask
  • Materials define friction and restitution
  • Islands group bodies that touch and put them to sleep together
  • Timer runs the simulation on a fixed step
  • Queries cast rays and swept spheres through the world
  • Continuous detection sweeps the path a fast body travels between steps
  • Triggers report overlap without resolving it

Dependencies

Requires C++20 and has no external dependencies.

Structure

src/
├── collision/    shapes, materials, queries
├── dynamics/     world, bodies, solver
└── math/         vectors, matrices, quaternions

Someday

Infrastructure for plugging in modules, and the modules themselves:

  • Joints
  • Ragdolls
  • Vehicles
  • Destruction
  • Ballistics

About

Physics Engine in C/C++

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages