Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

AF Foundation - Checking camera intersection with GameObjects?

Discussion in 'AR' started by scottunity, Jul 21, 2019.

  1. scottunity

    scottunity

    Joined:
    Feb 1, 2014
    Posts:
    72
    What's the best method to check the intersection of the device (with camera) and a game object?
    As the user moves in AR space I want to trigger actions as they walk through various game objects.
     
  2. astratakis

    astratakis

    Joined:
    Mar 18, 2019
    Posts:
    10
    You can use colliders on your Gameobjects and enable "Is Trigger". Then handle them with
    OnTriggerEnter and OnTriggerExit methods. Note that your Session Origin must have a Rigidbody attached.