> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 陀螺儀

> 陀螺儀

# 陀螺儀

將裝置的實體移動對應到指定軸組的感應器控制項。

## 屬性

`type` - "gyroscope"

`axis` - *object* 或 *array*。描述此觸控板控制項對應的單一[軸](/zh-TW/reference/system/touchadaptationkit/types/game-streaming-touch-axis)或[軸](/zh-TW/reference/system/touchadaptationkit/types/game-streaming-touch-axis)陣列。

## 備註

<Warning>並非所有支援觸控配置的裝置都提供陀螺儀控制項。</Warning>

如同 [`touchpad`](/zh-TW/reference/system/touchadaptationkit/controls/game-streaming-touch-touchpad)，陀螺儀通常用於第一人稱/第三人稱視角遊戲中，以控制玩家的視角攝影機。經過調整後，使用陀螺儀可為玩家的控制帶來如滑鼠般的精確度。

## 範例

```JSON theme={null}
Map the movement of the device to the right joystick, using a specified sensitivity.
{
    "type": "gyroscope",
    "axis": {
        "input": "axisXY",
        "output": "rightJoystick",
        "sensitivity": 0.3
    },
}
```

```JSON theme={null}
Map the movement of the device to relative mouse movement, using a specified sensitivity.
{
    "type": "gyroscope",
    "axis": {
        "input": "axisXY",
        "output": "relativeMouse",
        "sensitivity": 6.3
    },
}
```

## 需求

**配置版本：** 1.0+


## Related topics

- [构建触控的设计师指南](/zh-CN/build/core-features/common/game-streaming/building-touch-layouts/game-streaming-tak-designers-guide.md)
- [Touch Adaptation Kit](/zh-CN/reference/system/touchadaptationkit/touchadaptationkit-reference.md)
- [XAG 107：输入](/zh-CN/build/game-principles/accessibility/xag-deep-dives/xag-107-input.md)
- [IGameInputReading::GetMotionState](/zh-CN/reference/input/gameinput/deprecated/interfaces/igameinputreading/methods/igameinputreading_getmotionstate.md)
- [GameInputMotionState](/zh-CN/reference/input/gameinput/deprecated/structs/gameinputmotionstate.md)
