cancel
Showing results for 
Search instead for 
Did you mean: 

How do I use OVRHapticsClip?

Anonymous
Not applicable
I'm trying to add haptic feedback to Touch Controllers in my game but I'm completely stuck on how to do that.  I've read all the documentation provided by Oculus which recommends several different methods, the most recent of which relies on playing OVRHapticsClips.

My problem is that Unity freezes when trying to create any OVRHapticsClip.  It doesn't just error, the entire program stops responding the same as when stuck in an infinite loop.

Are there any examples of code to play haptic feedback on the Touch controllers?  Or is there a limitation on the type of audioclip that can be used to create an OVRHapticsClip?


1 ACCEPTED SOLUTION

Accepted Solutions

Anonymous
Not applicable
Ok, problem solved.  I figured out it was InitializeFromAudioFloatTrack in OVRHapticsClip.cs that was getting stuck in an endless loop, so I added a loop counter and made it break out of the loop when it reached 1000.  I hope this function will work more reliably in the future.

View solution in original post

1 REPLY 1

Anonymous
Not applicable
Ok, problem solved.  I figured out it was InitializeFromAudioFloatTrack in OVRHapticsClip.cs that was getting stuck in an endless loop, so I added a loop counter and made it break out of the loop when it reached 1000.  I hope this function will work more reliably in the future.