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§
- Camera
Composer - Camera
Shake - Allocation-free seeded shake, driven only by explicitly supplied delta time.
- Camera
Zone - Follow2
- A planar follow camera. The first valid update initializes directly at its goal; subsequent updates apply the configured dead zone and half-life.
- Follow2
Settings - Frame2
- Frame3
- Framing
Bounds - 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. - Framing
Result - 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. - Framing
Settings - Checked perspective framing constraints. All fields are revalidated on use.
- Input3
- Limits2
- NoObstructions
- Obstruction
Settings - Pose3
- Rig3
- Copyable complete presentation state; update errors preserve it unchanged.
- Rigid
Obstructions - 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
- Shake
Envelope - An owned snapshot of an active impulse; changing it does not change the shake.
- Shake
Impulse - Bounded local-space motion with a quadratic decay envelope.
- Shake
Sample - Sweep
- A sphere-center segment. Equal endpoints perform a stationary overlap check.
Use
Sweep::newto check inputs, orSweep::probeto also check adapter results and obtain distances and a padded placement. - Sweep
Outcome - 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-onlyCollisionQueryabstraction. - 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.
- Camera
Error - Framing
Error - A rejected framing request. No camera or composer state is changed.
- Framing
Limit - 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§
- Collision
Query - 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). UseSweep::probefor checked results and padded clearance without changing this adapter contract.