Beispiel #1
0
        ///User can override this material combiner by implementing gContactAddedCallback and setting body0->m_collisionFlags |= btCollisionObject::customMaterialCallback;
        private float CalculateCombinedFriction(CollisionObject body0,CollisionObject body1)
        {
	        float friction = body0.GetFriction() * body1.GetFriction();

	        const float MAX_FRICTION  = 10f;
	        if (friction < -MAX_FRICTION)
		        friction = -MAX_FRICTION;
	        if (friction > MAX_FRICTION)
		        friction = MAX_FRICTION;
	        return friction;

        }