ThirdPersonOptions
@zylem/game-lib / core / ThirdPersonOptions
Interface: ThirdPersonOptions
Defined in: packages/game-lib/src/lib/camera/perspectives/third-person-perspective.ts:8
Configuration for the third-person perspective.
Properties
distance?
optionaldistance?:number
Defined in: packages/game-lib/src/lib/camera/perspectives/third-person-perspective.ts:10
Distance behind the target. Default 8.
fov?
optionalfov?:number
Defined in: packages/game-lib/src/lib/camera/perspectives/third-person-perspective.ts:18
Perspective field of view. Default 75.
height?
optionalheight?:number
Defined in: packages/game-lib/src/lib/camera/perspectives/third-person-perspective.ts:12
Height above the target. Default 5.
initialLookAt?
optionalinitialLookAt?:Vec3Input
Defined in: packages/game-lib/src/lib/camera/perspectives/third-person-perspective.ts:26
Fallback lookAt point when no targets exist.
initialPosition?
optionalinitialPosition?:Vec3Input
Defined in: packages/game-lib/src/lib/camera/perspectives/third-person-perspective.ts:24
Fallback camera position when no targets exist (e.g. the user-specified initial position).
minDistance?
optionalminDistance?:number
Defined in: packages/game-lib/src/lib/camera/perspectives/third-person-perspective.ts:22
Minimum camera distance when multi-framing. Default 5.
paddingFactor?
optionalpaddingFactor?:number
Defined in: packages/game-lib/src/lib/camera/perspectives/third-person-perspective.ts:20
Padding multiplier when framing multiple targets. Default 1.5.
shoulderOffset?
optionalshoulderOffset?:number
Defined in: packages/game-lib/src/lib/camera/perspectives/third-person-perspective.ts:14
Lateral offset from the target (shoulder cam). Default 0.
targetKey?
optionaltargetKey?:string
Defined in: packages/game-lib/src/lib/camera/perspectives/third-person-perspective.ts:16
Key in CameraContext.targets to follow. Default 'primary'.
trailBufferSize?
optionaltrailBufferSize?:number
Defined in: packages/game-lib/src/lib/camera/perspectives/third-person-perspective.ts:40
Maximum number of samples to keep in the trailing ring buffer.
Sized to cover ~1 s at 120 Hz; larger only matters if trailDelay is
raised significantly. Default 120.
trailDelay?
optionaltrailDelay?:number
Defined in: packages/game-lib/src/lib/camera/perspectives/third-person-perspective.ts:34
Seconds the camera lags behind the target's actual position. The camera
samples target moves from now - trailDelay so brief, fast Y motion
(jump apex / fall start) doesn't get tracked 1:1 — eliminates the
shimmer-on-fall effect at high refresh rates. 0 disables the trail and
restores instantaneous tracking. Default 0.1 (100 ms).