using UnityEngine; using UnityEngine.SceneManagement; public class DetectCollisions : MonoBehaviour { public WebSocketClient webSocketClient; public GameManager gameManager; // Start is called before the first frame update private void Start() { webSocketClient = GameObject.Find("WebSocketManager").GetComponent(); gameManager = GameObject.Find("GameManager").GetComponent(); } // Update is called once per frame private void Update() { } private void OnCollisionEnter(Collision other) { Debug.Log("======OnCollisionEnter: "+ other.gameObject.tag); if (other.gameObject.CompareTag("Person")) { gameManager.SendVibration(); gameManager.SendVibrationRight(); } } }