Search Unity

How to spawn gameobjects on different Trackable planes

Discussion in 'AR' started by mumudo, Jul 26, 2019.

  1. mumudo

    mumudo

    Joined:
    Oct 2, 2017
    Posts:
    4
    Hi folks, I am stuck on an issue for two weeks. Essentialy I have a script that enumerates the planes from the ARPlaneManager (As suggested from ARfoundation 2.2. documentation) in order to grab all my planes. In this foreach loop, I am grabbing each trackable plane and adding it to a list of ARplanes. My endgoal is to be able to spawn objects on different planes by indexing through the collection of trackable planes. Essentially, the idea is to instantiate the objects at the position of Plane etc. So far I have only been able to spawn an object on the first trackable plane. After that, the objects seem to spawn on top of each other.

    I assume this is because ARplanes are overlapping due to being added, removed, updated during run time. Would anyone have any suggestions? Any help is greatly appreciated. Thank you!