I want to be able to detect if the player is standing on a cylinder with the tag "PositionTracker". I have enabled is trigger on the cylinder and added rigidbody to it. I have the script below attached to the 'XR Origin (XR Rig)' game object but currently not seeing any output in the console. Not sure if I attached it to the correct player game object though. What did I do wrong?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TrackPosition : MonoBehaviour
{
private void OnTriggerEnter(Collider other)
{
if (other.gameObject.CompareTag("PositionTracker")){
Debug.Log("on the tracker");
}
}
}