Camera Mode: Pacenote Orbit
Global orbit camera for the pacenote/rally editor. Orbits a fixed world-space target point with mouse/keyboard rotation, zoom, and terrain collision avoidance.
Global orbit camera for the pacenote/rally editor. Orbits a fixed world-space target point with mouse/keyboard rotation, zoom, and terrain collision avoidance.
Overview
Similar to the vehicle orbit camera but operates on a fixed world position instead of a vehicle. Used by the rally pacenote editor to inspect pacenote locations from any angle. Supports large zoom range (10–1500 units), keyboard WASD rotation, and ensures the camera stays above terrain.
Class Properties
| Property | Type | Default | Description |
|---|---|---|---|
isGlobal | bool | true | Available without a vehicle |
fixedTargetPos | vec3 | (0,0,0) | World-space point to orbit |
fov | number | 65 | Field of view (degrees) |
camRot | vec3 | defaultRotation | Current yaw/pitch |
defaultRotation | vec3 | (0, -17, 0) | Default rotation |
camDist | number | 300 | Current orbit distance |
camMinDist | number | 10 | Minimum zoom distance |
camMaxDist | number | 1500 | Maximum zoom distance |
defaultDistance | number | 300 | Default orbit distance |
Methods
| Method | Signature | Description |
|---|---|---|
init | C:init() | Initialize with defaults |
setupStuff | C:setupStuff() | Configure rotation/distance params |
onSettingsChanged | C:onSettingsChanged() | Reload orbit settings |
reset | C:reset() | Reset to default state |
setRef | C:setRef(center, left, back) | Set the fixed target position |
setDefaultDistance | C:setDefaultDistance(d) | Set default zoom |
update | C:update(data) | Process input, compute camera pose |
Keyboard + Mouse Rotation
-- Mouse rotation
local mouseYaw = sign(MoveManager.yawRelative) * math.min(...)
-- Keyboard rotation (WASD in editor)
local keyboardYaw = (MoveManager.left - MoveManager.right) * 80 * data.dt
self.camRot.x = self.camRot.x - mouseYaw - keyboardYawTerrain Clamping
-- Prevent camera from going below terrain
local terrainHeight = core_terrain.getTerrainHeight(vec3(camPos.x, camPos.y, 0))
if terrainHeight and camPos.z < terrainHeight + 1.0 then
camPos.z = terrainHeight + 1.0
endKey Notes
- Zoom uses
MoveManager.zoomIn/Outwith speed factor 3.0 - Pitch clamped to ±85°, yaw wraps to ±180°
- Resets
MoveManager.zoomIn/Outto 0 after reading (consumes input) data.res.collisionCompatible = trueset for potential collision post-processing- Camera always looks at
fixedTargetPosviaquatFromDir(target - pos)
See Also
- Camera Mode: Autopoint - Related reference
- Camera Mode: Autozoom - Related reference
- Camera Mode: Big Map - Related reference
- Core Systems Guide - Guide
Camera Mode: Orbit
The primary third-person vehicle camera. Orbits around the vehicle with mouse/gamepad rotation, dynamic FOV (dolly zoom), dynamic pitch, collision avoidance, and smooth relaxation-based auto-tracking.
Camera Mode: Path
Global camera that follows a spline path defined by markers. Uses Catmull-Rom interpolation for smooth position and rotation along timed control points. Supports replay synchronization, manual FOV, bu