void ComputeAngularVelocities()
        {
            Vector Axis;

            Quaternion qrot  = follow.Conjugate() * quat;
            float      angle = qrot.ToAngleAxis(out Axis);

            Vector angularDisplacement = Axis * angle;             // * Mathf.Deg2Rad;

            //Vector angularSpeed = angularDisplacement / Time.deltaTime;

            Velocities = angularDisplacement;                   // It's possible for this to accumulate extra spins, apparently - will need to be clamped -PI to +PI


            follow = follow.Slerp(quat, 0.05f);
            matFollow.From(follow);
        }
Exemple #2
0
 public Quaternion To(Quaternion b)
 {
     return(this * b.Conjugate());
 }
		public Quaternion To( Quaternion b )
		{
			return this * b.Conjugate();
		}