how to implement Oculus touch controller vibration , any example?
2 Answers
2Iām also struggling with this as a beginner, since there is almost nothing on the web.
Tried building an array of sample bytes.
Then I read that the recommended ways is to use an audioclip from a sound file.
So I tried this, but still nothing:
OVRHapticsClip haptic = new OVRHapticsClip(audioClip);
OVRHaptics.RightChannel.Preempt(haptic);
Make sure that you're wearing the Oculus rift when this function is called. Haptics won't work otherwise
ā jeromechorelHey, i found the solution, its working for me :
public AudioClip VibeClip;
OVRHaptics.Channels[0].Mix(new OVRHapticsClip(VibeClip));
I'm unsure, what does the adb log say? Personally, my first suspicion is RAM. If your image is too large, (~40MB+) Android will kill your app for using too much memory. http://answers.unity3d.com/questions/547900/how-to-prevent-android-to-kill-my-unity-app-.html . Your image appears twice in memory because you encode it into JPG, so your max image size is half that. Since the data you downloaded is already in JPG format, you could just save www.bytes instead of re-encoding the image. Then right after saving it, go www.Dispose() to clear it from RAM asap.
ā FlyingHighUp
It also doesn't work for me (Using Unity 5.5.1). Did you already find a solution?
ā Hanne_Huygelier