add m_splitImpulseTurnErp solver setting, initialized to 0.1: more stable recovery from deeper penetrations by reducing the angular effect (if split impulse is enabled)
Set it to 1.0 to disable the effect. removed broken/not maintained heightfield fluid demo add some API methods to btPersistentManifold
This commit is contained in:
@@ -263,7 +263,7 @@ ATTRIBUTE_ALIGNED64 (struct) btSolverBody
|
||||
}
|
||||
|
||||
|
||||
void writebackVelocityAndTransform(btScalar timeStep)
|
||||
void writebackVelocityAndTransform(btScalar timeStep, btScalar splitImpulseTurnErp)
|
||||
{
|
||||
(void) timeStep;
|
||||
if (m_originalBody)
|
||||
@@ -276,7 +276,7 @@ ATTRIBUTE_ALIGNED64 (struct) btSolverBody
|
||||
if (m_pushVelocity[0]!=0.f || m_pushVelocity[1]!=0 || m_pushVelocity[2]!=0 || m_turnVelocity[0]!=0.f || m_turnVelocity[1]!=0 || m_turnVelocity[2]!=0)
|
||||
{
|
||||
btQuaternion orn = m_worldTransform.getRotation();
|
||||
btTransformUtil::integrateTransform(m_worldTransform,m_pushVelocity,m_turnVelocity,timeStep,newTransform);
|
||||
btTransformUtil::integrateTransform(m_worldTransform,m_pushVelocity,m_turnVelocity*splitImpulseTurnErp,timeStep,newTransform);
|
||||
m_worldTransform = newTransform;
|
||||
}
|
||||
//m_worldTransform.setRotation(orn);
|
||||
|
||||
Reference in New Issue
Block a user