Camera Path Editor
Editor tool for creating and editing camera paths with spline interpolation. Supports marker-based keyframes, replay linking, vehicle tracking, frustum visualization, camera preview, and overlay guide
Editor tool for creating and editing camera paths with spline interpolation. Supports marker-based keyframes, replay linking, vehicle tracking, frustum visualization, camera preview, and overlay guides.
Public Functions
| Function | Description |
|---|---|
M.onEditorGui() | Main per-frame UI and 3D rendering |
M.onEditorInitialized() | Registers edit mode, window, and menu items |
Key Features
- Spline Paths - Camera paths defined by time-stamped marker keyframes
- Replay Linking - Synchronize camera paths with vehicle replays
- Vehicle Tracking - Track vehicle center with configurable XYZ offset
- Frustum Visualization - 3D camera frustum cones at each marker
- Camera Preview - Real-time preview window with configurable aspect ratio
- Overlay Modes - Rule of thirds, 16, 9 composition guides
- Cut Support - Markers can be flagged as cuts (instant camera jumps)
- LOD Spline Resolution - Adaptive spline detail based on camera distance
Dependencies
M.dependencies = { 'core_camera' }
Overlay Modes
| Mode | Description |
|---|---|
| Rule of Thirds | Classic thirds grid overlay |
| 16 Aspect | Widescreen letterbox guide |
| 9 Aspect | Portrait/vertical guide |
Marker Data
Each camera path marker contains:
- Position and rotation (quaternion)
- Time stamp (seconds from start)
- FOV (field of view)
- Cut flag (instant jump vs smooth interpolation)
- Optional tracking target
Spline Resolution by Distance
| Distance | Resolution |
|---|---|
| < 300m | 0.1 |
| < 500m | 0.2 |
| < 1000m | 0.25 |
| > 1000m | 0.5 |
Module Variables
currentPath(table|nil) - The currently selected camera path object.dependencies(table) -{ 'core_camera' }
Functions
onExtensionLoaded()
Callback for extension loaded event.
onEditorInitialized()
Registers the camera path edit mode, tool windows, and keyboard shortcuts.
onEditorGui()
Main per-frame UI rendering, 3D marker visualization, spline drawing, and input handling.
onClientStartMission()
Resets the selected path to nil on mission start.
onPreRender()
Updates aspect ratio and draws camera overlay guides.
onUpdate(dtReal, dtSim, dtRaw)
Per-frame update callback (currently unused, reserved for future use).
dtReal(number)dtSim(number)dtRaw(number)
selectPath(path)
Selects a camera path and loads its associated replay if available.
path(table|nil) - Camera path object (fromcore_paths), or nil to deselect
getTrackingOffset()
Returns the vehicle tracking offset table if any offset is non-zero.
Returns: table|nil - {x, y, z} offset or nil if all zero
Additional Exports
M.getTrackingOffsetM.onClientStartMissionM.onExtensionLoadedM.onPreRenderM.onUpdateM.selectPath
See Also
- cameraBookmarks - Quick camera position bookmarks
- cameraTransform - Camera transform copy/paste
Camera Transform
Minimal editor tool for getting, setting, and copying the free camera transform as a JSON string.
CEF Helper
Minimal editor extension that manages CEF (Chromium Embedded Framework) UI visibility when entering/exiting editor mode. Currently disabled for release due to track editor bugs.