Ejemplo 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.xform,
            destRot,
            this.interpolation,
            this.speed
        );

        UnityConstraints.MaskOutputRotations(this.xform, this.output);
    }
Ejemplo 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.xform,
            destRot,
            this.interpolation,
            this.rotationSpeed
        );

        UnityConstraints.MaskOutputRotations(this.xform, this.output);
    }