Best way to create consistency with camera movement and node advancement?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Reznik
Posts: 18
Joined: Sat Apr 24, 2021 9:21 am

Best way to create consistency with camera movement and node advancement?

Post by Reznik »

One of the things I've noticed while doing lots of camera work in a conversation and using Continue or Delay to advance nodes, is there is inconsistency across sessions as to how node advancement and camera movement works, which i believe to be related to differences in game performance across sessions?

I'm using a combination of the default sequencer commands with custom sequencer commands to move, pan, zoom my camera over time within a node. If i do something like pan my camera over 4 seconds and have a delay of 4.1 or 4.2 seconds before advancing to next node (and next camera movement), depending on the play session, it may work perfectly. Other times, the next camera movement gets a bit messed up because the last node never fully finished executing its action before moving on.

Is there a better way of doing this to make sure the node doesnt advance before camera actions are finished?

Thanks!
User avatar
Tony Li
Posts: 20831
Joined: Thu Jul 18, 2013 1:27 pm

Re: Best way to create consistency with camera movement and node advancement?

Post by Tony Li »

Hi,

If you allow the player to skip ahead using a continue button, the built-in Camera() command should jump to its final position if it hasn't had time to get there yet.

If you think something else (maybe custom commands) aren't ending the correct position, consider using Cinemachine. There are built-in CinemachineTarget() and CinemachinePriority() sequencer commands to control Cinemachine.
Reznik
Posts: 18
Joined: Sat Apr 24, 2021 9:21 am

Re: Best way to create consistency with camera movement and node advancement?

Post by Reznik »

Thank you, just to make sure i understand, if i went the Cinemachine route, I'd kick off a Cinemachine Timeline sequence and Dialogue System Conversation at the same time, make the DS Conversation wait for an explicit continue to move the next nodes, and use the Timeline Continue Conversation functionality to move to the next node at key points in the Timeline?
User avatar
Tony Li
Posts: 20831
Joined: Thu Jul 18, 2013 1:27 pm

Re: Best way to create consistency with camera movement and node advancement?

Post by Tony Li »

I mentioned Cinemachine as a possible alternative. You don't need to use a Timeline. You can just let Cinemachine control the camera and use the Cinemachine sequencer commands to tell Cinemachine what to do.

If you don't want to deal with Cinemachine, compare your custom sequencer command scripts to the built-in SequencerCommandCamera.cs script. You might see some code that you can borrow to ensure your commands finish in their intended positions.
Post Reply