Bullet collision failing with fast moving bodies
Posted: Thu Dec 23, 2021 8:55 pm
Hello, I am creating a 3D space shooter game using OpenGL and Bullet physics. I have a problem with fast moving projectiles. I am simulating a laser particle using a capsule shape. The problem is that this body penetrates objects some times and even pass through them, possibly because it is moving too fast for the physics engine. What can I do about that? Here is how I create the world :
Code: Select all
mpBroadphase = new btDbvtBroadphase();
// Set up the collision configuration and dispatcher
mpCollisionConfiguration = new btDefaultCollisionConfiguration();
mpDispatcher = new btCollisionDispatcher(mpCollisionConfiguration);
// The actual physics solver
mpSolver = new btSequentialImpulseConstraintSolver;
// The world.
mpDynamicsWorld = new btDiscreteDynamicsWorld(mpDispatcher, mpBroadphase, mpSolver, mpCollisionConfiguration);