public static void SetVibration(PlayerIndex playerIndex, float leftMotor, float rightMotor) { XInputVibrationState vib = new XInputVibrationState(); vib.LeftMotorSpeed = (ushort)(leftMotor * 65535); vib.RightMotorSpeed = (ushort)(rightMotor * 65535); Imports.XInputSetState((uint)playerIndex, ref vib); }
public static extern uint XInputSetState(uint playerIndex, ref XInputVibrationState vib);