Dear all,
The OVR Haptics classes provided by Oculus Rift should allow the developer to let the Oculus Touch Controllers vibrate in order to be provide haptic feedback.
When I try to make the touch controllers vibrate, using the OVR Haptics classes it doesn’t work. Here is my code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MakeHapticClip : MonoBehaviour {
[SerializeField] private AudioClip audio;
const int channel = 1;
OVRHapticsClip HapticClip;
// Use this for initialization
void Start () {
// Make Haptic Clip:
HapticClip = new OVRHapticsClip(audio, channel);
// Play Haptic Clip:
Debug.Log("play haptics");
OVRHaptics.RightChannel.Preempt (HapticClip);
OVRHaptics.LeftChannel.Preempt (HapticClip);
}
}
Has anyone had more luck than me trying to make the haptics work?