Camera3D Module
Helper functions for 3D Cameras (Perspective / Orthographic projection).
Use these for first-person, third-person, or any 3D game rendering.
The raylib Camera3D is a native mutable struct. screenPointToRay takes it
by inref (use &camera); the config builders take it by value; the
constructors (create/orbit) and modifiers (withUp/asOrthographic)
return a new Camera3D.
Functions and values
| Function or value |
Description
|
|
|
|
Creates a perspective
Mirrors the MonoGame
|
Full Usage:
orbit target yaw pitch radius fovy
Parameters:
Vector3
-
Point the camera orbits around.
yaw : float32
-
Horizontal rotation angle in radians.
pitch : float32
-
Vertical rotation angle in radians.
radius : float32
-
Distance from target.
fovy : float32
-
Vertical field of view in **degrees**.
Returns: Camera3D
Modifiers: inline |
Creates an orbiting perspective Useful for third-person cameras, inspection views, or editor cameras. The field-of-view is in **degrees** (raylib convention).
|
|
Create a rendering config from a raylib camera. Defaults: fullscreen, no clear.
|
|
Creates a ray from screen coordinates for mouse/touch picking.
Thin wrapper over raylib's native
|
Full Usage:
splitScreenBottom camera clearColor
Parameters: Returns: Camera3DConfig
Modifiers: inline |
Split-screen bottom half. Clears with given color.
|
|
Split-screen left half. Clears with given color.
|
Full Usage:
splitScreenRight camera clearColor
Parameters: Returns: Camera3DConfig
Modifiers: inline |
Split-screen right half. Clears with given color.
|
|
Split-screen top half. Clears with given color.
|
Full Usage:
withClear color config
Parameters:
Color
config : Camera3DConfig
Returns: Camera3DConfig
Modifiers: inline |
Clear with this color before rendering.
|
|
|
Full Usage:
withViewport viewport config
Parameters:
Rectangle
config : Camera3DConfig
Returns: Camera3DConfig
Modifiers: inline |
Set viewport in normalized screen coordinates (0-1).
|
Mibo