///this can be useful to synchronize a single rigid body . graphics object public void SynchronizeSingleMotionState(RigidBody body) { Debug.Assert(body != null); if (body.GetMotionState() != null && !body.IsStaticOrKinematicObject()) { //we need to call the update at least once, even for sleeping objects //otherwise the 'graphics' transform never updates properly ///@todo: add 'dirty' flag //if (body.getActivationState() != ISLAND_SLEEPING) { Matrix interpolatedTransform = Matrix.Identity; TransformUtil.IntegrateTransform(body.GetInterpolationWorldTransform(), body.SetInterpolationLinearVelocity(), body.GetInterpolationAngularVelocity(), m_localTime * body.GetHitFraction(), ref interpolatedTransform); body.GetMotionState().SetWorldTransform(ref interpolatedTransform); } } }