Support: Dialogue Camera sometimes loses position on load.

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
CruttMutt
Posts: 41
Joined: Wed May 06, 2020 9:44 am

Support: Dialogue Camera sometimes loses position on load.

Post by CruttMutt »

Hello!

I've been getting dialogue system up and running in my game and loving all it's features so far. Full-on so many surprises!

I have got everything up to this point running very nicely, including the saves. I have also got some nice integration between it and the TPC and BD.

video of issue:

Where I have got stuck is with the dialogue camera. It's fine on run-through, but if I load my game it seems to get some of the characters positions (seemingly the NPC's) mixed up and points the cameras at the wrong spots. This happens with the main camera or trying a sequencer camera.

Hope you can help :)

Cheers
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Support: Dialogue Camera sometimes loses position on load.

Post by Tony Li »

Hi,

Your game looks good!

What GameObjects are surviving scene changes (e.g., loading a saved game)? The Dialogue Manager will survive scene changes. Any others?

If you temporarily set the Dialogue Manager's Debug Level to Info, when a conversation starts it will log a line like this to the Console:

Dialogue System: Starting conversation 'XXX' with actor=AAA and conversant=BBB

Are the GameObjects AAA and BBB correct after loading the saved game?

With Debug Level set to Info, the conversation will also log details about every sequencer command. Each sequencer command will have two lines. The first reports the command as parsed by the Dialogue System. It appears as soon as the dialogue entry node plays. The second appears when the command actually runs. It reports the GameObjects being used by the sequencer command. Make sure it's using the correct GameObjects.

If that doesn't help, can you please send a reproduction project to tony (at) pixelcrushers.com?
CruttMutt
Posts: 41
Joined: Wed May 06, 2020 9:44 am

Re: Support: Dialogue Camera sometimes loses position on load.

Post by CruttMutt »

Thanks for your response! And thanks for the kind words :)

I checked the info debug and everything looks fine in there in regards to where you said to look. In regards to what else it's saving, everything so: Position, quest/dialogue tracking, inventory (inventory engine), TPC Inventory, Disabled/destroyed game objects. All working fine at the moment.

It only happens on my custom camera angles it seems. They seem to revert to too at a game object at 0,0,0 transform. Appears to be where the prefab for the custom camera angle group game object is located I would assume, even though it seems to think that in the debug it's going to the correct NPC (in this case, named Wimmy).

I have not done it before but trying to figure out how to do a reproduction project for you.

Cheers.
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Support: Dialogue Camera sometimes loses position on load.

Post by Tony Li »

Are your custom camera angles defined in a prefab or a scene object?

If they're in a scene object, is that scene object part of the Dialogue Manager's hierarchy or separate from it?
CruttMutt
Posts: 41
Joined: Wed May 06, 2020 9:44 am

Re: Support: Dialogue Camera sometimes loses position on load.

Post by CruttMutt »

Ah that was it! It's a scene object but it was not in the DM's direct hierarchy. Thank you :D

Must of missed that step. Good too because this repro project wasn't coming along very well at all haha.
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Support: Dialogue Camera sometimes loses position on load.

Post by Tony Li »

Glad that was it. You could have also made it a prefab and assigned the prefab. It just can't be a non-persistent scene object because the Dialogue Manager would lose its reference to it when the scene changes (including saved game loads).
Post Reply