From 6d434836b7680d3b5452d93863877a11f804edc7 Mon Sep 17 00:00:00 2001 From: 4ian <1280130+4ian@users.noreply.github.com> Date: Sat, 21 Mar 2026 10:14:01 +0000 Subject: [PATCH] [Auto] [Improve] Fixed device sensors units, typo, gravity note, and broken OR condition link --- automated_updates_data.json | 4 ++++ .../all-features/advanced-conditions/index.md | 2 +- .../all-features/device-sensors/index.md | 22 +++++++++++-------- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/automated_updates_data.json b/automated_updates_data.json index 53412854576..f12501efd43 100644 --- a/automated_updates_data.json +++ b/automated_updates_data.json @@ -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-21", + "summary": "Fixed device-sensors doc: corrected rotation unit labels from m/s² to deg/s, fixed 'gamma' typo, added gravity-inclusion note; fixed broken old wiki link in advanced-conditions OR warning" } ] } diff --git a/docs/gdevelop5/all-features/advanced-conditions/index.md b/docs/gdevelop5/all-features/advanced-conditions/index.md index 99b7f8af129..318ca30a00f 100644 --- a/docs/gdevelop5/all-features/advanced-conditions/index.md +++ b/docs/gdevelop5/all-features/advanced-conditions/index.md @@ -19,7 +19,7 @@ If the "**OR**" condition is used in an event, the actions are performed when on !!! warning - The OR condition has a special behavior regarding the [object filtering logic of GDevelop](http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/basic-game-making-concepts#events_and_how_objects_are_selected_by_these_events). The objects listed under it are _unselected_ by GDevelop if their condition is not met, so actions specific to these objects may not work. In some cases, using "Pick all instances" on the action side will fix things. In other cases, replacing the OR will be necessary. + The OR condition has a special behavior regarding the [object filtering logic of GDevelop](/gdevelop5/tutorials/basic-game-making-concepts#how-objects-are-selected). The objects listed under it are _unselected_ by GDevelop if their condition is not met, so actions specific to these objects may not work. In some cases, using "Pick all instances" on the action side will fix things. In other cases, replacing the OR will be necessary. ## Not logical operation ![](not-condition.png) diff --git a/docs/gdevelop5/all-features/device-sensors/index.md b/docs/gdevelop5/all-features/device-sensors/index.md index c3fd6ed6515..1ab6c5e3f73 100644 --- a/docs/gdevelop5/all-features/device-sensors/index.md +++ b/docs/gdevelop5/all-features/device-sensors/index.md @@ -83,11 +83,15 @@ 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 linear acceleration 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 - The motion sensor rotation values (alpha, beta, gamma) are currently badly supported on mobile devices. It would currently be better to calculate the value from the orientation data + The acceleration values **include gravity**. On a stationary device lying flat, the Z-axis will read approximately 9.8 m/s² (Earth's gravity) rather than 0. If you need acceleration without gravity, subtract the expected gravitational component. + +!!! note + + The motion sensor rotation rate values (alpha, beta, gamma) are currently poorly supported on mobile devices. It is better to calculate rotation from the orientation sensor data instead. ### Axes explained @@ -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 @@ -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. (deg/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. (deg/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. (deg/s) ### Actions @@ -183,14 +187,14 @@ The "z" acceleration. (m/s²) **Alpha Value** -The "alpha" rotation. (m/s²) +The "alpha" rotation rate around the Z-axis. (deg/s) **Beta Value** -The "beta" rotation. (m/s²) +The "beta" rotation rate around the X-axis. (deg/s) **Gamma Value** -The "gamma" rotation. (m/s²) +The "gamma" rotation rate around the Y-axis. (deg/s) ![](/gdevelop5/all-features/devicesensorsevents.png)