---
name: "SDL_GetCameraPosition"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_GetCameraPosition"
---

# SDL\_GetCameraPosition(3)

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

## NAME

SDL\_GetCameraPosition - Get the position of the camera in relation to the system.

## HEADER FILE

Defined in SDL3/SDL\_camera.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**SDL\_CameraPosition SDL\_GetCameraPosition(SDL\_CameraID instance\_id);**

## DESCRIPTION

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.

## SEE ALSO

**•**(3), [**SDL\_GetCameras**(3)](/SDL_GetCameras/3.md)
