Camera3D

class Camera3D(raw: ERROR CLASS: Symbol not found for raylib.internal.Camera3D)

Represents a 3D Camera representing what the user is seeing.

Constructors

Link copied to clipboard
constructor(raw: ERROR CLASS: Symbol not found for raylib.internal.Camera3D)
constructor(position: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float>, target: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float>, up: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float> = 0f to 1f to 0f, fovy: Float = 45.0f, projection: CameraProjection3D = CameraProjection3D.PERSPECTIVE)

Creates a new Camera3D.

constructor(x: Float = 0.0f, y: Float = 0.0f, z: Float = 0.0f, targetX: Float = 0.0f, targetY: Float = 0.0f, targetZ: Float = 0.0f, upX: Float = 0.0f, upY: Float = 1.0f, upZ: Float = 0.0f, fovy: Float = 45.0f, projection: CameraProjection3D = CameraProjection3D.PERSPECTIVE)

Creates a new Camera3D.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
var fovy: Float

Camera FOV apperture in Y (degrees) in perspective, or near plane width in orthographic.

Link copied to clipboard

The camera's transformation matrix.

Link copied to clipboard
var position: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float>

The coordinates of the camera's world position.

Link copied to clipboard

The projection type of the camera.

Link copied to clipboard
var target: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float>

The coordinates of the camera's current target to look at.

Link copied to clipboard

The X coordinate of the camera's current target to look at.

Link copied to clipboard

The Y coordinate of the camera's current target to look at.

Link copied to clipboard

The Z coordinate of the camera's current target to look at.

Link copied to clipboard
var up: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float>

The up vector of the camera.

Link copied to clipboard
var upX: Float

The X value of the up vector.

Link copied to clipboard
var upY: Float

The Y value of the up vector.

Link copied to clipboard
var upZ: Float

The Z value of the up vector.

Link copied to clipboard
var x: Float

The X coordinate of the camera's position.

Link copied to clipboard
var y: Float

The Y coordinate of the camera's position.

Link copied to clipboard
var z: Float

The Z coordinate of the camera's position.

Functions

Link copied to clipboard
fun followCenter(sprite: Sprite3D)

Updates the camera to follow the sprite's center position directly.

Link copied to clipboard
fun rotatePitch(degrees: Float)

Rotates the camera's pitch (looking up/down).

Link copied to clipboard
fun rotateRoll(degrees: Float)

Rotates the camera's roll (tilting the view).

Link copied to clipboard
fun rotateYaw(degrees: Float)

Rotates the camera's yaw (looking left/right).

Link copied to clipboard
fun unload()

Unloads this Camera3D from memory.

Link copied to clipboard
fun update(mode: CameraMode3D)

Updates the camera's current mode.

fun update(delta: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float> = 0F to 0F to 0F, deltaRot: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float> = 0F to 0F to 0F, zoom: Float = 1.0f)
fun update(dx: Float = 0.0f, dy: Float = 0.0f, dz: Float = 0.0f, drotX: Float = 0.0f, drotY: Float = 0.0f, drotZ: Float = 0.0f, zoom: Float = 1.0f)

Updates the camera's movement, up, and speed.

Link copied to clipboard
fun updateWith(mode: CameraMode3D, origin: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float>?? = null)
fun updateWith(mode: CameraMode3D, origin: Positionable3D? = null): ERROR CLASS: Ambiguity: updateWith, [raylib/Camera3D.updateWith, raylib/Camera3D.updateWith, raylib/Camera3D.updateWith]
fun updateWith(mode: CameraMode3D, origin: Sprite3D? = null)

Updates the camera with a specific mode, automatically handling movement based on input.

Link copied to clipboard
fun worldToScreen(position: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float>): ERROR CLASS: Symbol not found for Pair<kotlin/Float, kotlin/Float>
fun worldToScreen(x: Float, y: Float, z: Float): ERROR CLASS: Symbol not found for Pair<kotlin/Float, kotlin/Float>
fun worldToScreen(x: Int, y: Int, z: Int): ERROR CLASS: Symbol not found for Pair<kotlin/Float, kotlin/Float>

Converts world coordinates to screen coordinates based on the camera's transformation.

Link copied to clipboard
fun zoomIn(amount: Float = 5.0f)

Zooms the camera in by decreasing the FOV.

Link copied to clipboard
fun zoomOut(amount: Float = 5.0f)

Zooms the camera out by increasing the FOV.