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

# IGameInputDevice::SetForceFeedbackMotorGain

> IGameInputDevice::SetForceFeedbackMotorGain

# IGameInputDevice::SetForceFeedbackMotorGain

モーターに読み込まれているすべてのエフェクトに対して、グローバルな減衰係数を適用します。

## 構文

```cpp theme={null}
void SetForceFeedbackMotorGain(
    uint32_t motorIndex,
    float masterGain
);
```

### パラメーター

*motorIndex*   \_In\_\
型: uint32\_t

変更対象のモーターのインデックスです。

*masterGain*   \_In\_\
型: float

モーターに読み込まれているすべてのエフェクトに対する、0.0 から 1.0 の範囲のグローバルな減衰係数です。

### 戻り値

なし。

## 解説

このメソッドは、モーターに読み込まれているすべてのエフェクトにグローバルな減衰係数を適用します。`masterGain` ポインターは、0.0 から 1.0 の範囲の値を受け付けます。これはアプリケーションのフォース フィードバック強度設定で使用されます。詳細については、「[GameInput の概要](/build/core-features/common/input/overviews/input-overview)」を参照してください。

## 要件

**ヘッダー:** GameInput.h

[GameInput](/reference/input/gameinput/gameinput_members)\
[IGameInputDevice](/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice)

## バージョン履歴

| バージョン  | 変更点 |
| ------ | --- |
| **v0** | 導入。 |


## Related topics

- [IGameInputForceFeedbackEffect::SetGain](/ja-jp/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/methods/igameinputforcefeedbackeffect_setgain.md)
- [IGameInputForceFeedbackEffect::GetGain](/ja-jp/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/methods/igameinputforcefeedbackeffect_getgain.md)
- [IGameInputDevice::SetHapticMotorState](/ja-jp/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_sethapticmotorstate.md)
- [IsForceFeedbackMotorPoweredOn](/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_isforcefeedbackmotorpoweredon.md)
- [GameInputHapticFeedbackParams](/ja-jp/reference/input/gameinput/deprecated/structs/gameinputhapticfeedbackparams.md)
