Camera Modes

Camera Modes are the core building blocks for defining distinct camera behaviors within the Advanced Third Person Camera plugin. Each Camera Mode encapsulates a comprehensive set of parameters that control every aspect of how the camera functions, allowing you to create unique camera experiences for different gameplay situations.

Identifying Camera Modes with Tags

Every Camera Mode is identified by a unique Gameplay Tag. This tag serves as a reference point for switching between camera modes during gameplay. It's crucial to use clear and descriptive tag names for easy organization and management. For example:

  • "Camera.Mode.Default"

  • "Camera.Mode.Aiming"

  • "Camera.Mode.Driving"

  • "Camera.Mode.Cinematic"

Camera Mode Parameters

All the settings that define a Camera Mode are contained within a structure called FATPCCameraMode. This structure is divided into several sections, each focusing on a specific aspect of camera behavior:

1. Location Settings:

  • Camera Distance:

    • MinCameraDistance: Closest allowed distance between the camera and the character.

    • MaxCameraDistance: Furthest allowed distance between the camera and the character.

    • DefaultCameraDistance: Initial camera distance when this mode is activated.

    • ZoomDistance: Distance increment for each zoom step.

    • ZoomInterpolation: Interpolation method and speed for zooming.

  • Camera Lag:

    • bEnableCameraLocationLag: Enable/disable position lag.

    • CameraLocationLagSettings: Settings for position lag:

      • CameraLagSpeed: Speed of the lag. Higher values result in less lag.

      • CameraLagMaxDistance: Maximum distance the camera can lag behind.

      • bUseCameraLagSubstepping: Enable sub-stepping for smoother lag at higher frame rates.

      • CameraLagMaxTimeStep: Maximum time step for sub-stepping.

    • bEnableCameraRotationLag: Enable/disable rotation lag.

    • CameraRotationLagSettings: Settings for rotation lag:

      • CameraLagSpeed: Speed of the lag. Higher values result in less lag.

      • bUseCameraLagSubstepping: Enable sub-stepping for smoother lag at higher frame rates.

      • CameraLagMaxTimeStep: Maximum time step for sub-stepping.

  • Collision Handling:

    • bDoCollisionTest: Enable/disable collision checks to prevent camera clipping.

    • ProbeSize: Size of the sphere used for collision detection.

    • ProbeChannel: Collision channel used for the probe.

    • bDoMovementCollisionTest: Enable/disable additional collision checks during movement to prevent clipping through thin objects.

    • MovementCollisionTestDuration: Duration of the additional collision test after movement stops.

    • MovementCollisionTestMinLocationDelta: Minimum distance the camera must move to trigger the additional collision test.

    • MovementCollisionTestCollisionChannel: Collision channel used for the additional test.

  • Offsets:

    • SocketOffsetCurve: A curve that defines dynamic socket offsets based on camera distance.

    • SocketOffsetInterpolation: Interpolation method and speed for socket offset changes.

    • TargetOffset: A fixed offset applied to the camera target in world space.

    • TargetOffsetInterpolation: Interpolation method and speed for target offset changes.

  • Pitch Distance Modifier:

    • PitchDistanceCurve: A curve that modifies the camera distance based on the camera's pitch angle.

