Save Cinemachine Priority

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
jsebastian
Posts: 5
Joined: Sun Apr 04, 2021 10:01 pm

Save Cinemachine Priority

Post by jsebastian »

I am currently using Sequences to change the priority of two Cinemachine cameras which when changed, will go back and forth between two characters during a conversation.

E.g. When person A says a line, we set the priority of CamA using

Code: Select all

CIneamchinePrioirty(CamA)
When person B says a line, we set the priority of CamB using

Code: Select all

CinemachinePriority(CamB)
.

Is there an easy way to "reset" the priority to it's original value after calling

Code: Select all

CinemachinePriority(CamA)
? How would you advise doing this, or something similar?
User avatar
Tony Li
Posts: 21987
Joined: Thu Jul 18, 2013 1:27 pm

Re: Save Cinemachine Priority

Post by Tony Li »

Hi,

You can specify a priority value with CinemachinePriority. Maybe that would help?

For example, person A's line could be:

Code: Select all

CinemachinePriority(CamA, 8)
Then person B:

Code: Select all

CinemachinePriority(CamB, 9)
This will make CamB take precedence.

Then you could revert to CamA by setting CamB's priority to a low value:

Code: Select all

CinemachinePriority(CamB, 1)
In this case, person B doesn't need to directly reference CamA. It just sets its own CamB priority to a low value, and Cinemachine automatically gives precedence to the next-highest priority vcam.
Post Reply