GamepadVibration.LeftTriggerLevel Field

The left trigger level which varies between 0.0 (not depressed) and 1.0 (fully depressed).

Syntax

public:
float32 LeftTriggerLevel  

Remarks

The left motor is the low-frequency vibration motor. The right motor is the high-frequency vibration motor. The two motors are not the same, and they create different vibration effects.

The following code shows how to use this field. It first sets left motor speed to 0.75f and then to 0.0f to turn it off. Vibration continues indefinitely until you set it to 0.

void MotorVibration(Microsoft::Xbox::Input::IGamepad * pGamepad)
{
    GamepadVibration vib;

    vib.LeftMotorLevel = 0.75f;
    vib.RightMotorLevel = 0.75f;
    vib.LeftTriggerLevel = 0.25f;
    vib.RightTriggerLevel = 0.25f;
            
    pGamepad->SetVibration(vib);

    // Turn off vibration.
    vib = {0};
    pGamepad->SetVibration(vib);

}  

Requirements

Namespace: Windows.Xbox.Input

Metadata: windows.winmd

See also

Reference

GamepadVibration Structure

GamepadVibration Members

Windows.Xbox.Input Namespace