Header menu logo Mibo

Camera Module

Functions and values

Function or value Description

at pos c

Full Usage: at pos c

Parameters:
Returns: Camera
Modifiers: inline

Sets the world-space position of the camera.

pos : Vector3
c : Camera
Returns: Camera

boundingFrustum camera

Full Usage: boundingFrustum camera

Parameters:
Returns: BoundingFrustum

Calculates the BoundingFrustum for the camera.

camera : Camera
Returns: BoundingFrustum

identity

Full Usage: identity

Returns: Camera

Identity camera (for testing).

Returns: Camera

lookAt position target c

Full Usage: lookAt position target c

Parameters:
Returns: Camera

Positions the camera to look at a target from a specific position.

position : Vector3
target : Vector3
c : Camera
Returns: Camera

lookingAt target c

Full Usage: lookingAt target c

Parameters:
Returns: Camera
Modifiers: inline

Sets the target point the camera is looking at.

target : Vector3
c : Camera
Returns: Camera

orbit target yaw pitch distance c

Full Usage: orbit target yaw pitch distance c

Parameters:
    target : Vector3
    yaw : float32
    pitch : float32
    distance : float32
    c : Camera

Returns: Camera

Full orbit configuration around a target.

target : Vector3
yaw : float32
pitch : float32
distance : float32
c : Camera
Returns: Camera

orthographic position target up width height near far

Full Usage: orthographic position target up width height near far

Parameters:
    position : Vector3
    target : Vector3
    up : Vector3
    width : float32
    height : float32
    near : float32
    far : float32

Returns: Camera

Create an orthographic camera. (Backward compatibility)

position : Vector3
target : Vector3
up : Vector3
width : float32
height : float32
near : float32
far : float32
Returns: Camera

perspective position target up fov aspect near far

Full Usage: perspective position target up fov aspect near far

Parameters:
    position : Vector3
    target : Vector3
    up : Vector3
    fov : float32
    aspect : float32
    near : float32
    far : float32

Returns: Camera

Create a perspective camera. (Backward compatibility)

position : Vector3
target : Vector3
up : Vector3
fov : float32
aspect : float32
near : float32
far : float32
Returns: Camera

perspectiveDefaults

Full Usage: perspectiveDefaults

Returns: Camera

Standard perspective camera with sensible defaults.

Returns: Camera

rebuildProjection c

Full Usage: rebuildProjection c

Parameters:
Returns: Matrix

Recomputes the projection matrix based on Fov, Aspect, Near, and Far.

c : Camera
Returns: Matrix

rebuildView c

Full Usage: rebuildView c

Parameters:
Returns: Matrix

Recomputes the view matrix based on Position, Target, and Up.

c : Camera
Returns: Matrix

screenPointToRay camera screenPos viewport

Full Usage: screenPointToRay camera screenPos viewport

Parameters:
Returns: Ray

Creates a ray from screen coordinates for mouse/touch picking.

camera : Camera
screenPos : Vector2
viewport : Viewport
Returns: Ray

withAngles yaw pitch c

Full Usage: withAngles yaw pitch c

Parameters:
    yaw : float32 - Horizontal rotation in radians.
    pitch : float32 - Vertical rotation in radians.
    c : Camera

Returns: Camera

Orbits the camera around its current target using spherical angles.

yaw : float32

Horizontal rotation in radians.

pitch : float32

Vertical rotation in radians.

c : Camera
Returns: Camera

withAspect aspect c

Full Usage: withAspect aspect c

Parameters:
Returns: Camera
Modifiers: inline

Sets the aspect ratio (Width / Height).

aspect : float32
c : Camera
Returns: Camera

withDistance distance c

Full Usage: withDistance distance c

Parameters:
Returns: Camera

Offsets the camera position along its current forward axis by a distance from the target. Useful for zooming or maintaining distance in an orbit.

distance : Vector3
c : Camera
Returns: Camera

withFov fov c

Full Usage: withFov fov c

Parameters:
Returns: Camera
Modifiers: inline

Sets the Field of View in radians.

fov : float32
c : Camera
Returns: Camera

withRange near far c

Full Usage: withRange near far c

Parameters:
    near : float32
    far : float32
    c : Camera

Returns: Camera
Modifiers: inline

Sets the near and far clipping planes.

near : float32
far : float32
c : Camera
Returns: Camera

withUp up c

Full Usage: withUp up c

Parameters:
Returns: Camera
Modifiers: inline

Sets the world-space "up" vector (typically Vector3.Up).

up : Vector3
c : Camera
Returns: Camera

Type something to start searching.