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