Skip to content

Commit 9ee3df8

Browse files
Add durationMicroSec to TriggerHapticPulseInController method (#9)
1 parent 4d77a8e commit 9ee3df8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

EasyOpenVRSingleton.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,10 @@ public bool GetBooleanTrackedDeviceProperty(uint index, ETrackedDeviceProperty p
286286
}
287287

288288
// TODO: This has apparently been deprecated, figure out how to do it with the new input system.
289-
public void TriggerHapticPulseInController(ETrackedControllerRole role)
289+
public void TriggerHapticPulseInController(ETrackedControllerRole role, ushort durationMicroSec = 10000)
290290
{
291291
var index = GetIndexForControllerRole(role);
292-
OpenVR.System.TriggerHapticPulse(index, 0, 10000); // This works: https://github.com/ValveSoftware/openvr/wiki/IVRSystem::TriggerHapticPulse
292+
OpenVR.System.TriggerHapticPulse(index, 0, durationMicroSec); // This works: https://github.com/ValveSoftware/openvr/wiki/IVRSystem::TriggerHapticPulse
293293
}
294294

295295
public InputOriginInfo_t GetOriginTrackedDeviceInfo(ulong originHandle) {

0 commit comments

Comments
 (0)