Hi Tony,
I wanted to add animation to some camera angles. For example having a shaking effect when NPC says a dialogue with anger. Is it possible? Because I couldn't find any way to add animation to Dialogue camera.
Add animation to camera angle
Re: Add animation to camera angle
Hi,
Are you using the main camera, or have you assigned a camera/prefab to the Dialogue Manager's Sequencer Camera field?
In either case, as long as you know its name, you can use AnimatorPlay, such as:
If you're trying to shake by changing the camera's transform, you may need to write a separate method to do that, or a custom sequencer command, unless the camera is a child of a GameObject that you know is in the correct position. If the camera is a child, you can play the animation on the parent object and change the camera's transform relative to the parent.
Are you using the main camera, or have you assigned a camera/prefab to the Dialogue Manager's Sequencer Camera field?
In either case, as long as you know its name, you can use AnimatorPlay, such as:
Code: Select all
AnimatorPlay(SomeEffect, MainCamera)