CameraRig
Since 0.6
Signature
export interface CameraRig {
readonly kind: CameraKind
/** The pose computed by the last `update`. */
readonly pose: CameraPose
readonly yaw: number
readonly pitch: number
/** The entity this rig tracks, for `ctx.camera.follow`; null for a rig pinned to a point. */
followTarget(ctx: Ctx): EntityHandle | null
/** Recompute the pose for this tick. Pure except for the sphere cast a collision rig performs. */
update(ctx: Ctx, dt: number, input: RigInput): CameraPose
/** Adopt a heading handed over by the rig a transition is coming from. Absent on rigs that cannot turn. */
setHeading?(yaw: number, pitch: number): void
/**
* True when the rig names no fov of its own and draws at the view's (the scene camera's): the
* director sends `fov: null`, so the scene camera's number stands. Absent means false.
*/
readonly inheritsFov?: boolean
/** Extra `ctx.camera.set` params for the engine rig (wall handling, for a boom rig). Absent when there are none. */
engineParams?(): Record<string, unknown>
}
Import: import type { CameraRig } from "@argus/gameplay"
Members
| Member | Signature | Description |
|---|---|---|
kind | readonly kind: CameraKind | |
pose | readonly pose: CameraPose | The pose computed by the last update. |
yaw | readonly yaw: number | |
pitch | readonly pitch: number | |
followTarget | followTarget(ctx: Ctx): EntityHandle | null | The entity this rig tracks, for ctx.camera.follow; null for a rig pinned to a point. |
update | update(ctx: Ctx, dt: number, input: RigInput): CameraPose | Recompute the pose for this tick. Pure except for the sphere cast a collision rig performs. |
setHeading | setHeading?(yaw: number, pitch: number): void | Adopt a heading handed over by the rig a transition is coming from. Absent on rigs that cannot turn. |
inheritsFov | readonly inheritsFov?: boolean | True when the rig names no fov of its own and draws at the view's (the scene camera's): the director sends fov: null, so the scene camera's number stands. Absent means false. |
engineParams | engineParams?(): Record<string, unknown> | Extra ctx.camera.set params for the engine rig (wall handling, for a boom rig). Absent when there are none. |