API ReferenceGE ExtensionscorecameraModes
Camera Mode: Free Camera
Detached free-fly camera with Newton physics for smooth movement. Supports keyboard/mouse/gamepad/3D spacemouse input, configurable smoothing, and manual zoom.
Detached free-fly camera with Newton physics for smooth movement. Supports keyboard/mouse/gamepad/3D spacemouse input, configurable smoothing, and manual zoom.
Class API
| Method | Signature | Description |
|---|---|---|
C:init | () | Initializes as global hidden camera, sets physics defaults |
C:reset | () | Zeroes velocity, resets zoom, clears roll |
C:setSmoothedCam | (smoothed) | Toggles between smooth (cinematic) and snappy (editor) physics |
C:setPosition | (position) | Sets camera world position |
C:setFOV | (fovDeg) | Sets field of view |
C:setRotation | (rotation) | Sets camera rotation from quaternion |
C:setNewtonRotation | (enabled) | Enables/disables rotation momentum |
C:setNewtonTranslation | (enabled) | Enables/disables translation momentum |
C:update | (data) | Applies physics simulation for rotation and translation |
Properties
| Property | Type | Default | Description |
|---|---|---|---|
isGlobal | boolean | true | Singleton, always exists |
hidden | boolean | true | Not in camera cycle |
pos | vec3 | (0,0,0) | World position |
rot | vec3 | (0,0,0) | Euler angles (yaw, pitch, roll) |
Physics Modes
Snappy (default)
| Parameter | Value |
|---|---|
| Angular force | 400 |
| Angular drag | 16 |
| Mass | 1 |
| Translation force | 250 |
| Translation drag | 17 |
Smooth (cinematic)
| Parameter | Value |
|---|---|
| Angular force | 150 |
| Angular drag | 2.5 |
| Mass | 10 |
| Translation force | 600 |
| Translation drag | 2 |
Movement
- Translation uses force-based acceleration with drag deceleration
- Speed scales quadratically:
(speed² / 30) / 40 - Fast speed modifier (shift) triples speed
- Rotation is Euler-based with pitch clamped to ±90°
- Newton physics can be disabled for instant response
Usage Examples
-- Enter free camera
core_camera.setGlobalCameraByName("free")
-- Position the free camera
core_camera.setPosition(0, vec3(100, 200, 50))
core_camera.setRotation(0, quat(0, 0, 0.7, 0.7))
core_camera.setFOV(0, 45)
-- Toggle smooth cinematic movement
core_camera.setSmoothedCam(0, true)
-- Direct position + rotation set
core_camera.setPosRot(0, 100, 200, 50, 0, 0, 0.7, 0.7)Notes
- 3D spacemouse supported via
absXAxis/absYAxis/absZAxisandyawAbs/pitchAbs/rollAbs - Manual zoom uses the
manualzoomsub-module - Translation is applied in camera-local space (rotated by current orientation)
See Also
- Camera Mode: Autopoint - Related reference
- Camera Mode: Autozoom - Related reference
- Camera Mode: Big Map - Related reference
- Core Systems Guide - Guide
Camera Mode: Fallback
Minimal global filter camera that ensures `pos` and `rot` are always defined. Acts as a safety net in the camera pipeline, running at order 0.6.
Camera Mode: Game Engine
Final-stage camera filter that commits the computed camera state to the engine. Handles OpenXR/VR pose integration before pushing position, rotation, FOV, and near clip to the renderer.