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

# GetMotorIndex

> IGameInputForceFeedbackEffect::GetMotorIndex

# IGameInputForceFeedbackEffect::GetMotorIndex

擷取與力回饋效果相關聯的馬達索引。

## 語法

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

### 參數

此方法沒有參數。

### 傳回值

類型：uint32\_t

傳回相關聯馬達的索引。

## 備註

每個 `IGameInputForceFeedbackEffect` 執行個體都會擷取有關效果的一組通用資訊。效果在裝置上載入的特定馬達可透過 `GetMotorIndex` 方法取得。如需詳細資訊，請參閱[進階 GameInput 主題](https://docs.xbox.com/zh-TW/build/core-features/common/input/advanced/input-advanced-topics.md)。

## 需求

**標頭：** GameInput.h

**程式庫：** xgameruntime.lib

**支援的平台：** Windows、XBOX One 系列主機和 XBOX Series 主機

## 另請參閱

[GameInput 概觀](https://docs.xbox.com/zh-TW/build/core-features/common/input/overviews/input-overview.md)\
[IGameInputForceFeedbackEffect](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/igameinputforcefeedbackeffect.md)

## 版本歷程記錄

| 版本 | 變更 |
| - | - |
| **v0** | 推出。 |


## Related topics

- [IGameInputForceFeedbackEffect (介面內容)](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/igameinputforcefeedbackeffect.md)
- [IsForceFeedbackMotorPoweredOn](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_isforcefeedbackmotorpoweredon.md)
- [SetForceFeedbackMotorGain](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_setforcefeedbackmotorgain.md)
- [IGameInputDevice::SetHapticMotorState (已淘汰)](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_sethapticmotorstate.md)
- [IGameInputDevice (介面內容)](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)
