Ejemplo n.º 1
0
    // Summary:
    //     Instantly sets the distance to the target, skipping all the lerping to smoothly zoom to the target.
    private void setDistanceToTarget()
    {
        updateTargetPos();

        float initDist = Vector3.Distance(_targetPos, transform.position);

        initDist = _distanceLimits.ClampValue(initDist);

        _currDistance = _desiredDistance = initDist;
    }