Hello, the component mentioned above works as expected, but there is a feature I need and it doesn't have it.

It is currently not possible to focus on the subject while maintaining the current distance and without following the subject.

If I only check the Follow option, it does exactly what I need, previews the object without focusing, and maintains the correct distance based on the distance before I clicked on the object. But the problem here is that it keeps following the object, because Follow is checked.

I need it to do exactly what it already does, but not follow the object afterwards.
Please, could u help-me with this?

This litle video explain:
https://i.gyazo.com/5fd84168991d42bc02da8f3e74b0fc2b.mp4

I need him not to follow the object, but to do everything else he is doing.

  • Looking at the component, I expected this to happen if I didn't check any of the existing options. Follow and Focus.
    But even keeping everything unchecked, it uses FOCUS, losing current distance to maintain focus

    jcpereira You're right, this behaviour is not implemented.
    You can either call StopFollow() on the Camera component script to stop following the object, or you can add your own method like so:

    
    public void MoveCameraTo(Vector3 targetPosition )
    {
        StopFollow();
    
        Vector3 currentOffset = finalOffset;
        disableMoves = true;
        float lerp = 0;
        Tween t = DOTween.To(() => lerp, x => lerp = x, 1, focusTweenDuration).SetEase(focusEase);
        t.OnUpdate(() =>
        {
            finalOffset = Vector3.Lerp(currentOffset, targetPosition, lerp);
            finalPosition = CalculateNewPosition(finalOffset, finalRotation, finalDistance);
            ApplyToCamera();
        })
        .OnComplete(() =>
        {
            disableMoves = false;
        });
    }
      Write a Reply...