Skip to content

CameraKey beta ​

Interface of @v12-engine/client

ts
export interface CameraKey

Where the camera goes: a spot, or an entity where it is then, and from how far, which way and how steeply; and what a shot adds (B1): the lens, the roll, the height of the point looked at, and a point or an entity to look at instead of it (see CinematicPose)

Members ​

at ​

ts
at?: Vec2 | {
        entity: number;
    };

Where the camera looks: a spot on the map in cells, or an entity by id where it is then

distance ​

ts
distance?: number;

How far the camera stands from the spot it looks at

fov ​

ts
fov?: number;

The lens, in degrees from top to bottom: 34 is the RTS view's

height ​

ts
height?: number;

How far above the ground the point looked at is

lookAt ​

ts
lookAt?: {
        x: number;
        z: number;
        y?: number;
    } | {
        entity: number;
    };

What the camera turns to while it stands where the rest puts it: a spot (y above the ground), or an entity where it is each frame

pitch ​

ts
pitch?: number;

Radians between the view and the ground

roll ​

ts
roll?: number;

The horizon tilted, in radians

yaw ​

ts
yaw?: number;

Radians around the vertical axis, 0 looking north