I wish to trigger events when an operator moves their device camera within proximity of a augment reality object. In other words I can’t get ARcamera import from Vuforia to trigger colliders on Unity.
I have attached empty game object, rigid body, sphere collider and script (below) to object and tagged AR Camera as Player. (I have also tried all other combinations of attaching colliders to AR camera, etc) with no luck. Any help greatly appreciated! Thank you. tim
PS script running fine on Unity just the Debug.Log event not appearing on Console.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ARCameraProximity : MonoBehaviour
{
public void OnTriggerEnter(Collider other)
{
if (other.tag == “Player”)
{
Debug.Log (“Entered”);
}
}
public void OnTriggerExit(Collider other)
{
if (other.tag == “Player”)
{
Debug.Log (“Exited”);
}
}
}