Skip to content

Camera

The free camera. A plugin puts the game’s camera in the scene and steers it through here each frame. Any thread.

Get it with Api.camera().

claim(changed: Wraith.Lease.Changed | null): Wraith.Lease
steer(entity: number | bigint, camera: import("salamander").Given<Wraith.FreeCamera.State>): void
focus(point: import("salamander").Given<Wraith.Vec3>): void
active(): boolean

A lease on the game’s camera, see Lease. Only the holder’s steer counts.

Fails with LeaseError. Uses Lease.Changed, Lease.

Every frame from where the game sets its camera; Wraith overrides it while the free camera’s on. entity is the key of the camera on screen, which Wraith views the game through. Set its transform and camera in the scene once it’s applied. Lease holder only.

Uses FreeCamera.State.

Turns the free camera on and orbits it round point.

Uses Vec3.

Which of the camera’s fields say where it points.

An enum of u8.

Value Name
0 target At target, tipped by roll
1 rotation By rotation

A struct, 0x40 bytes, aligned to 4.

Offset Field Type
0x0 position Vec3
0xc aim FreeCamera.Aim
0x10 target Vec3
0x1c up Vec3
0x28 rotation Quat
0x38 roll f32
0x3c fov f32 In radians
position: Wraith.Vec3
aim: Wraith.FreeCamera.Aim
target: Wraith.Vec3
up: Wraith.Vec3
rotation: Wraith.Quat
roll: number
fov: number

Made with ♥ by Asgard