Up to date

This page is up to date for Godot 4.3. If you still find outdated information, please open an issue.

CameraServerΒΆ

Inherits: Object

Server keeping track of different cameras accessible in Godot.

DescriptionΒΆ

The CameraServer keeps track of different cameras accessible in Godot. These are external cameras such as webcams or the cameras on your phone.

It is notably used to provide AR modules with a video feed from the camera.

Note: This class is currently only implemented on macOS and iOS. To get a CameraFeed on iOS, the camera plugin from godot-ios-plugins is required. On other platforms, no CameraFeeds will be available.

MethodsΒΆ

void

add_feed(feed: CameraFeed)

Array[CameraFeed]

feeds()

CameraFeed

get_feed(index: int)

int

get_feed_count()

void

remove_feed(feed: CameraFeed)


SignalsΒΆ

camera_feed_added(id: int) πŸ”—

Emitted when a CameraFeed is added (e.g. a webcam is plugged in).


camera_feed_removed(id: int) πŸ”—

Emitted when a CameraFeed is removed (e.g. a webcam is unplugged).


EnumerationsΒΆ

enum FeedImage: πŸ”—

FeedImage FEED_RGBA_IMAGE = 0

The RGBA camera image.

FeedImage FEED_YCBCR_IMAGE = 0

The YCbCr camera image.

FeedImage FEED_Y_IMAGE = 0

The Y component camera image.

FeedImage FEED_CBCR_IMAGE = 1

The CbCr component camera image.


Method DescriptionsΒΆ

void add_feed(feed: CameraFeed) πŸ”—

Adds the camera feed to the camera server.


Array[CameraFeed] feeds() πŸ”—

Returns an array of CameraFeeds.


CameraFeed get_feed(index: int) πŸ”—

Returns the CameraFeed corresponding to the camera with the given index.


int get_feed_count() πŸ”—

Returns the number of CameraFeeds registered.


void remove_feed(feed: CameraFeed) πŸ”—

Removes the specified camera feed.