internal void Update(Rigidbody rigidbody) { // No need to read Position or Rotation. They're write-only from the patch to the component. Velocity.FromUnityVector3(_sceneRoot.InverseTransformDirection(rigidbody.velocity)); AngularVelocity.FromUnityVector3(_sceneRoot.InverseTransformDirection(rigidbody.angularVelocity)); Mass = rigidbody.mass; DetectCollisions = rigidbody.detectCollisions; CollisionDetectionMode = (MRECollisionDetectionMode)Enum.Parse(typeof(MRECollisionDetectionMode), rigidbody.collisionDetectionMode.ToString()); UseGravity = rigidbody.useGravity; IsKinematic = rigidbody.isKinematic; ConstraintFlags = (MRERigidBodyConstraints)Enum.Parse(typeof(MRERigidBodyConstraints), rigidbody.constraints.ToString()); }