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

# IGameInputReading::GetMotionState（已弃用）

> IGameInputReading::GetMotionState

# IGameInputReading::GetMotionState

> [!WARNING]
>
> **已弃用。** 此方法已在 GameInput v1 中移除，当前 API 中不再提供。

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

## 语法

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

### 参数

*state*   \_Out\_\
类型：[GameInputMotionState](https://docs.xbox.com/zh-CN/reference/input/gameinput/deprecated/structs/gameinputmotionstate.md)\*

指向要用运动数据填充的 [GameInputMotionState](https://docs.xbox.com/zh-CN/reference/input/gameinput/deprecated/structs/gameinputmotionstate.md) 结构的指针。

### 返回值

类型：bool

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

## 备注

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

## 版本历史

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

## 另请参阅

[已弃用的 GameInput API 成员](https://docs.xbox.com/zh-CN/reference/input/gameinput/deprecated/gameinput_deprecated_members.md)\
[GameInputMotionState](https://docs.xbox.com/zh-CN/reference/input/gameinput/deprecated/structs/gameinputmotionstate.md)\
[IGameInputReading](https://docs.xbox.com/zh-CN/reference/input/gameinput/interfaces/igameinputreading/igameinputreading.md)


## Related topics

- [GameInputMotionState（已弃用）](https://docs.xbox.com/zh-CN/reference/input/gameinput/deprecated/structs/gameinputmotionstate.md)
- [IGameInputReading::GetTouchState（已弃用）](https://docs.xbox.com/zh-CN/reference/input/gameinput/deprecated/interfaces/igameinputreading/methods/igameinputreading_gettouchstate.md)
- [IGameInputReading::GetUiNavigationState（已弃用）](https://docs.xbox.com/zh-CN/reference/input/gameinput/deprecated/interfaces/igameinputreading/methods/igameinputreading_getuinavigationstate.md)
- [IGameInputReading::GetTouchCount（已弃用）](https://docs.xbox.com/zh-CN/reference/input/gameinput/deprecated/interfaces/igameinputreading/methods/igameinputreading_gettouchcount.md)
- [IGameInput::GetTemporalReading（已弃用）](https://docs.xbox.com/zh-CN/reference/input/gameinput/deprecated/interfaces/igameinput/methods/igameinput_gettemporalreading.md)
