Skip to content

Instantly share code, notes, and snippets.

@unity3dcollege
Created February 15, 2017 01:38
Show Gist options
  • Save unity3dcollege/77a12e31ce25a3a27ce80e6bc4a25f1d to your computer and use it in GitHub Desktop.
Save unity3dcollege/77a12e31ce25a3a27ce80e6bc4a25f1d to your computer and use it in GitHub Desktop.
using UnityEngine;
public class OculusDemo : MonoBehaviour
{
[SerializeField]
OculusHapticsController leftControllerHaptics;
[SerializeField]
OculusHapticsController rightControllerHaptics;
private void Update()
{
if (Input.GetKeyDown(KeyCode.Space))
{
leftControllerHaptics.Vibrate(VibrationForce.Hard);
rightControllerHaptics.Vibrate(VibrationForce.Light);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment