Page 1 of 1

Load game and cinemachine problems

Posted: Fri May 26, 2023 3:32 pm
by Esylin
Hello, I am encountering a problem with cinemachine camera as I load a save game in a scene. I am using Standard Scene Transition Manager and SceneFaderCanvas for load game camera fade in and fade out effect. My game is using Unity 2D.

After the scene is loaded, cinemachine camera will pause then spend about 1~ sec panning left or right trying to focus on my character. How bad the panning is depends on cinemachine softzone settings and SceneFaderCanvas animation duration settings, but it can't be removed by changing those settings.

Trying to give position saver to the camera doesn't work. I also tried to uncheck Pause During Transition but the game freezes after load this way.

Are there any settings that I can change to remove camera panning after load?

Re: Load game and cinemachine problems

Posted: Fri May 26, 2023 3:42 pm
by Tony Li
Hi,

Try disabling and then re-enabling the vcam after loading. This should get Cinemachine to jump the camera to its proper position.

Re: Load game and cinemachine problems

Posted: Sat May 27, 2023 4:14 pm
by Esylin
Tony Li wrote: Fri May 26, 2023 3:42 pm Hi,

Try disabling and then re-enabling the vcam after loading. This should get Cinemachine to jump the camera to its proper position.
It kinda worked now, thank you. Though I had to force scene fade in and fade out again after load to hide the camera cut after vcam re-activate. I don't know if there is a better solution for this. ;)

Re: Load game and cinemachine problems

Posted: Sat May 27, 2023 4:19 pm
by Tony Li
Hi,

The cut should happen instantly. If it doesn't, let me know, or look at how the code in SequencerCommandCinemachinePriority() does it. Also make sure the SceneFaderCanvas's fade from black lasts at least one frame after loading the new scene, to give your script time to disable and re-enable the vcam.

Re: Load game and cinemachine problems

Posted: Mon May 29, 2023 12:27 pm
by Esylin
Tony Li wrote: Sat May 27, 2023 4:19 pm Hi,

The cut should happen instantly. If it doesn't, let me know, or look at how the code in SequencerCommandCinemachinePriority() does it. Also make sure the SceneFaderCanvas's fade from black lasts at least one frame after loading the new scene, to give your script time to disable and re-enable the vcam.
Hi, I mainly use Playmaker to control my game logic, so I setup PlayMaker actions in the scene that de-activate/re-activate vcam after a scene is loaded.

Is this the correct way to do it without scripts? :?:

Re: Load game and cinemachine problems

Posted: Mon May 29, 2023 3:11 pm
by Tony Li
Yes, that's fine.