A camera feed gives you access to a single physical camera attached to your device.
    public class CameraFeed : Reference

A camera feed gives you access to a single physical camera attached to your device. When enabled, Godot will start capturing frames from the camera which can then be used.

Note: Many cameras will return YCbCr images which are split into two textures and need to be combined in a shader. Godot does this automatically for you if you set the environment to show the camera image in the background.

Inheritance Chain

Constructors

    public CameraFeed()

Properties

    public bool FeedIsActive { get; set; }

    public Transform2D FeedTransform { get; set; }

Methods

    public int GetId()

Gets the unique ID for this feed.

    public string GetName()

Gets the camera’s name.

    public FeedPosition GetPosition()

Position of camera on the device.

    [Obsolete("GetTransform is deprecated. Use the FeedTransform property instead.")]
    public Transform2D GetTransform()

Getter for FeedTransform

    [Obsolete("IsActive is deprecated. Use the FeedIsActive property instead.")]
    public bool IsActive()

Getter for FeedIsActive

    [Obsolete("SetActive is deprecated. Use the FeedIsActive property instead.")]
    public void SetActive(bool active)

Setter for FeedIsActive

    [Obsolete("SetTransform is deprecated. Use the FeedTransform property instead.")]
    public void SetTransform(Transform2D transform)

Setter for FeedTransform

Inner Types

FeedDataType

Name Value Description
Noimage 0 No image set for the feed.
Rgb 1 Feed supplies RGB images.
Ycbcr 2 Feed supplies YCbCr images that need to be converted to RGB.
YcbcrSep 3 Feed supplies separate Y and CbCr images that need to be combined and converted to RGB.

FeedPosition

Name Value Description
Unspecified 0 Unspecified position.
Front 1 Camera is mounted at the front of the device.
Back 2 Camera is mounted at the back of the device.
Tags: