GamepadVibration.LeftMotorLevel Field

The level of the left vibration motor. Valid values are between 0.0 and 1.0, where 0.0 signifies no motor use and 1.0 signifies max vibration.

Syntax

public:
float32 LeftMotorLevel  

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 the left and right motor levels to 0.75f and then to 0.0f to turn them off. Vibration continues at the specified levels for approximately 2.5 seconds, or until you call SetVibration again with new GamepadVibration values.

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

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

    // Turn off vibration.
    vib.LeftMotorLevel = 0.0f;
    vib.RightMotorLevel = 0.0f;
    pGamepad->SetVibration(vib);

}  

Requirements

Namespace: Windows.Xbox.Input

Metadata: windows.winmd

See also

Reference

GamepadVibration Structure

GamepadVibration Members

Windows.Xbox.Input Namespace