Anthony,

When a level starts in my game, a randomly generated maze is displayed. The cam then moves correctly from a static starting point via

        private void MoveToEntry()
        {
            var entryGameObject = LevelManager.Instance.CurrentMap.Waypoints.First().Transform.gameObject;
            cameraPerspective.FocusCameraOnGameObject(entryGameObject, true);
        }

to the input object.

Sometimes it happens that the function never ends and during gameplay the input is permanently scrolled to.

My guess is that it happens when the distance is a bit bigger due to randomness and during the automatic movement to the input keys are already pressed by the player.

Can I query if FocusCameraOnGameObject is finished or register a callback (onFinish)?
(If possible i can block userinputs until FocusCameraOnGameObject finished)

Thanks a lot

Dennis

Translated with www.DeepL.com/Translator (free version)

    Dennis Hi!
    there are 2 events you can listen to:
    CameraEvents.OnFocusStart += OnFocusStart;
    CameraEvents.OnFocusComplete += OnFocusCompleteHandler;

    Also on the inspector, on the "follow move" variable there is a distanceFromTargetToComplete threshold you can play with.

      a month later

      Thanks.

      Fixed with blocking custom camera controls between OnFocusStart & OnFocusComplete on current version

        Write a Reply...