Skip to main content

SecondPersonOptions

@zylem/game-lib


@zylem/game-lib / core / SecondPersonOptions

Interface: SecondPersonOptions

Defined in: packages/game-lib/src/lib/camera/perspectives/second-person-perspective.ts:11

Configuration for the second-person perspective.

The camera sits on another entity (anchorKey) and looks at the subject. Nothing here reads player look input.

Properties​

anchorKey?​

optional anchorKey?: string

Defined in: packages/game-lib/src/lib/camera/perspectives/second-person-perspective.ts:13

Key of the entity whose eyes the camera uses. Default 'anchor'.


eyeHeight?​

optional eyeHeight?: number

Defined in: packages/game-lib/src/lib/camera/perspectives/second-person-perspective.ts:17

Height above the anchor's position. Default 1.7.


fov?​

optional fov?: number

Defined in: packages/game-lib/src/lib/camera/perspectives/second-person-perspective.ts:19

Perspective field of view. Default 75.


initialLookAt?​

optional initialLookAt?: Vec3Input

Defined in: packages/game-lib/src/lib/camera/perspectives/second-person-perspective.ts:23

Fallback lookAt point when the anchor is missing.


initialPosition?​

optional initialPosition?: Vec3Input

Defined in: packages/game-lib/src/lib/camera/perspectives/second-person-perspective.ts:21

Fallback camera position when the anchor is missing.


subjectKey?​

optional subjectKey?: string

Defined in: packages/game-lib/src/lib/camera/perspectives/second-person-perspective.ts:15

Key of the entity to look at. Default 'primary'.