SDL_GetCameraPosition(3)

SDL_GetCameraPosition3

Get the position of the camera in relation to the system.

Usage

#include "SDL3/SDL.h"

SDL_CameraPosition SDL_GetCameraPosition(SDL_CameraID instance_id);

Header file

Defined in SDL3/SDL_camera.h

Overview

Most platforms will report UNKNOWN, but mobile devices, like phones, can often make a distinction between cameras on the front of the device (that points towards the user, for taking "selfies") and cameras on the back (for filming in the direction the user is facing).

Function parameters

instance_id

the camera device instance ID.

Return value

( SDL_CameraPosition ) Returns the position of the camera on the system hardware.

Thread safety

It is safe to call this function from any thread.

Availability

This function is available since SDL 3.2.0.

From libsdl3-doc 3.2.10+ds-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.