Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions automated_updates_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@
{
"date": "2026-03-15",
"summary": "Improved string-instructions (added StrReplaceOne/StrReplaceAll), common-conversions (added LargeNumberToString, ToJSON/ObjectVarToJSON), timers (added TimeScale and Time() format selectors), and gamepad docs (added analog triggers, deadzone, StickForceX/Y, controller type detection)"
},
{
"date": "2026-03-18",
"summary": "Fixed device-sensors docs: corrected rotation rate units from m/s² to °/s, fixed copy-paste error in Rotation gamma section, and added note about gravity being included in acceleration readings"
}
]
}
20 changes: 12 additions & 8 deletions docs/gdevelop5/all-features/device-sensors/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ The "gamma" rotation.

## Motion sensor

In contrast to the orientation sensor which returns absolute values, the motion sensor delivers relative ones. This sensor only returns values while the device is moving. If you hold it still, no matter its orientation, the sensor will return 0. You can access the motion data along an axis via the "x", "y", "z" values and the rotation data around an axis via "alpha", "beta" and "gamma" which are explained in the next section.
In contrast to the orientation sensor which returns absolute values, the motion sensor delivers relative ones. You can access the motion data along an axis via the "x", "y", "z" values and the rotation rate around an axis via "alpha", "beta" and "gamma" which are explained in the next section.

!!! note

Acceleration values include the effect of gravity (`accelerationIncludingGravity`). This means a device lying flat on a table will show approximately 9.8 m/s² on the Z-axis even when still. If you want to detect only actual movement, subtract or account for this gravitational component in your calculations.

!!! note

Expand Down Expand Up @@ -125,7 +129,7 @@ This value shows the acceleration around the x-axis. If you hold your device in

![](/gdevelop5/all-features/motion_gamma.png)

This value shows the acceleration around the y-axis. If you hold your device in portrait mode with a hand on each side, you can turn your device around the y-axis and the beta value will increase.
This value shows the acceleration around the y-axis. If you hold your device in portrait mode with a hand on each side, you can turn your device around the y-axis and the gamma value will increase.

### Conditions

Expand All @@ -147,15 +151,15 @@ This condition lets you compare the value of z-acceleration to a number or varia

**Motion Alpha**

This condition lets you compare the value of alpha to a number or variable. (m/s²)
This condition lets you compare the rotation rate around the Z-axis to a number or variable. (°/s)

**Motion Beta**

This condition lets you compare the value of beta to a number or variable. (m/s²)
This condition lets you compare the rotation rate around the X-axis to a number or variable. (°/s)

**Motion Gamma**

This condition lets you compare the value of gamma to a number or variable. (m/s²)
This condition lets you compare the rotation rate around the Y-axis to a number or variable. (°/s)

### Actions

Expand Down Expand Up @@ -183,14 +187,14 @@ The "z" acceleration. (m/s²)

**Alpha Value**

The "alpha" rotation. (m/s²)
The rotation rate around the Z-axis. (°/s)

**Beta Value**

The "beta" rotation. (m/s²)
The rotation rate around the X-axis. (°/s)

**Gamma Value**

The "gamma" rotation. (m/s²)
The rotation rate around the Y-axis. (°/s)

![](/gdevelop5/all-features/devicesensorsevents.png)