Box jumps of ground for no reason
Posted: Thu Sep 07, 2006 5:43 pm
Got the first testing version to run but with a strange effect. If i use a time step of 0.01 my box rests on the ground and from time to time suddenly jumps up high into the sky. Has this a connection to the used time step? I use the following setup:
The shape is a simple box of 0.05m extends. If I use a larger time step ( for example the entire elapsed time since the last update ) the jumping does no appear but the box starts bobbing on the ground sinking into it sometimes up to half the height.
Any ideas what could be wrong or where to look for the problem?
Furthermore what are the accepted values of CcdPhysicsEnvironment::setCcdMode ? It seems to have influence but I don't know what values are usefull there.
- Pl?ss Roland
Code: Select all
CcdConstructionInfo constrInfo;
constrInfo.m_friction = 0.2f;
constrInfo.m_linearDamping = 0.2f;
constrInfo.m_angularDamping = 0.1f;
constrInfo.m_MotionState = motionState;
constrInfo.m_gravity = SimdVector3( 0.0f, 0.0f, 0.0f );
constrInfo.m_localInertiaTensor = SimdVector3( 0.0f, 0.0f, 0.0f );
constrInfo.m_mass = 1.0f;
pShape->CalculateLocalInertia( 0.0f, localInertia );
constrInfo.m_localInertiaTensor = localInertia;
constrInfo.m_collisionShape = pShape;
pPhyCtrl = new CcdPhysicsController( constrInfo );
pPhyCtrl->setPosition( position.x, position.y, position.z );
pPhyCtrl->SetLinearVelocity( velocity.x, velocity.y, velocity.z, false );
pPhyCtrl->GetRigidBody()->m_ccdSquareMotionTreshold = 0.001f;
pPhyCtrl->GetRigidBody()->m_ccdSweptShereRadius = 0.001f;Any ideas what could be wrong or where to look for the problem?
Furthermore what are the accepted values of CcdPhysicsEnvironment::setCcdMode ? It seems to have influence but I don't know what values are usefull there.
- Pl?ss Roland