Skip to main content

Camera

The camera component enables an entity to render the scene from a specific viewpoint.

The camera component can be enabled or disabled using the toggle in the top-right of the component panel. When enabled, the camera renders the scene every frame.

Camera component

Properties

PropertyDescription
Clear BuffersControls how the camera's render target is cleared before rendering each frame. The camera maintains two types of buffers: a color buffer that stores the visible image and a depth buffer that stores distance information from the camera position for rendered pixels. Buffers can be cleared independently:
  • Color: When selected, the camera explicitly clears the render target to the selected clear color before rendering the scene.
  • Depth: When selected, the camera explicitly clears the render target's depth buffer before rendering the scene.
Clear ColorThe color used to clear the camera's render target. This property is only shown when 'Clear Color Buffer' is selected.
Depth GrabpassWhen selected, the camera requests that a texture containing the scene's depth map be generated.
Color GrabpassWhen selected, the camera requests that a texture containing the scene's color map be generated.
ProjectionThe camera's projection type. Options are:
  • Perspective
  • Orthographic
Frustum CullingWhen selected, the camera only renders mesh instances whose axis-aligned bounding boxes intersect the camera's view frustum. Otherwise, the entire scene is rendered regardless of visibility.
Field of ViewThe angle between the top and bottom clip planes of a perspective camera. This property is only shown when 'Projection' is set to 'Perspective'.
Ortho HeightThe distance in world units between the top and bottom clip planes of an orthographic camera. This property is only shown when 'Projection' is set to 'Orthographic'.
Near ClipThe distance from the camera's viewpoint to the near clip plane in camera space.
Far ClipThe distance from the camera's viewpoint to the far clip plane in camera space.
PriorityA number that defines the order in which the engine renders camera views. Smaller numbers are rendered first.
ViewportA rectangle that specifies the viewport for the camera's connected render target. This enables features like split-screen or picture-in-picture. Defined in normalized coordinates (0 to 1) in the following format:
  • x: Bottom-left x coordinate
  • y: Bottom-left y coordinate
  • w: Width of the rectangle
  • h: Height of the rectangle
LayersThe layers this camera will render.

Scripting Interface

You can control the camera component's properties using a script component. The camera component's scripting interface is here.