How to hold camera after sequence move

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
ARKB
Posts: 3
Joined: Sun Nov 07, 2021 3:20 pm

How to hold camera after sequence move

Post by ARKB »

Hi there, new to Dialogue System and struggling to hold a camera after a move.

I have some text that's showing describing a pickup the player can collect and I have it so that the camera will move when the text is shown but as soon as it's finished showing the text, it jumps back to the regular character camera position before displaying respones.

The sequence I am testing with is: Camera(Closeup,HealthPickup_1,1); and I want to hold the camera there while the "OK" response is shown and once the player chooses the response, it then returns to regular gameplay. How can I hold a camera after a move or am I going about this the wrong way?

NOTES:
I am integrating with Ultimate Character Controller.

Second, in case it's relevant, I don't see the Converse ability become active when I instigate a conversation. Should it be? I debugged the Converse ability and AbilityStarted is never called and in fact the dialogueSystemEvents.conversationEvents.onConversationStart event handler isn't being called. As if the event isn't even firing.

Third, I am activating the conversation on trigger enter.


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

Re: How to hold camera after sequence move

Post by Tony Li »

Hi,

Getting the Converse ability to become active is probably the key, since this will allow the Dialogue System to control the camera without UCC moving it back.

The Converse ability will become active if the player GameObject (with the UltimateCharacterLocomotion component) is used as the active conversation's conversation actor or conversation conversant. (See Character GameObject Assignments for details.)

If the player enters the trigger, OnTriggerEnter should cause the player GameObject to be used as the conversation actor. To confirm, temporarily set the Dialogue Manager's Other Settings > Debug Level to Info. This will log a lot of info the Console window. When the conversation starts, look for a line in the Console similar to:

Dialogue System: Starting conversation 'title' with actor=XXX and conversant=YYY

Make sure XXX or YYY is the player.

Note: Another way to "control" the camera during conversations is to assign a different camera or camera prefab to the Dialogue Manager's Display Settings > Camera & Cutscene Settings > Sequencer Camera field. Conversations will activate this camera, and Camera() sequencer commands will control it. Set this camera's Depth to a value higher than the main gameplay camera's Depth so it takes priority during conversations. This is also handy if you want to apply different postprocessing effects during the conversation, such as depth of field blur.
ARKB
Posts: 3
Joined: Sun Nov 07, 2021 3:20 pm

Re: How to hold camera after sequence move

Post by ARKB »

Thanks Tony.

So what I was seeing in the debug was CapsuleCollider (Of my UCC player) and my trigger/other entity as being part of the conversation - my character wasn't at all. If I manually set who my Actor was in the Start conversation fields then it worked however it'd be nice if it could be picked up automatically somehow.
dialogue.png
dialogue.png (56.76 KiB) Viewed 281 times
One more quick question. I see there's an Actor and Conversant in the Conversation Start node, but also there's custom ones in the Start Conversation on a Dialog System Trigger Interactable Target. Do I have to be careful to match all these up so Actor is the same on all and Conversant is the same on all? I was getting some weird results (Where my character was speaking things I though my other GameObject should be).

I'm a bit confused when I see that Actor in the Start Node of a conversation is my AI character, but Actor in the Start Conversation config is my player.


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

Re: How to hold camera after sequence move

Post by Tony Li »

Hi,

To associate your main player GameObject (and not the child with the collider) with the player actor, add a Dialogue Actor component to the main player GameObject and set its Actor dropdown to the player actor. The leave the Dialogue System Trigger's Conversation Actor field blank.

The Character GameObject Assignments link in my previous message should clarify how an active conversation determines which GameObjects to use. If you have any questions about it, please let me know.
ARKB
Posts: 3
Joined: Sun Nov 07, 2021 3:20 pm

Re: How to hold camera after sequence move

Post by ARKB »

Thanks. Unfortunately I tried that but if I don't assign it, it picks up the collider still and I have the original problem back that I can't own the camera (Because it doesn't find the actor correctly I assume)

Looking at that link you posted, it seems to reinforce what I'm seeing

Conversation Actor

If you don't assign the Conversation Actor field, the Dialogue System Trigger will try to choose an appropriate GameObject:

If the trigger type is OnTriggerEnter/Exit or OnCollisionEnter/Exit, it will use the GameObject that collided with the trigger.


In UCC the colliders are children of the character GO that contains the Dialogue Actor component on.
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to hold camera after sequence move

Post by Tony Li »

Ah, you're right. I forgot you're using OnTriggerEnter. Yes, in that case it will use the child collider. You can either:
  • Assign the main GameObject to the Dialogue System Trigger's Conversation Actor field, or
  • Untag the child collider, tag the game GameObject as Player, add a collider to the main GameObject, and set the Dialogue System Trigger's Conditions > Accepted Tags to Player.
Post Reply