/* * 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); }
/* * Calculates the rotation of this bone to targetPosition. * */ public Quaternion GetRotation(Vector3 direction, Vector3 bendNormal) { return(QuaTools.ConvertAxis(Quaternion.LookRotation(direction, bendNormal), axisConvert)); }
/* * 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)); }
/* * 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); }