示例#1
0
            public void LerpTowards(CameraState target, float positionLerpPct, float rotationLerpPct)
            {
                target.EnforceConstraints();
                yaw            = Mathf.Lerp(yaw, target.yaw, rotationLerpPct);
                pitch          = Mathf.Lerp(pitch, target.pitch, rotationLerpPct);
                roll           = Mathf.Lerp(roll, target.roll, rotationLerpPct);
                targetPosition = Vector3.Lerp(targetPosition, target.targetPosition, positionLerpPct);

                distance = Mathf.Lerp(distance, target.distance, positionLerpPct);
            }