The camera rail system evaluates predefined spline camera paths for scripted
sequences. Designers provide timed rail points, and the runtime returns a
camera-manager Rail mode with sampled position, rotation, FOV, and blend
duration.
Runtime Surface#
FV2CameraRailConfigconfigures rail id, duration, looping, cubic spline sampling, time clamping, optional tangent orientation, default FOV, and blend duration.FV2CameraRailStatecarries playback time, delta seconds, play rate, and playing state.FV2CameraRailPointcarries point id, timestamp, camera location, rotation, and FOV.FV2CameraRailEvaluationreturns resolved rail time, normalized alpha, segment index, sampled pose, FOV, blend time, loop/end flags, mode spec, and validation issues.
Rail Rules#
- Invalid config, state, point data, or fewer than two points is blocking.
- Point times must be strictly increasing.
- Duration comes from
DurationSecondswhen set, otherwise from the last rail point time. - Playback time advances by
DeltaSeconds * PlayRateonly while playing. - Looping rails wrap time with
FMath::Fmodand reportRailLooped. - Non-looping rails clamp to the rail duration and report
EndReachedat the end. - Cubic spline sampling uses Catmull-Rom interpolation for location, with shortest-path rotation and linear FOV interpolation.
Camera Manager Export#
EvaluateCameraRail fills ModeSpec using the rail id and
EV2CameraModeType::Rail. BuildCameraRailMode can export a custom mode id,
priority, and active flag for camera stacks while preserving the sampled rail
pose.
Validation Commands#
Run these targeted checks when touching camera rails:
bash
python3 V2/ue/Tools/check-v2-camera-rail.py
python3 V2/ue/Tools/check-v2-camera-manager.py
python3 V2/ue/Tools/check-v2-ci-workflow.py
python3 -m json.tool V2/ue/Content/V2/Gameplay/Camera/CameraRail_V2_Contract.json
python3 -m py_compile V2/ue/Tools/check-v2-camera-rail.py