Exemple #1
0
    private void LimitYaw(float range, ref float yaw)
    {
        float yawMax = target.eulerAngles.y + range;
        float yawMin = target.eulerAngles.y - range;

        yaw = UMath.ClampAngle(yaw, yawMin, yawMax);

        StartCoroutine(UnsmoothRotationSet());
    }