> ## 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::SetGain

> IGameInputForceFeedbackEffect::SetGain

# IGameInputForceFeedbackEffect::SetGain

Sets the gain on a force-feedback effect.

## Syntax

```cpp theme={null}
void SetGain(
    float gain
);
```

### Parameters

*gain*   \_In\_\
Type: float

The new gain applied to a force feedback effect.

### Return value

None

## Remarks

The gain on a force feedback motor can have a value between 0.0 and 1.0.

Two types of gain can affect the intensity of the force feedback effect. There is the gain that is set on a  motor by [IGameInputDevice::SetForceFeedbackMotorGain](/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_setforcefeedbackmotorgain) and the gain on the effect itself set by this function.

The effect of the two gains is multiplied. If the effect gain is set to 0.5 and the master gain of the motor is set to 0.5, then the effect will be played at 0.25 intensity. For more information, see [Advanced GameInput topics](/build/core-features/common/input/advanced/input-advanced-topics).

## Requirements

**Header:** GameInput.h

[Overview of GameInput](/build/core-features/common/input/overviews/input-overview)\
[IGameInputForceFeedbackEffect::GetGain](/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/methods/igameinputforcefeedbackeffect_getgain)\
[IGameInputDevice::SetForceFeedbackMotorGain](/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_setforcefeedbackmotorgain)\
[IGameInputForceFeedbackEffect](/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/igameinputforcefeedbackeffect)

## Version History

| Version | Changes     |
| ------- | ----------- |
| **v0**  | Introduced. |
