Header menu logo Mibo

Camera Type

A universal Camera definition containing View and Projection matrices.

This struct is renderer-agnostic - both 2D and 3D renderers use the same type. Use the Camera2D or Camera3D modules to create cameras.

Example

 // 2D camera centered on player
 let camera = Camera2D.create playerPos 1.0f viewportSize

 // 3D camera looking at origin
 let camera = Camera3D.lookAt position Vector3.Zero Vector3.Up fov aspect 0.1f 1000f
val camera: obj

Record fields

Record Field Description

Projection

Full Usage: Projection

Field type: Matrix

The projection matrix (perspective/orthographic, transforms view to clip space).

Field type: Matrix

View

Full Usage: View

Field type: Matrix

The view matrix (camera position/rotation, transforms world to view space).

Field type: Matrix

Type something to start searching.