2. Rotation Settings:

  • View Limits:

    • ViewPitchMin: Minimum pitch angle (in degrees).

    • ViewPitchMax: Maximum pitch angle (in degrees).

    • ViewYawMin: Minimum yaw angle (in degrees).

    • ViewYawMax: Maximum yaw angle (in degrees).

  • Interpolation:

    • ViewInterpolation: Interpolation method and speed for transitions between camera modes affecting view limits.

  • Rotation Offset: Configure automatic camera pitch adjustments after the player manually rotates the view. This can create a more natural and relaxed camera feel.

    • bEnableRotationOffset: Enable/disable automatic camera pitch offset.

    • RotationOffsetSettings: Settings for the automatic pitch offset:

      • StartOffsetDelay: Delay before applying the offset after manual camera rotation.

        • RotationInterpolation: Interpolation method and speed for the offset.

          • PitchOffset: Target pitch offset value (in degrees).

            • bActivateOnlyIfMovement: Enable/disable offset only during character movement.

            • MinMovementSpeedForActivate: Minimum movement speed required to activate the offset.

  • Roof Collision Check: Enable the camera to automatically lower its pitch when obstructions are detected above the character, preventing clipping through ceilings or other overhead objects.

    • bEnableRoofCollisionCheckSettings: Enable/disable roof collision detection to lower the camera when obstructed.

    • RoofCollisionCheckSettings: Settings for roof collision detection:

      • TraceObjectTypes: Object types to check for collision.

      • EyesBoxTraceHalfSize: Half-size of the box trace used for initial collision detection from the character's eye position.

      • RoofTraceAngleFirst: Angle of the first trace used to check for obstructions above the character.

      • RoofBoxTraceHalfSizeFirst: Half-size of the box trace used for the first trace.

      • RoofTraceAngleSecond: Angle of the second trace used to check for obstructions above the camera.

      • RoofBoxTraceHalfSizeSecond: Half-size of the box trace used for the second trace.

      • RotationOffsetSettings: Settings for the pitch offset applied when a roof collision is detected.

  • View Rotation to Actor Rotation: Manage how the camera's rotation follows the character's movement direction, creating a more dynamic and responsive camera experience.

    • bEnableViewRotationToActorRotation: Enable/disable camera rotation following character movement.

    • ViewRotationToActorRotationSettings: Settings for camera rotation following:

      • MaxDeltaForChange: Maximum angle difference between the camera's yaw and the character's yaw before enabling the following behavior.

      • StartChangeDelay: Delay before enabling following after manual camera rotation.

      • RotationInterpolation: Interpolation method and speed for the camera's rotation towards the character's yaw.

  • Inheritance and Control Rotation:

    • bUsePawnControlRotation: Enable/disable using the pawn's view/control rotation instead of the component's relative rotation.

    • bInheritPitch: Inherit pitch rotation from the parent component (only when bUsePawnControlRotation is false).

    • bInheritYaw: Inherit yaw rotation from the parent component (only when bUsePawnControlRotation is false).

    • bInheritRoll: Inherit roll rotation from the parent component (only when bUsePawnControlRotation is false).

3. FOV Settings:

  • Base FOV:

    • CameraFOV: The base field of view (in degrees).

  • Interpolation:

    • FOVInterpolation: Interpolation method and speed for transitions between camera modes affecting FOV.

  • Modifiers:

    • PitchRotationFOVModifier: A curve that dynamically modifies the FOV based on the camera's pitch angle.

    • MovementSpeedFOVModifier: A curve that dynamically modifies the FOV based on the character's movement speed.

  • Cine Camera:

    • ChangeFOVWhenCineCamera: Enable/disable FOV changes when using a Cine Camera Component.

4. Fading Settings: Configure how objects in front of the camera fade out to improve visibility. Control fade times, target specific material parameters, and customize behavior for self-fading (character transparency).

  • Fade Times:

    • FadeInTime: Time (in seconds) for objects to fully fade in.

    • FadeOutTime: Time (in seconds) for objects to fully fade out.

  • Material Parameters:

    • MaterialFadeMinValue: Minimum value for the material parameter controlling the fade.

    • MaterialFadeMaxValue: Maximum value for the material parameter controlling the fade.

    • MaterialFadeParamNames: Array of material parameter names to affect during fading.

  • Trace Channel:

    • FadeChannel: Collision channel used to detect objects between the camera and the character for fading.

  • Self Fading:

    • bFadeSelfIfCollision: Enable/disable self-fading when the camera collides with the character.

    • bUseCustomFadeOutTimeForSelfFade: Enable/disable using a custom fade-out time for self-fading.

    • SelfFadeCustomFadeOutTime: Custom fade-out time (in seconds) for self-fading.

    • SelfFadeCheckRadius: Radius of the sphere used to detect camera collision with the character for self-fading.

    • bSelfFadeAttachedActors: Enable/disable fading attached actors along with the character during self-fading.

