Cinemachine Camera Not Working Properly

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
KingCeryn
Posts: 70
Joined: Sun Aug 23, 2020 5:12 pm

Cinemachine Camera Not Working Properly

Post by KingCeryn »

I've tried using the Cinemachine Priority On Dialogue Event, but the problem is even when it sets the priority back to 0, the my main camera stays in the same place as the NPC's virtual camera. Is there an updated tutorial or thread for using the right Cinemachine commands? I'd like to be able to redirect the camera dynamically throughout the conversation, but some some reason it doesnt look towards anything during the convo, just wherever it was placed originally.
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: Cinemachine Camera Not Working Properly

Post by Tony Li »

Hi,

First make sure Cinemachine itself is set up so that it can use CinemachineVirtualCameras (vcams).

Cinemachine will use whatever vcam currently has the highest priority.

A common way to set this up is to add a vcam as a child of the NPC, and position it to face the NPC. Then add a Cinemachine Priority On Dialogue Event to the NPC. Set the Trigger to OnConversation, assign your vcam, and set the On Start priority to a value higher than all other vcams. Leave On End set to zero.

During conversations with the NPC, this component will set the vcam's priority so that Cinemachine will use it. When the conversation ends, it will set the priority back to zero, which will make Cinemachine switch to the next-highest priority vcam.

Also, make sure you've ticked the USE_CINEMACHINE checkbox in the Dialogue System's Welcome Window.
Post Reply