Page 1 of 1
Assigning characters for sequences
Posted: Wed Dec 22, 2021 4:16 pm
by harelme2
Hi,
I'm trying to use camera() in a sequence, but I can't seem to figure out how to assign the characters in the scene so that the camera() will know where to look at.
I figured that if I have the Dialogue Actor component with the Actor's name assigned to both characters, and since the Conversation has the Actor and Conversant specified, then that would be enough to get the loop closed, but it's not, and I'm kinda lost..
Please advise.
Thx!
Re: Assigning characters for sequences
Posted: Wed Dec 22, 2021 5:12 pm
by Tony Li
Hi,
If the sequence is part of a conversation, it will be helpful to know which GameObjects are being used as the active conversation's Conversation Actor and Conversation Conversant. For info, see
Character GameObject Assignments.
Each dialogue entry has a speaker (entry's actor) and listener (entry's conversant).
When you want to a sequencer command such as Camera() to refer to a character, you can use:
- The special keywords 'speaker' or 'listener' such as: Camera(Closeup, speaker)
- Or an actor name that matches a GameObject's Dialogue Actor component such as : Camera(Closeup, Player)
- Or a GameObject name: Camera(Closeup, PlayerControllerObject)
You can also make the camera match the position of a GameObject in the scene, such as: Camera(Corner Of Room)
Re: Assigning characters for sequences
Posted: Thu Dec 23, 2021 4:02 pm
by harelme2
I'm not sure, but I think the sequence is part of a conversation, yes -
- Screenshot 2021-12-23 225354.png (80.4 KiB) Viewed 342 times
The Dialogue System Trigger which starts the conversation has the matching GameObjects for Ben and Seller assigned as the Conversation Actor and Conversation Conversant -
- Screenshot 2021-12-23 225810.png (28.21 KiB) Viewed 342 times
What am I doing wrong?
Re: Assigning characters for sequences
Posted: Thu Dec 23, 2021 5:07 pm
by Tony Li
Hi,
Thanks for the screenshot. Yes, that's in a conversation. The speaker is Ben, and you've assigned the Ben GameObject to the Dialogue System Trigger's Conversation Actor, so that's all good.
When the "Hi" dialogue entry plays, it will move the camera to this position relative to the Ben GameObject:
A couple of notes:
- If you're forcing response menus to show for player entries (blue nodes), the sequence won't play until the player clicks the "Hi" response button. If you don't want to do this, then:
- Inspect the Dialogue Manager GameObject and UNtick Display Settings > Input Settings > Always Force Response Menu.
- Tick Subtitle Settings > Show PC Subtitles During Line.
- If your camera has a script that controls it position every frame, such as a typical Mouse Look script, you'll need to disable the script during conversations. To disable scripts during conversations, please see the bottom part of the Interaction Tutorial. (Briefly, add a Dialogue System Events component to Ben, configure OnConversationStart() to disable the script, configure OnConversationEnd() to re-enable it.
Re: Assigning characters for sequences
Posted: Fri Dec 24, 2021 10:55 am
by harelme2
Using a new camera as the Sequencer Camera solved it. Thx!
But how can I use the camera I already have as the Sequencer Camera if I'm using Cinemachine?
Alternatively, how can I have the new camera enabled when the Conversation starts and disabled when it ends?
Re: Assigning characters for sequences
Posted: Fri Dec 24, 2021 12:49 pm
by harelme2
Noticed the SetActive() sequencer command. Used that for deactivating the camera at the end of the sequence.
Thx!
Re: Assigning characters for sequences
Posted: Fri Dec 24, 2021 2:20 pm
by Tony Li
Glad you got it working!