Skip to main content

FollowTargetOptions

@zylem/game-lib


@zylem/game-lib / core / FollowTargetOptions

Interface: FollowTargetOptions

Defined in: packages/game-lib/src/lib/camera/behaviors/follow-target.ts:9

Options for the followTarget behavior.

Properties​

lerpFactor?​

optional lerpFactor?: number

Defined in: packages/game-lib/src/lib/camera/behaviors/follow-target.ts:20

Interpolation factor in 0..1, applied per 60Hz frame. 1 = instant snap, lower = smoother follow. The per-frame rate is scaled by dt so tracking speed is identical across refresh rates (60/120/144Hz). Default 0.1.


offset?​

optional offset?: Vec3Input

Defined in: packages/game-lib/src/lib/camera/behaviors/follow-target.ts:13

Position offset from the target. Default (0, 0, 0).


targetKey?​

optional targetKey?: string

Defined in: packages/game-lib/src/lib/camera/behaviors/follow-target.ts:11

Key in CameraContext.targets to follow. Default 'primary'.