BBMOD_BaseCamera

Extends BBMOD_Class

constructor

new BBMOD_BaseCamera()

Description

A camera with support for both orthographic and perspective projection.

Properties

Name Description
AspectRatio The camera's aspect ratio. Defaults to window_get_width() / window_get_height().
AudioListener If true then the camera updates position and orientation of the 3D audio listener in the BBMOD_BaseCamera.update_matrices method. Defaults to true.
Exposure The camera's exposure value. Defaults to 1.
Fov The camera's field of view. Defaults to 60.
Orthographic Use true to enable orthographic projection. Defaults to false (perspective projection).
Position The camera's positon. Defaults to (0, 0, 0).
Raw An underlying GameMaker camera.
Target A position where the camera is looking at.
Up The up vector.
ViewProjectionMatrix The view * projection matrix.
Width The width of the orthographic projection. Height is computed using BBMOD_BaseCamera.AspectRatio. Defaults to the window's width.
ZFar Distance to the far clipping plane. Anything farther from the camera than this will not be visible. Defaults to 32768.
ZNear Distance to the near clipping plane. Anything closer to the camera than this will not be visible. Defaults to 0.1.

Methods

Name Description
apply Applies the camera.
get_forward Retrieves a vector pointing forward in the camera's direction.
get_proj_mat Retrieves camera's projection matrix.
get_right Retrieves a vector pointing right relative to the camera's direction.
get_up Retrieves a vector pointing up relative to the camera's direction.
get_view_mat Retrieves camera's view matrix.
screen_point_to_vec3 Unprojects a position on the screen into a direction in world-space.
update Updates camera's matrices.
update_matrices Recomputes camera's view and projection matrices.
world_to_screen Computes screen-space position of a point in world-space.

See also

BBMOD_Camera

Do you find this page helpful?

Copyright © 2022, BlueBurn. Built on December 31, 2022 using GMDoc.