public void SetMotorSpeeds(InputDevice device, float lowFrequency, float highFrequency) { if (device == null) { throw new ArgumentNullException("device"); } lowFrequencyMotorSpeed = Mathf.Clamp(lowFrequency, 0.0f, 1.0f); highFrequencyMotorSpeed = Mathf.Clamp(highFrequency, 0.0f, 1.0f); var command = DualMotorRumbleCommand.Create(lowFrequencyMotorSpeed, highFrequencyMotorSpeed); device.ExecuteCommand(ref command); }
public void PauseHaptics(InputDevice device) { if (device == null) { throw new ArgumentNullException("device"); } if (!isRumbling) { return; } var command = DualMotorRumbleCommand.Create(0f, 0f); device.ExecuteCommand(ref command); }