Open77.camera

Runs inside the game process. Reads and presentation are local; anything that changes shared state has to go through the server.

client runtime6 functionsMarkdown

attach

GAME

Open77.camera.attach()

Reattaches the camera to the body.

Attaches the Open77 camera to a game entity using the supplied local offset and rotation. Camera ownership is local to the resource generation; attaching replaces the resource's previous detached/attached camera state.

Returns

  • true on success, otherwise false
  • reason for the refusal

Registered in ResourceHost.cpp as LuaCameraAttach (line 6887).

detach

GAME

Open77.camera.detach(x, y, z)

Detaches the camera from the body, with an offset in the body's own space.

Detaches the Open77 camera from its target while retaining a controllable camera view. It does not synchronize a camera to other players and is automatically restored during resource cleanup.

Parameters

  • xnumberrequired
  • ynumberrequired
  • znumberrequired

Returns

  • true on success, otherwise false
  • reason for the refusal

Registered in ResourceHost.cpp as LuaCameraDetach (line 6886).

Open77.camera.project(position)

Projects a world point into normalized WebUI viewport coordinates.

Uses REDengine's active camera projection. (0,0) is the top-left and (1,1) the bottom-right. onScreen is false for points behind the view or beyond the viewport.

Parameters

  • positiontable { x, y, z }required

Returns

  • table { x, y, depth, distance, onScreen }, or nil
  • reason

Registered in ResourceHost.cpp as LuaCameraProject (line 6890).

setFov

GAME

Open77.camera.setFov(degrees)

Sets the field of view, in degrees.

Changes the field of view of the camera currently controlled by Open77. The value is validated by the native backend and applies only to this client's presentation.

Parameters

  • degreesnumberrequired

Returns

  • true on success, otherwise false
  • reason for the refusal

Example

Open77.camera.setFov(90)

Registered in ResourceHost.cpp as LuaCameraFieldOfView (line 6888).

Open77.camera.thirdPerson(enabled, [distance], [height])

Switches the view to third person.

Turning it off restores the view the game had before the call, rather than some default.

Parameters

  • enabledbooleanrequired
  • distancenumberoptional
  • heightnumberoptional

Returns

  • true on success, otherwise false
  • reason for the refusal

Example

Open77.camera.thirdPerson(true, 2.5, 1.7)

Registered in ResourceHost.cpp as LuaCameraThirdPerson (line 6885).

view

GAME

Open77.camera.view()

Where the view is: position, forward vector, field of view.

Returns the latest game-thread camera snapshot used by projection and presentation APIs. It is a same-client read and may return nil, reason while the game camera is unavailable.

Returns

  • position (x, y, z)
  • forward (x, y, z)
  • field of view

Registered in ResourceHost.cpp as LuaCameraView (line 6889).

For agents and LLMs: this page as Markdown · llms.txt · llms-full.txt