예제 #1
0
 //This is valid for Dynamic rigidbodies (called once at initialization)
 //and Kinematic rigidbodies, called every simulation tick (if body not sleeping) to let the physics engine know where the kinematic body is.
 private static void RigidBodyGetWorldTransform(PhysicsElement element, out Matrix physicsTransform)
 {
     if (element.BoneIndex == -1)
     {
         element.DerivePhysicsTransformation(out physicsTransform);
     }
     else
     {
         element.DeriveBonePhysicsTransformation(out physicsTransform);
     }
 }
예제 #2
0
 //This is valid for Dynamic rigidbodies (called once at initialization)
 //and Kinematic rigidbodies (called every simulation tick (if body not sleeping) to let the physics engine know where the kinematic body is)
 static void RigidBodyGetWorldTransform(PhysicsElement element, out Matrix physicsTransform)
 {
     physicsTransform = element.DerivePhysicsTransformation();
 }