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

# 陀螺儀

> 陀螺儀

# 陀螺儀

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

## 屬性

`type` - "gyroscope"

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

## 備註

> [!WARNING]
>
> 並非所有支援觸控配置的裝置都提供陀螺儀控制項。

如同 [`touchpad`](https://docs.xbox.com/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

- [建置觸控控制項的設計師指南](https://docs.xbox.com/zh-TW/build/core-features/common/game-streaming/building-touch-layouts/game-streaming-tak-designers-guide.md)
- [Touch Adaptation Kit](https://docs.xbox.com/zh-TW/reference/system/touchadaptationkit/touchadaptationkit-reference.md)
- [軸](https://docs.xbox.com/zh-TW/reference/system/touchadaptationkit/types/game-streaming-touch-axis.md)
- [死區](https://docs.xbox.com/zh-TW/reference/system/touchadaptationkit/types/game-streaming-touch-deadzone.md)
- [ResponseCurve](https://docs.xbox.com/zh-TW/reference/system/touchadaptationkit/types/game-streaming-touch-responsecurve.md)
