Camera Transition
-
- Posts: 80
- Joined: Sun Jul 17, 2016 3:38 pm
Camera Transition
Good day! It's been a while. I know that this topic is not new here. But I still don't understand how to use the transition of camera.
This is the character and the collider that will trigger the transition of camera.
When the character hits or enters the collider. The camera will switch to this character.
My question is how will the camera will switch? Thank you for the help
This is the character and the collider that will trigger the transition of camera.
When the character hits or enters the collider. The camera will switch to this character.
My question is how will the camera will switch? Thank you for the help
Re: Camera Transition
Hi,
Do you intend for the camera to switch and start a conversation? If so, use the Camera() command in a dialogue entry node's Sequence field. If this is what you want to do, please let me know. I'll provide more details.
Or do you intend for the camera to switch for the duration of a cutscene sequence? (For example, triggered by a Sequence Trigger.) If so, let me know and I'll provide more details on this.
Or do you want to transition the camera during gameplay? If this is the case, it's not really what the Dialogue System was designed for, but I could probably give you the steps to do it if you'd please describe the requirements more.
Do you intend for the camera to switch and start a conversation? If so, use the Camera() command in a dialogue entry node's Sequence field. If this is what you want to do, please let me know. I'll provide more details.
Or do you intend for the camera to switch for the duration of a cutscene sequence? (For example, triggered by a Sequence Trigger.) If so, let me know and I'll provide more details on this.
Or do you want to transition the camera during gameplay? If this is the case, it's not really what the Dialogue System was designed for, but I could probably give you the steps to do it if you'd please describe the requirements more.
-
- Posts: 80
- Joined: Sun Jul 17, 2016 3:38 pm
Re: Camera Transition
Yes, I intend the camera to swtich for the duration of a cutscene and also I'm using the sequence trigger.
Re: Camera Transition
Hi,
Make sure the Sequence Trigger is set to OnTriggerEnter.
In the Sequence field, use the Camera() command.
For the position, the Camera() command can accept a camera angle name or a specific GameObject.
Here are the default camera angle names: Default Camera Angles
Let's say the character in the second image is named "Boy123". Put this command in the Sequence field to cut immediately to the back of Boy123:
You can also set a specific, absolute position in the scene. Let's say you create an empty GameObject behind Boy123 called "Cutscene Camera Position". Use this sequence to move the camera to the position of Cutscene Camera Position:
Here is a more complex example:
In this example:
1. [0:00] The screen fades to black over 1 second.
2. [0:01] The camera moves to a Full Back angle of Boy123.
3. [0:01] The screen fades in from black over 1 second.
4. [0:02] Boy123 plays the "StandUp" animator state
5. [0:03] Boy123 plays the audio clip "GiveAnswer".
Make sure the Sequence Trigger is set to OnTriggerEnter.
In the Sequence field, use the Camera() command.
For the position, the Camera() command can accept a camera angle name or a specific GameObject.
Here are the default camera angle names: Default Camera Angles
Let's say the character in the second image is named "Boy123". Put this command in the Sequence field to cut immediately to the back of Boy123:
Code: Select all
Camera(Full Back, Boy123)
Code: Select all
Camera(Cutscene Camera Position)
Code: Select all
Fade(out,1);
Camera(Full Back, Boy123)@1;
Fade(in,1)@1;
AnimatorPlay(StandUp, Boy123)@2;
AudioWait(GiveAnswer, Boy123)@3
1. [0:00] The screen fades to black over 1 second.
2. [0:01] The camera moves to a Full Back angle of Boy123.
3. [0:01] The screen fades in from black over 1 second.
4. [0:02] Boy123 plays the "StandUp" animator state
5. [0:03] Boy123 plays the audio clip "GiveAnswer".
-
- Posts: 80
- Joined: Sun Jul 17, 2016 3:38 pm
Re: Camera Transition
It work thanks
I still have a question. How will I make the camera stay for a long period of time on boy123 and switchback the camera using the sequence in the Conversation?
I still have a question. How will I make the camera stay for a long period of time on boy123 and switchback the camera using the sequence in the Conversation?
Re: Camera Transition
When you move the camera using the Camera() command, it will stay there until the sequence ends. If you want to make the sequence last for a specific amount of time, use the Delay() command. For example:
This will move to the camera to a Full Back angle of Boy123. The camera will stay there for 10 seconds.
However, if your gameplay scripts also control the camera, you must temporarily disable them during the sequence. Otherwise the gameplay scripts will move the camera.
There are two ways to temporarily disable the gameplay scripts:
1. Use the SetEnabled() sequencer command:
At [0:00], this sequence will find a GameObject named "Player" and disable its SmoothCameraFollow and MouseLook components.
At [0:10], it will re-enable the components.
2. Or add a Set Component Enabled On Dialogue Event component to the Sequence Trigger. Set the Trigger to OnSequence. In the OnStart section, assign the components and set them False. In the OnEnd section, assign the components and set them True.
If a sequence doesn't work the way you expect, temporarily set the Dialogue Manager's Debug Level to Info. This will log activity to the Console window. It should help you determine what each command is doing.
Code: Select all
Camera(Full Back, Boy123);
Delay(10)
However, if your gameplay scripts also control the camera, you must temporarily disable them during the sequence. Otherwise the gameplay scripts will move the camera.
There are two ways to temporarily disable the gameplay scripts:
1. Use the SetEnabled() sequencer command:
Code: Select all
SetEnabled(SmoothCameraFollow,false,Player);
SetEnabled(MouseLook,false,Player);
Camera(Full Back, Boy123);
SetEnabled(SmoothCameraFollow,true,Player)@10;
SetEnabled(MouseLook,true,Player)@10
At [0:10], it will re-enable the components.
2. Or add a Set Component Enabled On Dialogue Event component to the Sequence Trigger. Set the Trigger to OnSequence. In the OnStart section, assign the components and set them False. In the OnEnd section, assign the components and set them True.
If a sequence doesn't work the way you expect, temporarily set the Dialogue Manager's Debug Level to Info. This will log activity to the Console window. It should help you determine what each command is doing.
-
- Posts: 80
- Joined: Sun Jul 17, 2016 3:38 pm
Re: Camera Transition
So far, I make a lot of camera transitions. Thanks for your help.