Animation Camera
Conceptually, a CameraAnimation is simply an animation that can be layered onto the in-game camera. You can animate the camera position and rotation, FOV, and post process settings. A CameraAnim's position, rotation, and FOV changes are applied additively to the game camera.
In practice, this allows you to achieve high-quality and professional camera movements during specific actions of the player, also known as finishers.
Here are some examples from AAA video games:
Source - Jedi Fallen Order
Camera Animation Setup Video
Creating a Camera Animation
There are a few ways to create a CameraAnim. The easiest is to create a blank one as you would any other asset via the Content Browser.
You could also create the animation using a Level Sequence and then copy (right-click + Copy) the Transform track of the camera from your Level Sequence and paste it (right-click + Paste) on the Camera of you Camera Animation Sequence.
The Camera should always start an animation with the rotation (Roll=0, Pitch=0, Yaw=0).
The location however, can be something like (X=-250, Y=0, Z=148) to simulate the Spring Arm properties of a third person camera (Target Arm Length and Target Offset + Capsule Half Height).
Unfortunately, Unreal Engine does not allow you to add character meshes and their animations in your Camera Animation Sequencer Tool so that you can sync the two animations. So you will need to do that in a Level Sequencer.
Playing an Animation Camera
Our custom blueprint nodes
Much like any character animation, you can play Camera Animations in Blueprint using our Play Camera Animation blueprint nodes.
You can right-click on Params and click Split struct pin.
The first one takes the Camera Animation Modifier directly which you can get from the BP_UGCCameraManager
The second node uses the Player Camera Manager to look for the Camera Animation Modifier class (exact class match only, no inheritance)
We personally use the first one, but it’s always nice to have both options.
And like character animations, the Play Animation node has async events which are executed when the animation finishes, is interrupted or has started easing out:
Camera Animation Params
There are multiple parameters you can use for any specific camera animation.
Play Rate: How fast/slow the camera animation should play Ease In/Out Type: How the camera accelerates and decelerates when the animation starts/finishes. Sinusoidal is usually good. Ease In/Out Duration: How long it takes the camera to start/finish the animation (0 is equivalent to a camera cut) Loop: Should the camera animation loop? Reset Type: How the camera behaves after the animation has ended. BackToStart: The camera will go back to the position from where it started the animation. ResetToZero: The camera will go back to face the back of the character. ContinueFromEnd: The camera will continue from where the animation has ended. Ease Out Duration starts before the camera animation has ended, e.g., if your animation is 3-seconds-long and your ease out duration is 1 second, the camera will start easing out after 2 seconds have elapsed in the animation. ResetType is forcefully used as ResetToZero if your character is strafing (otherwise the camera would make your character rotate).