Camera

Camera

  • viewport : core::option::Option<bevy_render::camera::camera::Viewport>
  • order : isize
  • is_active : bool
  • target : bevy_render::camera::camera::RenderTarget
  • hdr : bool
  • msaa_writeback : bool
  • clear_color : bevy_render::camera::clear_color::ClearColorConfig
  • sub_camera_view : core::option::Option<bevy_render::camera::camera::SubCameraView>

Description

The defining [Component] for camera entities, storing information about how and what to render through this camera.

The [Camera] component is added to an entity to define the properties of the viewpoint from which rendering occurs. It defines the position of the view to render, the projection method to transform the 3D objects into a 2D image, as well as the render target into which that image is produced.

Note that a [Camera] needs a [CameraRenderGraph] to render anything. This is typically provided by adding a Camera2d or Camera3d component, but custom render graphs can also be defined. Inserting a [Camera] with no render graph will emit an error at runtime.

Functions