Documentation

Camera plugin dependency

The Camera plugin dependency allows you to perform camera-related calculations, such as projecting 3D worldspace coordinates to 2D screenspace coordinates. This dependency plugin was added to Openplanet for Trackmania in 1.24.4.

API

The API consists of the following functions:

Camera::ToScreenSpace

Projects a 3D point to screen space in 2D from the current camera.

Parameters:

  • const vec3 &in pos The 3D point to project.

Returns: vec2

Camera::IsBehind

Returns true if the 3D point is behind the camera.

Parameters:

  • const vec3 &in pos The 3D point to project.

Returns: bool

Camera::GetCurrent

Gets the current camera used for rendering.

Returns: CHmsCamera@

Camera::GetProjectionMatrix

Gets the projection matrix of the current camera, if there is one.

Returns: mat4


Page updated 4 months ago by Miss