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

# IGameInputForceFeedbackEffect::GetMotorIndex

> IGameInputForceFeedbackEffect::GetMotorIndex

# IGameInputForceFeedbackEffect::GetMotorIndex

检索与力反馈效果关联的电机索引。

## 语法

```cpp theme={null}
uint32_t GetMotorIndex();
```

### 参数

此方法没有参数。

### 返回值

类型:uint32\_t

返回关联电机的索引。

## 注解

每个 `IGameInputForceFeedbackEffect` 实例都会检索到关于该效果的一组通用信息。要获取效果在设备上所加载的具体电机，请使用 `GetMotorIndex` 方法。有关更多信息，请参见 [Advanced GameInput topics](/build/core-features/common/input/advanced/input-advanced-topics)。

## 要求

**头文件:** GameInput.h

**库:** xgameruntime.lib

**支持的平台:** Windows、XBOX One 系列主机和 XBOX Series 主机

## 另请参见

[GameInput 概述](/build/core-features/common/input/overviews/input-overview)\
[IGameInputForceFeedbackEffect](/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/igameinputforcefeedbackeffect)

## 版本历史

| 版本     | 变更  |
| ------ | --- |
| **v0** | 引入。 |


## Related topics

- [IGameInputForceFeedbackEffect::GetGain](/zh-CN/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/methods/igameinputforcefeedbackeffect_getgain.md)
- [IGameInputForceFeedbackEffect::SetGain](/zh-CN/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/methods/igameinputforcefeedbackeffect_setgain.md)
- [IGameInputForceFeedbackEffect::GetDevice](/zh-CN/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/methods/igameinputforcefeedbackeffect_getdevice.md)
- [IGameInputForceFeedbackEffect::GetParams](/zh-CN/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/methods/igameinputforcefeedbackeffect_getparams.md)
- [IGameInputForceFeedbackEffect::GetState](/zh-CN/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/methods/igameinputforcefeedbackeffect_getstate.md)
