FirstPersonOptions
@zylem/game-lib / core / FirstPersonOptions
Interface: FirstPersonOptions
Defined in: packages/game-lib/src/lib/camera/perspectives/first-person-perspective.ts:8
Configuration for the first-person perspective.
Properties
defaultFov?
optionaldefaultFov?:number
Defined in: packages/game-lib/src/lib/camera/perspectives/first-person-perspective.ts:12
Default field of view in degrees.
Default
75
eyeHeight?
optionaleyeHeight?:number
Defined in: packages/game-lib/src/lib/camera/perspectives/first-person-perspective.ts:10
Vertical offset above the target entity's position (eye height).
Default
1.7
fovLerpSpeed?
optionalfovLerpSpeed?:number
Defined in: packages/game-lib/src/lib/camera/perspectives/first-person-perspective.ts:18
Lerp speed for FOV zoom transitions.
Default
8
initialLookAt?
optionalinitialLookAt?:Vec3Input
Defined in: packages/game-lib/src/lib/camera/perspectives/first-person-perspective.ts:24
Fallback look-at point used to derive initial yaw/pitch when no target.
initialPosition?
optionalinitialPosition?:Vec3Input
Defined in: packages/game-lib/src/lib/camera/perspectives/first-person-perspective.ts:22
Fallback position when no target entity is attached.
lookAtLerpSpeed?
optionallookAtLerpSpeed?:number
Defined in: packages/game-lib/src/lib/camera/perspectives/first-person-perspective.ts:16
Lerp speed for smooth look-at transitions.
Default
5
pitchLimit?
optionalpitchLimit?:number
Defined in: packages/game-lib/src/lib/camera/perspectives/first-person-perspective.ts:14
Maximum pitch angle in radians.
Default
Math.PI/2 - 0.01
targetKey?
optionaltargetKey?:string
Defined in: packages/game-lib/src/lib/camera/perspectives/first-person-perspective.ts:20
Key in CameraContext.targets to follow.
Default
'primary'
verticalSmoothing?
optionalverticalSmoothing?:number
Defined in: packages/game-lib/src/lib/camera/perspectives/first-person-perspective.ts:33
Vertical (eye-height) smoothing factor in 0..1, applied per 60Hz frame. 1 = instant snap (no smoothing), lower = smoother. Hides physics micro-jitter and Rapier sub-step Y corrections without adding perceptible input lag. Smooths only Y; X/Z still snap to the target every frame so horizontal aim is never laggy.
Default
1 (disabled)