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.
Lock Camera after Dialogue Ends
Re: Lock Camera after Dialogue Ends
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:
(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.
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}}
---
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:
Code: Select all
Camera(original,,2)
-
- Posts: 3
- Joined: Sun Feb 23, 2020 5:31 pm
Re: Lock Camera after Dialogue Ends
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.
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
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.
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.
-
- Posts: 3
- Joined: Sun Feb 23, 2020 5:31 pm
Re: Lock Camera after Dialogue Ends
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!
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
Great! Thanks for letting me know.