mirror of
https://github.com/bulletphysics/bullet3.git
synced 2026-10-31 04:55:35 +00:00
add support for damping. the fixed constraint is working again with the deltaImpulse form
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
// static btScalar E = 50;
|
||||
// static btScalar nu = 0.3;
|
||||
static btScalar damping_alpha = 0.0;
|
||||
static btScalar damping_beta = 0.0;
|
||||
static btScalar damping_beta = 0.01;
|
||||
static btScalar COLLIDING_VELOCITY = 0;
|
||||
static int start_mode = 6;
|
||||
static int num_modes = 10;
|
||||
@@ -157,11 +157,11 @@ void FreeFall::initPhysics()
|
||||
|
||||
btTransform init_transform;
|
||||
init_transform.setIdentity();
|
||||
// init_transform.setOrigin(btVector3(0, 2.5, 0));
|
||||
init_transform.setOrigin(btVector3(0, 10, 0));
|
||||
// init_transform.setRotation(btQuaternion(0, SIMD_PI / 2.0, SIMD_PI / 2.0));
|
||||
// init_transform.setRotation(btQuaternion(btVector3(0, 0, 1), SIMD_PI / 6.0));
|
||||
// init_transform.setRotation(btQuaternion(btVector3(0, 1, 0), SIMD_PI / 2.0));
|
||||
// init_transform.setRotation(btQuaternion(SIMD_PI / 2.0, 0, 0));
|
||||
// init_transform.setRotation(btQuaternion(btVector3(1, 0, 0), SIMD_PI / 6.0));
|
||||
init_transform.setRotation(btQuaternion(btVector3(1, 0, 0), SIMD_PI / 2.0));
|
||||
rsb->transform(init_transform);
|
||||
|
||||
// rsb->setTotalMass(0.5);
|
||||
@@ -275,7 +275,7 @@ void FreeFall::initPhysics()
|
||||
getDeformableDynamicsWorld()->setLineSearch(false);
|
||||
getDeformableDynamicsWorld()->setUseProjection(false);
|
||||
getDeformableDynamicsWorld()->getSolverInfo().m_deformable_erp = 0.2;
|
||||
getDeformableDynamicsWorld()->getSolverInfo().m_friction = 0;
|
||||
getDeformableDynamicsWorld()->getSolverInfo().m_friction = 0.3;
|
||||
getDeformableDynamicsWorld()->getSolverInfo().m_deformable_maxErrorReduction = btScalar(200);
|
||||
getDeformableDynamicsWorld()->getSolverInfo().m_leastSquaresResidualThreshold = 1e-3;
|
||||
getDeformableDynamicsWorld()->getSolverInfo().m_splitImpulse = false;
|
||||
|
||||
Reference in New Issue
Block a user