Exemplo n.º 1
0
            /*
             * Rotates the bone relative to it's 3 plane nodes
             * */
            public void RotateToPlane(float weight)
            {
                Quaternion r = QuaTools.ConvertAxis(targetRotation, defaultLocalTargetRotation);

                if (weight >= 1f)
                {
                    transform.rotation = r;
                    return;
                }

                transform.rotation = Quaternion.Lerp(transform.rotation, r, weight);
            }
Exemplo n.º 2
0
 /*
  * Calculates the rotation of this bone to targetPosition.
  * */
 public Quaternion GetRotation(Vector3 direction, Vector3 bendNormal)
 {
     return(QuaTools.ConvertAxis(Quaternion.LookRotation(direction, bendNormal), axisConvert));
 }
Exemplo n.º 3
0
 /*
  * Gets the rotation of the bone relative to it's 3 plane nodes
  * */
 public Quaternion GetPlaneRotation(float weight)
 {
     return(Quaternion.Lerp(transform.rotation, QuaTools.ConvertAxis(targetRotation, defaultLocalTargetRotation), weight));
 }
Exemplo n.º 4
0
 /*
  * Rotates the bone relative to it's 3 plane nodes
  * */
 public void RotateToPlane(float weight)
 {
     transform.rotation = Quaternion.Lerp(transform.rotation, QuaTools.ConvertAxis(targetRotation, defaultLocalTargetRotation), weight);
 }