Difference between revisions of "Accelerometer:getAcceleration"

From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight")
Line 5: Line 5:
 
Returns the 3-axis acceleration measured by the accelerometer.
 
Returns the 3-axis acceleration measured by the accelerometer.
  
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
(number), (number), (number) = Accelerometer:getAcceleration()
 
(number), (number), (number) = Accelerometer:getAcceleration()
 
</source>
 
</source>

Revision as of 17:21, 12 July 2023

Available since: Gideros 2012.8
Class: Accelerometer

Description

Returns the 3-axis acceleration measured by the accelerometer.

<syntaxhighlight lang="lua"> (number), (number), (number) = Accelerometer:getAcceleration() </source>

Return values

Returns (number) acceleration on x-axis in G's
Returns (number) acceleration on y-axis in G's
Returns (number) acceleration on z-axis in G's