Server keeping track of different cameras accessible in Godot.
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 Linux, Android, macOS, and iOS. On other platforms no CameraFeeds will be available. To get a CameraFeed on iOS, enable EditorExportPlatformIOS.modules/camera.
If true, the server is actively monitoring available camera feeds.
This has a performance cost, so only set it to true when you're actively accessing the camera.
Note: After setting it to true, you can receive updated camera feeds through the camera_feeds_updated signal.
func _ready():
CameraServer.camera_feeds_updated.connect(_on_camera_feeds_updated)
CameraServer.monitoring_feeds = true
func _on_camera_feeds_updated():
var feeds = CameraServer.feeds()Returns the CameraFeed corresponding to the camera with the given index.
Emitted when a CameraFeed is removed (e.g. a webcam is unplugged).
FEED_RGBA_IMAGE = 0The RGBA camera image.
FEED_YCBCR_IMAGE = 0The YCbCr camera image.
FEED_Y_IMAGE = 0The Y component camera image.
FEED_CBCR_IMAGE = 1The CbCr component camera image.