(Demo) Bullet Physics Collisions


GeeXLab - Bullet3 Physics demo



Downloads

Today, a small physics prototype with Bullet3 Physics and Lua. The demo is simple: a sphere (a dynamic rigid body) is dropped on a series of obstacles (kinematic rigid bodies). That’s all. The position (XY) and orientation (around Z axis) of each obstacle can be changed.

A quick reminder. In Bullet Physics, there are 3 kinds of rigid bodies (RBs):

  • static: a static RB has no mass (mass = 0), can not move but dynamic RBs can collide with it.
  • kinematic: like the static RB, a kinematic RB has no mass (mass = 0), but can be moved by the user. Dynamic RBs can collide with kinematic RBs but they can not influence them. In this demo, the obstacles are kinematic RBs.
  • dynamic: a dynamic RB has a mass (mass > 0), and is moved by the physics engine (the solver). Every simulation step will update its transform (position and orientation). In the demo, the red sphere is a dynamic RB.

The demo requires GeexLab 0.35.3+ and is available in the OpenGL 2.1 demopack and should run on any OpenGL 2.1 capable device. On my Win10 setup (core i7-7700K + RTX 2070), the demo (res: 800×720) runs at a comfortable 2500 FPS, and on the Raspberry Pi 4, we reach 100 FPS.

GeeXLab - Bullet3 Physics demo

GeeXLab - Bullet3 Physics demo





Leave a Comment

Your email address will not be published. Required fields are marked *