Page 1 of 1
Lock Camera after Dialogue Ends
Posted: Sun Feb 23, 2020 5:41 pm
by HierophantDev
Hello,
I'm unsure of how to stop my camera zooming out after a conversation ends. I'd like it to stay at the spot it zoomed to so the players can start other conversations that are attached to the zoomed game object.
Thanks.
Re: Lock Camera after Dialogue Ends
Posted: Sun Feb 23, 2020 8:09 pm
by Tony Li
Hi,
Conversations always clean up after themselves by moving the camera back to the original, pre-conversation position.
To achieve what you want to do, I recommend this setup:
1. Assign your main camera -- or a different camera or camera prefab -- to the Dialogue Manager's Camera & Cutscene Setting > Sequencer Camera field. Conversations will make a
clone of the camera. For example, if your main camera is named "Camera", then the one used during the conversation will be named "Camera(Clone)". Camera() sequencer commands (or Zoom2D() in 2D) will use the clone.
2. In the last node, move the main camera to the position of the clone using a Sequence like this:
Code: Select all
MoveTo(Camera(Clone), Camera);
{{default}}
(I added {{default}} so it will also play the Dialogue Manager's Default Sequence.)
---
Side note: If you want to smoothly zoom back to the
original position before ending the conversation, in the last node use a Sequence like this to zoom back (in 3D scenes) over 2 seconds:
However, I believe this is the exact opposite of what you're asking about.
Re: Lock Camera after Dialogue Ends
Posted: Sun Feb 23, 2020 9:56 pm
by HierophantDev
Hi Tony,
That worked almost perfectly, with the only issue being that my mouse cursor disappears when the camera moves (it still works, just invisible, and reappears if I hit exit). I suspect this may be a selector issue. Could you advise?
Thanks.
Re: Lock Camera after Dialogue Ends
Posted: Sun Feb 23, 2020 10:15 pm
by Tony Li
Does the mouse cursor disappear only when the camera is moving? Or during the whole conversation?
As a test, try temporarily disabling the Dialogue Manager's Input Device Manager. This will eliminate any point where the Dialogue System may hide the cursor. If it still disappears, it's probably an unrelated script -- perhaps something that's on the camera?
I'm finishing work for the day, but I'll check back first thing in the morning.
Re: Lock Camera after Dialogue Ends
Posted: Thu Feb 27, 2020 1:24 pm
by HierophantDev
Hi Tony,
Sorry for the late response. I fixed my error by disabling the "Control Cursor State" in the dialogue manager.
Thanks for your help!
Re: Lock Camera after Dialogue Ends
Posted: Thu Feb 27, 2020 1:39 pm
by Tony Li
Great! Thanks for letting me know.