📷Camera setup

In this section we will set up a camera from scratch.

Create an empty Game Object FPCameraSocket and CameraHolder. Then, parent your camera to the CamerHolder:

FPCameraSocket will only be used to define the camera default position. This is useful, if you want to use procedural aiming for third-person view too.

CameraHolder is simply a camera parent object, which will be used for free aiming mechanic.

Now we need to add an FPSCamera script to the Camera. This script will procedurally apply camera animations and FOV changes:

Camera Data is a Scriptable Object, which defines FOV levels and smoothing:

  • Base FOV defines default field of view.

  • Aim FOV defines aiming field of view.

  • Fov Curve defines how the FOV will change.

  • Aim Speed defines FOV change speed.

  • Extra Smoothing defines additional smoohing speed, applied on top of the Fov Curve. Note: if set to zero no smoothing is applied.

The camera setup is complete, and we can now move to the animation layers setup.

Last updated