5. Follow Terrain Settings: Enable the camera to adapt to the terrain by dynamically adjusting its socket offset and pitch rotation based on ground angle, creating a more natural sense of movement.

  • Offset and Rotation Curves:

    • SocketOffsetCurve: A curve that modifies the camera's socket offset based on the terrain's angle.

    • PitchRotationCurve: A curve that modifies the camera's pitch rotation based on the terrain's angle.

  • Interpolation:

    • SocketOffsetInterpolation: Interpolation method and speed for socket offset changes when following terrain.

    • PitchRotationInterpolation: Interpolation method and speed for pitch rotation changes when following terrain.

  • Delay:

    • ChangePitchRotationDelay: Delay (in seconds) before applying offset and rotation changes after a terrain angle change.

6. Camera Shakes Settings:

  • Camera Shakes:

    • EnterToModeCameraShake: Camera shake asset to play when entering this camera mode.

    • RegularCameraShake: Looping camera shake asset to play during normal gameplay in this mode.

  • Shake Management:

    • bNeedStopAllCameraShakeOnEnterToCameraMode: Enable/disable stopping all existing camera shakes when entering this mode.

7. Lock On Target Settings: Implement a robust lock-on targeting system, allowing the camera to automatically track specified actors. Customize rotation behavior, distance limits, visibility checks, player input handling, and more.

  • Target Management:

    • bResetTargetOnChangeCameraMode: Enable/disable resetting the target when switching to a different camera mode.

  • Rotation Behavior:

    • RotateCameraByYaw: Enable/disable camera yaw rotation to track the target.

    • RotateCameraByPitch: Enable/disable camera pitch rotation to track the target.

  • Interpolation:

    • CameraRotationInterpolation: Interpolation method and speed for camera rotation when aiming at the target.

    • bResetInterpolationSpeedAfterChangeTarget: Enable/disable resetting interpolation speed after setting a new target.

  • Rotation Limits:

    • bClampByCameraModeRotationLimits: Enable/disable applying the camera mode's view limits when aiming at the target.

  • Distance Limits:

    • bUseMaxLockDistance: Enable/disable using a maximum lock distance.

    • bResetTargetOnReachMaxDistance: Enable/disable resetting the target when it exceeds the maximum lock distance.

    • MaxLockDistance: Maximum distance allowed between the camera and the target for locking.

  • Visibility Checks:

    • bUseCheckTargetVisibility: Enable/disable checking target visibility with line traces.

    • bResetLockOnLostVisibleTarget: Enable/disable resetting the target when it becomes obscured.

    • CheckVisibilityTraceChannel: Collision channel used for visibility line traces.

  • Player Input Behavior:

    • bHardLockOnTarget: Enable/disable hard lock, where player input is ignored, and the camera is forced to aim at the target.

    • bPauseLockAfterPlayerInput: Enable/disable pausing the lock after player input (only when bHardLockOnTarget is false).

    • PauseLockAfterPlayerInputTime: Duration of the pause after player input (in seconds).

    • bResetTargetAfterPlayerInput: Enable/disable resetting the target after a certain amount of player input (only when bHardLockOnTarget is false).

    • RequiredPlayerInputForResetTarget: Amount of player input (in degrees) required to trigger a target reset.

    • ResetAccumulatedPlayerInputForResetTargetDelay: Delay (in seconds) for resetting accumulated player input after input stops.

  • Cone Aiming:

    • bUseDesiredConeRotation: Enable/disable aiming within an approximate cone around the target.

    • DeisredConeRotationYaw: Yaw angle (in degrees) of the aiming cone.

Last updated