PlatformFollowOptions
@zylem/game-lib / core / PlatformFollowOptions
Interface: PlatformFollowOptions
Defined in: packages/game-lib/src/lib/camera/behaviors/platform-follow.ts:22
Options for the Super Mario World style follow.
delay lerps toward the target and can wait inside a deadzone.
settle holds still while the axis is moving (a jump, a lane change) and
eases to the new rest once the axis goes quiet — landing on a platform.
off leaves that axis of the incoming pose alone.
Properties
axes?
optionalaxes?:PlatformAxisModes
Defined in: packages/game-lib/src/lib/camera/behaviors/platform-follow.ts:29
Per-axis mode. Default: x and z delay, y settles. Vertical jumps do not drag the camera; landing does. The same settle mode works on a horizontal axis.
lerpFactor?
optionallerpFactor?:number
Defined in: packages/game-lib/src/lib/camera/behaviors/platform-follow.ts:34
Interpolation factor for delay axes, in 0..1 per 60Hz frame.
1 = instant. Scaled by dt. Default 0.1.
lookahead?
optionallookahead?:number
Defined in: packages/game-lib/src/lib/camera/behaviors/platform-follow.ts:50
World units of lookahead along the last travel direction.
Applied on delay axes only. Default 0.
settleLerp?
optionalsettleLerp?:number
Defined in: packages/game-lib/src/lib/camera/behaviors/platform-follow.ts:45
Interpolation factor used once a settle axis has a new rest. Default 0.08.
settleSpeed?
optionalsettleSpeed?:number
Defined in: packages/game-lib/src/lib/camera/behaviors/platform-follow.ts:41
Speed, in units/second, at or below which a settle axis counts as resting. Default 0.75.
settleTime?
optionalsettleTime?:number
Defined in: packages/game-lib/src/lib/camera/behaviors/platform-follow.ts:43
Seconds a settle axis must stay slow before the focus accepts the new rest. Default 0.15.
targetKey?
optionaltargetKey?:string
Defined in: packages/game-lib/src/lib/camera/behaviors/platform-follow.ts:24
Key in CameraContext.targets to follow. Default 'primary'.
window?
optionalwindow?:number
Defined in: packages/game-lib/src/lib/camera/behaviors/platform-follow.ts:39
Deadzone in world units for delay axes. The focus holds until the
target (plus lookahead) leaves this window. Default 0.