# Animating Camera

Cameras can be driven by animation sequences. The animation-driven camera is very powerful in expressing fancy skills and scene transitions. Follow the instructions below to create and call an animation-driven camera.

1. Prepare your camera animation. You should craft your animation in DCC softwares, e.g., Maya, 3dsMax, and then import the FBX file into Unreal Engine. The source FBX file should contain, and only contain ***one*** bone track. To this end, you can first import a dummy skeleton (as well as its mesh due to UE's requirement) representating the camera to be animated. **This skeleton must only contain one bone named "root".** Then keyframe the skeleton in DCC softwares and export it as an FBX file, which will be imported into UE.<br>

   <figure><img src="https://1253177398-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIc7aRtmwmEkkqEJZORmC%2Fuploads%2Fp8BzGMpcJ5Q6bj3sfhti%2Fimportfbx.png?alt=media&#x26;token=40bd6b77-0301-4167-ad59-158496edc1ce" alt=""><figcaption><p>Imported skeleton (start with "cam_base2") and an animation (start with "cam_tans")</p></figcaption></figure>
2. Check the imported animation sequence if it works as expected.<br>

   <figure><img src="https://1253177398-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIc7aRtmwmEkkqEJZORmC%2Fuploads%2FXYQGjThj6dMEsRknSpMT%2Fcameraanimation.gif?alt=media&#x26;token=ac75418a-8a5b-43af-a7ed-4ab611a390c4" alt=""><figcaption></figcaption></figure>
3. Go to the blueprint (say the level blueprint) where you want to activate this animation sequence. Call the node `CallAnimatedCamera` and fill in the parameters. The default reference coordiante is world space. If you would like to pivot the camera in other spaces, e.g., an actor's local space, you can set the parameter `Ref Coordinate Actor`, or manually set `Ref Coordinate Transform`.<br>

   <figure><img src="https://1253177398-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIc7aRtmwmEkkqEJZORmC%2Fuploads%2FA8FMUHQC88sgfVTvIf71%2Fcallanimatedcamera.png?alt=media&#x26;token=45d39668-dca8-446e-9edc-d72a31982dd7" alt=""><figcaption></figcaption></figure>
4. Now you can enjoy your nice animated camera.<br>

   <figure><img src="https://1253177398-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIc7aRtmwmEkkqEJZORmC%2Fuploads%2F7vXSLzMYrI5UTGBckNup%2Fanimatedcamera.gif?alt=media&#x26;token=f2d230c1-a7f6-44d1-9715-e36adfdc38e2" alt=""><figcaption></figcaption></figure>

If you want to animate FOV as well, you can create a new attribute curve attacked to the dummy bone in your DCC software. This attribute curve **MUST** be of float type and its name **contains "FOV"**. Refer to [Animation Attributes](https://docs.unrealengine.com/5.1/en-US/fbx-attributes-in-unreal-engine/) to learn the way you import animation attributes.

After you successfully import the attribute, you will see an additional track is added below the `Attributes` section. Once again, you should make the attribute name contain "FOV", otherwise it will not be detected and becomes useless.

<figure><img src="https://1253177398-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIc7aRtmwmEkkqEJZORmC%2Fuploads%2FdG0nOENdxoCTRFhNUbiD%2Fattribute.png?alt=media&#x26;token=597dc4f1-f2b3-4373-94a9-ddb86c008275" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sulleyyys-organization.gitbook.io/manuals-of-ccs/advanced-uses/animating-camera.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
