> ## 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](/zh-TW/reference/input/gameinput/deprecated/structs/gameinputmotionstate)\*

指向 [GameInputMotionState](/zh-TW/reference/input/gameinput/deprecated/structs/gameinputmotionstate) 結構的指標，用來填入動作資料。

### 傳回值

類型：bool

如果讀數包含動作狀態，則傳回 `true`；否則傳回 `false`。

## 備註

此方法和相關聯的 [GameInputMotionState](/zh-TW/reference/input/gameinput/deprecated/structs/gameinputmotionstate) 結構已在 v1 中移除。動作狀態適用於公開加速計和陀螺儀軸的裝置。

## 版本歷程記錄

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

## 另請參閱

[已淘汰的 GameInput API 成員](/zh-TW/reference/input/gameinput/deprecated/gameinput_deprecated_members)\
[GameInputMotionState](/zh-TW/reference/input/gameinput/deprecated/structs/gameinputmotionstate)\
[IGameInputReading](/zh-TW/reference/input/gameinput/interfaces/igameinputreading/igameinputreading)


## Related topics

- [IGameInputReading::GetMotionState](/ko/reference/input/gameinput/deprecated/interfaces/igameinputreading/methods/igameinputreading_getmotionstate.md)
- [GameInputMotionState](/reference/input/gameinput/deprecated/structs/gameinputmotionstate.md)
