Skip to content
CRUSHFORMV1.1.0
GET IT ON FAB

REFERENCECOMPONENTS

UCFVehicleChaseCameraComponent

MODULECrushformCameraINCLUDECFVehicleChaseCameraComponent.hPARENTUActorComponent

GTA-style chase camera for a vehicle pawn. Drives the world rotation of one spring arm of its owner: free orbit from look input (yaw unlimited, pitch within limits) and, after a pause in looking (input jitter under Tuning.LookThreshold is no look), an ease back behind the direction of travel, or behind the nose while the car is slow or reversing. Below Tuning.FollowStartSpeed there is no ease back, so a standing car does not turn the view. The arm is switched to absolute rotation, so the car turning does not drag the camera with it.

Functions

AUTHORITY · server, every machineLOCAL · this machinePURE · read only
void AddLookInput(float YawDegrees, float PitchDegrees)

Turns the view at once by these angles in degrees; once look input adds up to Tuning.LookThreshold, restarts the wait before the camera follows the car.

Category
Camera
void SnapBehind()

Puts the camera behind the car at the default pitch this frame (spawn, possession, a reset teleport).

Category
Camera
void BindLookInput(UEnhancedInputComponent* InputComponent)
C++ ONLY

Binds YawAction and PitchAction on this input component, replacing the bindings this camera made before (on it or on another).

Properties

FComponentReference SpringArm

The spring arm this camera drives, picked from the owner's components by variable name. Its world rotation is set every tick and it is switched to absolute rotation.

Category
Camera
TObjectPtr<UInputAction> YawAction

Axis1D action whose value is degrees of yaw: a mouse count is worth the input settings' mouse sensitivity, a stick mapping scales by delta time.

Category
Input
TObjectPtr<UInputAction> PitchAction

Axis1D action whose value is degrees of pitch; positive looks up.

Category
Input
FCFVehicleChaseCameraTuning Tuning

Orbit and follow tuning; the units of each value are given on its field in FCFVehicleChaseCameraTuning.

Category
Camera