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:
erwin.coumans
2012-09-03 04:38:08 +00:00
parent c1138535f9
commit 196aa20329
25 changed files with 26 additions and 4888 deletions

View File

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