public override void UpdateWorldTransform()
{
#if !WINDOWS
Vector3 newPosition = new Vector3();
#else
Vector3 newPosition;
#endif
Vector3 worldAttachmentPoint;
Vector3 localAttach;
Vector3.Add(ref wheel.suspension.localAttachmentPoint, ref wheel.vehicle.Body.CollisionInformation.localPosition, out localAttach);
worldTransform = Matrix3x3.ToMatrix4X4(wheel.vehicle.Body.BufferedStates.InterpolatedStates.OrientationMatrix);
Vector3.TransformNormal(ref localAttach, ref worldTransform, out worldAttachmentPoint);
worldAttachmentPoint += wheel.vehicle.Body.BufferedStates.InterpolatedStates.Position;
Vector3 worldDirection;
Vector3.Transform(ref wheel.suspension.localDirection, ref worldTransform, out worldDirection);
float length = wheel.suspension.currentLength - graphicalRadius;
newPosition.X = worldAttachmentPoint.X + worldDirection.X * length;
newPosition.Y = worldAttachmentPoint.Y + worldDirection.Y * length;
newPosition.Z = worldAttachmentPoint.Z + worldDirection.Z * length;
Matrix spinTransform;
Vector3 localSpinAxis;
Vector3.Cross(ref wheel.localForwardDirection, ref wheel.suspension.localDirection, out localSpinAxis);
Matrix.CreateFromAxisAngle(ref localSpinAxis, spinAngle, out spinTransform);
Matrix localTurnTransform;
Matrix.Multiply(ref localGraphicTransform, ref spinTransform, out localTurnTransform);
Matrix.Multiply(ref localTurnTransform, ref steeringTransform, out localTurnTransform);
//Matrix.Multiply(ref localTurnTransform, ref spinTransform, out localTurnTransform);
Matrix.Multiply(ref localTurnTransform, ref worldTransform, out worldTransform);
worldTransform.Translation = newPosition;
}