HUGE CHANGES !!!!Add Assembly definitions for code!!!!

This commit is contained in:
xpeng
2022-07-26 15:36:43 +02:00
parent 642f28b29c
commit 54c392fb39
43 changed files with 152 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR;
public class Controller : MonoBehaviour
{
public XRNode Hand;
InputDevice device;
public float duration;
public float amplitude;
private void OnTriggerEnter(Collider other)
{
device = InputDevices.GetDeviceAtXRNode(Hand);
device.SendHapticImpulse(0, amplitude, duration);
}
private void OnTriggerExit(Collider other)
{
device = InputDevices.GetDeviceAtXRNode(Hand);
device.StopHaptics();
}
}