bullet: Add bullet-split-impulse config variable

Fixes #1201

Co-authored-by: K9Kraken <K9Kraken@users.noreply.github.com>
This commit is contained in:
rdb 2021-11-16 15:15:27 +01:00
parent b6e5217154
commit 0f7a575ac0
3 changed files with 7 additions and 1 deletions

View File

@ -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;
}

View File

@ -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 "

View File

@ -33,6 +33,7 @@ extern ConfigVariableEnum<BulletWorld::BroadphaseAlgorithm> bullet_broadphase_al
extern ConfigVariableEnum<BulletWorld::FilterAlgorithm> 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;