コード例 #1
0
ファイル: IKMapping.cs プロジェクト: mradfo21/Rainbow
            /*
             * 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);
            }
コード例 #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));
 }
コード例 #3
0
ファイル: IKMapping.cs プロジェクト: group8CA/AssignB5
 /*
  * 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));
 }
コード例 #4
0
ファイル: IKMapping.cs プロジェクト: mengtest/penguin_run
 /*
  * 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);
 }