class

FDeviceSensors

Module
Input
Header
#include "Input/DeviceSensors.h"
Namespace
Mowo

Public functions

ReturnsNameDescription
FDeviceSensors&Get
voidSetSourceReplaces the source; null falls back to the platform's (SDL sensors on Android and iOS, nothing elsewhere).
voidUpdate
boolHasAccelerometer
boolHasGyroscope
boolHasCompass
boolHasLocation
Vec3GetAcceleration
Vec3GetRotationRate
Vec3GetGravityUnit vector pointing down in device axes (the accelerometer at rest).
floatGetPitchDegreesRotation about the device X axis (screen top tilting away is positive) and about the Y axis, in degrees; both 0 with the device flat, face up.
floatGetRollDegrees
floatGetCompassHeadingDegreesDegrees clockwise from magnetic north that the device's +Y axis points, 0 to 360, compensated for tilt using gravity.
doubleGetLatitude
doubleGetLongitude
floatGetAltitudeMeters
floatGetLocationAccuracyMeters

Function details

Get

C++
static FDeviceSensors& Get()

SetSource

C++
void SetSource(std::unique_ptr<IDeviceSensorSource> source)

Replaces the source; null falls back to the platform's (SDL sensors on Android and iOS, nothing elsewhere).

Update

C++
void Update()

HasAccelerometer

C++
bool HasAccelerometer() const

HasGyroscope

C++
bool HasGyroscope() const

HasCompass

C++
bool HasCompass() const

HasLocation

C++
bool HasLocation() const

GetAcceleration

C++
Vec3 GetAcceleration() const

GetRotationRate

C++
Vec3 GetRotationRate() const

GetGravity

C++
Vec3 GetGravity() const

Unit vector pointing down in device axes (the accelerometer at rest).

GetPitchDegrees

C++
float GetPitchDegrees() const

Rotation about the device X axis (screen top tilting away is positive) and about the Y axis, in degrees; both 0 with the device flat, face up.

GetRollDegrees

C++
float GetRollDegrees() const

GetCompassHeadingDegrees

C++
float GetCompassHeadingDegrees() const

Degrees clockwise from magnetic north that the device's +Y axis points, 0 to 360, compensated for tilt using gravity. 0 without a compass.

GetLatitude

C++
double GetLatitude() const

GetLongitude

C++
double GetLongitude() const

GetAltitudeMeters

C++
float GetAltitudeMeters() const

GetLocationAccuracyMeters

C++
float GetLocationAccuracyMeters() const
Generated from Input/DeviceSensors.h via input.json · Dec 5, 2026Version 1.1.0