diff --git a/panda/src/bullet/bulletWorld.cxx b/panda/src/bullet/bulletWorld.cxx index 5590f6aee6..b14a4c7e18 100644 --- a/panda/src/bullet/bulletWorld.cxx +++ b/panda/src/bullet/bulletWorld.cxx @@ -125,7 +125,7 @@ BulletWorld() { // Some prefered settings _world->getDispatchInfo().m_enableSPU = true; // default: true _world->getDispatchInfo().m_useContinuous = true; // default: true - _world->getSolverInfo().m_splitImpulse = false; // default: false + _world->getSolverInfo().m_splitImpulse = bullet_split_impulse; _world->getSolverInfo().m_numIterations = bullet_solver_iterations; } diff --git a/panda/src/bullet/config_bullet.cxx b/panda/src/bullet/config_bullet.cxx index e4627c931e..caee5fb2c6 100644 --- a/panda/src/bullet/config_bullet.cxx +++ b/panda/src/bullet/config_bullet.cxx @@ -100,6 +100,11 @@ PRC_DESC("Specifies if events should be send when new contacts are " "contact events might create more load on the event queue " "then you might want! Default value is FALSE.")); +ConfigVariableBool bullet_split_impulse +("bullet-split-impulse", false, +PRC_DESC("Penetrating recovery won't add momentum. " + "btContactSolverInfo::m_splitImpulse. Default value is false.")); + ConfigVariableInt bullet_solver_iterations ("bullet-solver-iterations", 10, PRC_DESC("Specifies the number of iterations for the Bullet contact " diff --git a/panda/src/bullet/config_bullet.h b/panda/src/bullet/config_bullet.h index 7b8a52e122..8ba8b6b7a8 100644 --- a/panda/src/bullet/config_bullet.h +++ b/panda/src/bullet/config_bullet.h @@ -33,6 +33,7 @@ extern ConfigVariableEnum bullet_broadphase_al extern ConfigVariableEnum bullet_filter_algorithm; extern ConfigVariableDouble bullet_sap_extents; extern ConfigVariableBool bullet_enable_contact_events; +extern ConfigVariableBool bullet_split_impulse; extern ConfigVariableInt bullet_solver_iterations; extern ConfigVariableBool bullet_additional_damping; extern ConfigVariableDouble bullet_additional_damping_linear_factor;