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

# IGameInputForceFeedbackEffect::SetGain

> IGameInputForceFeedbackEffect::SetGain

# IGameInputForceFeedbackEffect::SetGain

Establece la ganancia en un efecto de retroalimentación de fuerza.

## Sintaxis

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

### Parámetros

*gain*   \_In\_\
Tipo: float

La nueva ganancia aplicada a un efecto de retroalimentación de fuerza.

### Valor devuelto

Ninguno

## Comentarios

La ganancia de un motor de retroalimentación de fuerza puede tener un valor entre 0.0 y 1.0.

Dos tipos de ganancia pueden afectar a la intensidad del efecto de retroalimentación de fuerza. Está la ganancia que se establece en un motor mediante [IGameInputDevice::SetForceFeedbackMotorGain](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_setforcefeedbackmotorgain.md) y la ganancia del propio efecto, que establece esta función.

El efecto de las dos ganancias se multiplica. Si la ganancia del efecto se establece en 0.5 y la ganancia maestra del motor se establece en 0.5, el efecto se reproducirá con una intensidad de 0.25. Para obtener más información, consulte [Temas avanzados de GameInput](https://docs.xbox.com/es/build/core-features/common/input/advanced/input-advanced-topics.md).

## Requisitos

**Encabezado:** GameInput.h

[Información general de GameInput](https://docs.xbox.com/es/build/core-features/common/input/overviews/input-overview.md)\
[IGameInputForceFeedbackEffect::GetGain](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/methods/igameinputforcefeedbackeffect_getgain.md)\
[IGameInputDevice::SetForceFeedbackMotorGain](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_setforcefeedbackmotorgain.md)\
[IGameInputForceFeedbackEffect](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/igameinputforcefeedbackeffect.md)

## Historial de versiones

| Versión | Cambios |
| - | - |
| **v0** | Se introdujo. |


## Related topics

- [IGameInputForceFeedbackEffect::GetGain](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/methods/igameinputforcefeedbackeffect_getgain.md)
- [Force feedback en GameInput](https://docs.xbox.com/es/build/core-features/common/input/advanced/input-forcefeedback.md)
- [IGameInputForceFeedbackEffect::SetState](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/methods/igameinputforcefeedbackeffect_setstate.md)
- [IGameInputForceFeedbackEffect::SetParams](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/methods/igameinputforcefeedbackeffect_setparams.md)
- [IGameInputForceFeedbackEffect::GetState](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/methods/igameinputforcefeedbackeffect_getstate.md)
