You are reading the
(unstable) version of this documentation, which may document features not available
or compatible with Godot 3.x.
Checking the stable version of the documentation...
Work in progress
Godot documentation is being updated to reflect the latest changes in version
4.0. Some documentation pages may
still state outdated information. This banner will tell you if you're reading one of such pages.
The contents of this page are up to date. If you can still find outdated information, please open an issue.
Inherits: RefCounted < Object
A camera feed gives you access to a single physical camera attached to your device.
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. See also CameraServer.
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.
get_datatype ( ) const
get_id ( ) const
get_name ( ) const
get_position ( ) const
FeedDataType FEED_NOIMAGE =
No image set for the feed.
FeedDataType FEED_RGB =
Feed supplies RGB images.
FeedDataType FEED_YCBCR =
Feed supplies YCbCr images that need to be converted to RGB.
FeedDataType FEED_YCBCR_SEP =
Feed supplies separate Y and CbCr images that need to be combined and converted to RGB.
FeedPosition FEED_UNSPECIFIED =
FeedPosition FEED_FRONT =
Camera is mounted at the front of the device.
FeedPosition FEED_BACK =
Camera is mounted at the back of the device.
bool feed_is_active =
true, the feed is active.
Transform2D feed_transform =
Transform2D(1, 0, 0, -1, 0, 1)
void set_transform ( Transform2D value )
Transform2D get_transform ( )
The transform applied to the camera's image.
FeedDataType get_datatype ( ) const
Returns feed image data type.
int get_id ( ) const
Returns the unique ID for this feed.
String get_name ( ) const
Returns the camera's name.
FeedPosition get_position ( ) const
Returns the position of camera on the device.