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

# IGameInputReading::GetMotionState

> IGameInputReading::GetMotionState

# IGameInputReading::GetMotionState

<Warning>**已弃用。** 此方法已在 GameInput v1 中移除，当前 API 中不再提供。</Warning>

从读数中获取运动（加速计和陀螺仪）状态。

## 语法

```cpp theme={null}
bool GetMotionState(
    GameInputMotionState* state
);
```

### 参数

*state*   \_Out\_\
类型：[GameInputMotionState](/reference/input/gameinput/deprecated/structs/gameinputmotionstate)\*

指向要用运动数据填充的 [GameInputMotionState](/reference/input/gameinput/deprecated/structs/gameinputmotionstate) 结构的指针。

### 返回值

类型：bool

如果读数包含运动状态，则返回 `true`；否则返回 `false`。

## 备注

此方法及相关的 [GameInputMotionState](/reference/input/gameinput/deprecated/structs/gameinputmotionstate) 结构已在 v1 中移除。运动状态曾在暴露加速计和陀螺仪轴的设备上提供。

## 版本历史

| 版本     | 变更   |
| ------ | ---- |
| **v1** | 已移除。 |
| **v0** | 已引入。 |

## 另请参阅

[已弃用的 GameInput API 成员](/reference/input/gameinput/deprecated/gameinput_deprecated_members)\
[GameInputMotionState](/reference/input/gameinput/deprecated/structs/gameinputmotionstate)\
[IGameInputReading](/reference/input/gameinput/interfaces/igameinputreading/igameinputreading)


## Related topics

- [GameInputMotionState](/zh-CN/reference/input/gameinput/deprecated/structs/gameinputmotionstate.md)
- [IGameInputReading::GetGamepadState](/zh-CN/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getgamepadstate.md)
- [IGameInputReading::GetKeyState](/zh-CN/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getkeystate.md)
- [IGameInputReading::GetMouseState](/zh-CN/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getmousestate.md)
- [IGameInputReading::GetTouchState](/zh-CN/reference/input/gameinput/deprecated/interfaces/igameinputreading/methods/igameinputreading_gettouchstate.md)
