> ## 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.

# GameInputMotionState (已淘汰)

> GameInputMotionState

# GameInputMotionState

> [!WARNING]
>
> **已淘汰。** 此結構已在 GameInput v1 中移除，目前的 API 中無法使用。

描述從輸入讀數取得的目前加速度計、陀螺儀和磁力計狀態。

## 語法

```cpp theme={null}
typedef struct GameInputMotionState {
    float accelerationX;
    float accelerationY;
    float accelerationZ;
    float angularVelocityX;
    float angularVelocityY;
    float angularVelocityZ;
    float magneticFieldX;
    float magneticFieldY;
    float magneticFieldZ;
} GameInputMotionState;
```

## 成員

**accelerationX, accelerationY, accelerationZ**\
類型：float

沿各軸測得的線性加速度，單位為 m/s²。

**angularVelocityX, angularVelocityY, angularVelocityZ**\
類型：float

繞各軸測得的角速度，單位為度/秒。

**magneticFieldX, magneticFieldY, magneticFieldZ**\
類型：float

沿各軸測得的磁場強度，單位為高斯。

## 備註

此結構由已淘汰的 [IGameInputReading::GetMotionState](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/interfaces/igameinputreading/methods/igameinputreading_getmotionstate.md) 方法傳回。兩者都已在 v1 中移除。

## 版本歷程記錄

| 版本 | 變更 |
| - | - |
| **v1** | 已移除。 |
| **v0** | 推出。 |

## 另請參閱

[已淘汰的 GameInput API 成員](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/gameinput_deprecated_members.md)
[IGameInputReading::GetMotionState](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/interfaces/igameinputreading/methods/igameinputreading_getmotionstate.md)
[GameInputMotionInfo](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/structs/gameinputmotioninfo.md)


## Related topics

- [GameInputMotionInfo (已淘汰)](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/structs/gameinputmotioninfo.md)
- [GameInputMotionAccuracy (已淘汰)](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/enums/gameinputmotionaccuracy.md)
- [IGameInputReading::GetMotionState (已淘汰)](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/interfaces/igameinputreading/methods/igameinputreading_getmotionstate.md)
- [已淘汰的 GameInput API 成員](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/gameinput_deprecated_members.md)
- [GameInputTouchState (已淘汰)](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/structs/gameinputtouchstate.md)
