Esempio n. 1
0
        /// <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);
        }
Esempio n. 2
0
        /// <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);
        }