Exemplo n.º 1
0
        private float weight; // Current weight

        public LookAtIKController(
            CrossfadeLookAtIK lookAt,
            float bodyWeightMax,
            float bodyWeightDelay)
        {
            this.lookAt = lookAt;

            this.targetInterp =
                new Interpolator <Vector3>(
                    Vector3.zero, Vector3.zero, Vector3.Lerp);

            this.weightInterp =
                new Interpolator <float>(
                    0.0f, 1.0f, Mathf.Lerp);

            this.controlInterp =
                new Interpolator <float>(
                    0.0f, bodyWeightMax, Mathf.Lerp);

            this.controlInterp.ForceMax();
        }
Exemplo n.º 2
0
        private float weight; // Current weight

        public LookAtIKController(
            CrossfadeLookAtIK lookAt,
            float bodyWeightMax,
            float bodyWeightDelay)
        {
            this.lookAt = lookAt;

            this.targetInterp =
                new Interpolator<Vector3>(
                    Vector3.zero, Vector3.zero, Vector3.Lerp);

            this.weightInterp =
                new Interpolator<float>(
                    0.0f, 1.0f, Mathf.Lerp);

            this.controlInterp =
                new Interpolator<float>(
                    0.0f, bodyWeightMax, Mathf.Lerp);

            this.controlInterp.ForceMax();
        }