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. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

Questions about Place on Plane and Tracking Enable/Desable (Arkit)

Discussion in 'AR' started by Artificial_Illusions, May 5, 2019.

  1. Artificial_Illusions

    Artificial_Illusions

    Joined:
    Jul 24, 2018
    Posts:
    20
    Hello,
    Today I had to halt production on my AR game using the pre-ARFoundation AR packages and kind of start over using the ARFoundation Package. So, I have a couple of questions:

    I am using SampleUXScene as template, and what I am trying to achieve are the following:

    -After I track a surface, I spawn a Surface prefab in which my game will run on top of it, I want the app to stop tracking for surfaces completely to avoid clicking anywhere on the screen and re-positioning the prefab. Basically, once the hit is done, spawn the surface and start the game, no more AR tracking after this point. How do I stop this via script? I am usually using a disable method with a custom script but I am not sure if this is the right way.

    Second, with the previous ARKit Plugin, I could just place my entire game's structure under the "HitTestCube". Now, with ARFoundation, PlaceOnPlane only instantiates a prefab, what would be the most straightforward way to Start a game as soon as the Surface prefab has been spawned? One idea I have is to enable game objects ontop of the Surface prefab.
    I'm new with ARFoundation and I'd like to hear from more experienced developers.
    Thanks!