Module camera

Expand description

Shared follow, orbit, chase and first-person presentation rigs. Shared presentation rigs and a current-pose rigid-physics obstruction adapter.

Modules§

rail
Optional presentation-only intro/result rails, sampled at caller-owned seconds.
transition
Opt-in, checked camera presentation blends. No clock, simulation, collision queries, input, or authoritative pose history is owned here.

Structs§

CameraComposer
CameraShake
Allocation-free seeded shake, driven only by explicitly supplied delta time.
CameraZone
Follow2
A planar follow camera. The first valid update initializes directly at its goal; subsequent updates apply the configured dead zone and half-life.
Follow2Settings
Frame2
Frame3
FramingBounds
An axis-aligned world-space subject box. Equal endpoints on any axis are allowed, including a point subject. Each coordinate must be within ±1e6. Bounds are checked by FramingSettings::frame, including public-field edits.
FramingResult
A perspective framing solution, before damping, obstruction and shake. The host must use the same aspect and vertical FOV, a near clip plane no larger than the requested near, and a sufficiently distant far clip plane. Floating-point projection retains ordinary f32 rounding error.
FramingSettings
Checked perspective framing constraints. All fields are revalidated on use.
Input3
Limits2
NoObstructions
ObstructionSettings
Pose3
Rig3
Copyable complete presentation state; update errors preserve it unchanged.
RigidObstructions
Filter by collider membership and ignore all parts of the followed body. Current compound/local transforms are read directly; no query sync is needed.
Settings3
ShakeEnvelope
An owned snapshot of an active impulse; changing it does not change the shake.
ShakeImpulse
Bounded local-space motion with a quadratic decay envelope.
ShakeSample
Sweep
A sphere-center segment. Equal endpoints perform a stationary overlap check. Use Sweep::new to check inputs, or Sweep::probe to also check adapter results and obtain distances and a padded placement.
SweepOutcome
Diagnostics from Sweep::probe, describing only the queried segment. Distances are sphere-center travel in world units, not surface separation. No penetration depth, surface normal or blocker identity is inferred from the fraction-only CollisionQuery abstraction.
Target3

Enums§

Blocker
A small built-in adapter for authored environments. Box sweeps inflate the local box by radius and are conservative at corners; physics adapters may provide exact rounded-box/primitive sphere sweeps through CollisionQuery.
CameraError
FramingError
A rejected framing request. No camera or composer state is changed.
FramingLimit
How authored distance limits affected a framing result.
Mode3

Constants§

MAX_BLOCKERS
MAX_FRAMING_SUBJECTS
Maximum number of subject boxes examined by one framing calculation.

Traits§

CollisionQuery
Return the first sphere-center impact fraction in [0,1], or None if clear. A blocked starting point must return Some(0), including zero-length sweeps. Stationary sweeps must return only None or Some(0). Use Sweep::probe for checked results and padded clearance without changing this adapter contract.