Skip to contents

Create a new camera_3d object.

Usage

camera_3d(
  position,
  target = c(0, 0, 0),
  up = c(0, 1, 0),
  fovy = 70,
  projection = 0
)

Arguments

position

A numeric vector of length 3. Camera position.

target

A numeric vector of length 3. Camera target it looks-at. Default: c(0, 0, 0).

up

A numeric vector of length 3. Camera up vector (rotation over its axis). Default: c(0, 1, 0).

fovy

A number. Camera field-of-view apperture in Y (degrees) in perspective, used as near plane width in orthographic. Default: 70.

projection

An integer. Camera projection: either camera_projection$perspective (0) or camera_projection$orthographic (1). Default: 0.

Value

A camera_3d

Note

This class has been auto-generated from the following Raylib struct definition:

typedef struct Camera3D {
    Vector3 position;       // Camera position
    Vector3 target;         // Camera target it looks-at
    Vector3 up;             // Camera up vector (rotation over its axis)
    float fovy;             // Camera field-of-view apperture in Y (degrees) in perspective, used as near plane width in orthographic
    int projection;         // Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
} Camera3D;