anyKode Marilou
Using accelerometers / Gyroscopes

Using accelerometer / gyroscope.

Accelerometers are attached to moveable entities. Their axes system is, by default, the Marilou editor one (direct). These settings can be overridden for each sensor instance. 


Placing an accelerometer

  • Create a box0 geometry and attach a rigid body to it in order to make it dynamic,
  • Show the Modify panel then select the Devices sub-panel.



  • Click on Choose Device icon to open the list of plugins that may be attached to this geometry,
  • Choose an accelerometer / gyroscope.

Mount As: represents the name of the device in the simulation. 

Double-click on the sensor's reference in order to display/change its settings:

This dialog box lets you change how the sensor works, axis by axis. Also, the 'Instance' panel let you assign configuration for this sensor instance like working axes directions.

Gravity sensitive:
Indicates whether or not acceleration takes gravity into account. If this option is not checked, the accelerometer records absolute acceleration based on the geometry's movement.

Axis settings:
Configures axis values. Select the axis to be configured from the list. The following properties are relative to selected axis:

Indicates whether or not the selected axis is activated. If the axis is not activated, its value will always be 0.

Indicates if sensor embed an accelerometer on the selected axis.

Maximum negative acceleration that the accelerometer can detect (unit is G).

Maximum positive acceleration that the accelerometer can detect (unit is G).

Indicates if sensor embed a gyroscope on the selected axis.

Indicates if sensor embed a gyrometer on the selected axis. 
In MODA programming, an accelerometer device can be accessed via the DeviceAccelGryo class. The sensor's full path, starting at PHX "/" is box0/accel
Documentation v4.7 (18/01/2015), Copyright (c) 2015 anyKode. All rights reserved.
What do you think about this topic? Send feedback!