/// <summary> /// Runs when the constraint is active or when the noTarget mode is set to /// ReturnToDefault /// </summary> private void OutputTowards(Quaternion destRot) { UnityConstraints.InterpolateRotationTo ( this.transform, destRot, this.interpolation, this.speed ); UnityConstraints.MaskOutputRotations(this.transform, this.output); }
/// <summary> /// Runs when the constraint is active or when the noTarget mode is set to /// ReturnToDefault /// </summary> private void OutputRotationTowards(Quaternion destRot) { // Faster exit if nothing to do. if (!this.constrainRotation) { return; } UnityConstraints.InterpolateRotationTo ( this.transform, destRot, this.interpolation, this.rotationSpeed ); UnityConstraints.MaskOutputRotations(this.transform, this.output); }