LookAt() does not work

Announcements, support questions, and discussion for the Dialogue System.
Edla
Posts: 27
Joined: Mon May 04, 2020 9:23 pm

Re: LookAt() does not work

Post by Edla »

The speaker seems to be null for other sequences too, Camera(Closeup, speaker) would fail.
Except one conversation. all Speaker and Listener are assigned correctly, they name, sprite and subtitle show up.

As programmer, we tend to not go the easy route,
so as last resort, I have just deleted the old database and recreate a new one and recreate all the quests and conversations.
And now all works.

Thank for all the helps, now I can go and make some quests.

Just notice the closeup camera switching back to the original camera, take a couple of seconds. Any Ideas?
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: LookAt() does not work

Post by Tony Li »

I'm glad your new database is working correctly. I wonder if something corrupted the other one. Remember that you can set the auto-backup frequency in the Dialogue Editor's Database section. If you notice another problem (maybe someone is committing merged changes to a repository?), then try the auto-backup before it's overwritten.


For the closeup camera, are you using a different camera that's assigned to the Dialogue Manager's Camera & Cutscene Sequences > Sequencer Camera field? Or the regular TDE Cinemachine camera? Are you controlling it using the Cinemachine sequencer commands, or something else such as the Camera() command?
Edla
Posts: 27
Joined: Mon May 04, 2020 9:23 pm

Re: LookAt() does not work

Post by Edla »

Yes, The closeup camera is a separate unity camera prefab setup per the documentation and assigned to the Dialogue Manager Display settings. I switch to closeup cam by the Camera(Closeup) command, that's instant, when the conversation is done, it auto switches back to the regular camera(Cinamachine Freelook), that takes a few second.
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: LookAt() does not work

Post by Tony Li »

The switch back to the gameplay camera should be instant.

I'm guessing that the conversation is still finishing the last node's Sequence. The Dialogue Manager's Default Sequence is set to this initial value:

Code: Select all

Delay({{end}})
Assuming the default Subtitle Settings > Subtitle Chars Per Second and Min Subtitle Seconds values, this will delay for a minimum of 2 seconds before ending the conversation. Once the conversation ends, the sequencer camera should be immediately deactivated, and the gameplay camera will take over again.
Edla
Posts: 27
Joined: Mon May 04, 2020 9:23 pm

Re: LookAt() does not work

Post by Edla »

I removed the default Delay({{end}}), it still feels the same amount of delay, anyway to shorten that?
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: LookAt() does not work

Post by Tony Li »

If the last node's Sequence is blank, it will use the Dialogue Manager's Default Sequence.

Try setting the last node's Sequence to:

Code: Select all

None()
or:

Code: Select all

Delay(0.5)
The first example will make the last node finish instantly. The second will delay 0.5 seconds.

If that doesn't make a difference, then something else is going on. Set the Dialogue Manager's Other Settings > Debug Level to Info and run the conversation. As the conversation finishes examine the Console window to determine what's going on under the hood.

BTW, if you want all nodes to work this way, set the Dialogue Manager's Default Sequence to that value.

More info: Cutscene Sequences, Tutorials
Edla
Posts: 27
Joined: Mon May 04, 2020 9:23 pm

Re: LookAt() does not work

Post by Edla »

Switch vcam to cinemachine works much better! Thank for the help.
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: LookAt() does not work

Post by Tony Li »

I'm glad that's working for you.
Post Reply