Gyroscope

A sensor control that maps the devices physical movement to a specified set of axes.

Properties

type - "gyroscope"

axis - object or array. A single axis or array of axes that describe the mapping of this touchpad control.

Remarks

Warning

The gyroscope control may not be available on all devices that support touch layouts.

Like the touchpad, the gyroscope is typically used in first/third-person perspective games to control the player look camera. With tuning using the gyroscope can bring mouse-like precision to the player's control.

Samples

Map the movement of the device to the right joystick, using a specified sensitivity.
{
    "type": "gyroscope",
    "axis": {
        "input": "axisXY",
        "output": "rightJoystick",
        "sensitivity": 0.3
    },
}
Map the movement of the device to relative mouse movement, using a specified sensitivity.
{
    "type": "gyroscope",
    "axis": {
        "input": "axisXY",
        "output": "relativeMouse",
        "sensitivity": 6.3
    },
}

Requirements

Layout Version: 1.0+