makeCameraRigSystem
makeCameraRigSystem<
TCtx>(options):SchedulableSystem<TCtx>
Defined in: src/modules/camera-3d/rigs.ts:256
Returns a system that, each tick, poses every cameraTag-tagged entity from
its rig — writing its Position3D and Rotation3D — relative to the first
targetTag-tagged entity. Only the rig components a world registers are
looked up, so a world registers just the rigs it uses.
FirstPersonRig: at the target pluseyeHeight, rotated by yaw / pitch.OrbitRig: around the target (see orbitPose), always looking at it.ChaseRig: in the target’s frame (see chasePose); reads the target’sRotation3D, treating a missing one as unrotated.
Smoothing needs ctx.dtMs; without it the rigs snap. Pitch and distance are
clamped to the rig’s limits when posing, without writing them back. With no
target the tick is a no-op. A camera carrying more than one rig throws — which
rig wins would otherwise depend on lookup order.
Type Parameters
Section titled “Type Parameters”TCtx extends CameraRigTickCtx
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”SchedulableSystem<TCtx>