Search Unity

Help Using Vuforia AR Camera as Trigger in Unity

Discussion in 'AR/VR (XR) Discussion' started by ramphulneillpartners, Aug 9, 2017.

  1. ramphulneillpartners

    ramphulneillpartners

    Joined:
    Jul 30, 2017
    Posts:
    10
    Hi all,

    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");
    }
    }
    }
     
  2. gibbrish123

    gibbrish123

    Joined:
    Feb 29, 2020
    Posts:
    8

    Hello..... were you able to solve this??? I am struggling with the same step. It would really help me out of if you could sahre the solution.
     
  3. gibbrish123

    gibbrish123

    Joined:
    Feb 29, 2020
    Posts:
    8

    I've posted this same problem on SO, if you have a solution please let me know. Thanks in advance.
     
  4. michaelhardie63

    michaelhardie63

    Joined:
    Aug 15, 2021
    Posts:
    1
    Same here, is struggling to find a solution to this. I am having to using Adobe Aero to achieve this but it is not ideal.
     
  5. EricBlouin

    EricBlouin

    Joined:
    Mar 8, 2021
    Posts:
    2
    Any of you guys had some success. I have the same problem here.
     
  6. EricBlouin

    EricBlouin

    Joined:
    Mar 8, 2021
    Posts:
    2
    Have you ever foundthesolution?