Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

ARKit - Adding anchor to augmentation prefab at runtime.

Discussion in 'AR' started by Prabhug, Jul 1, 2019.

  1. Prabhug

    Prabhug

    Joined:
    Dec 17, 2018
    Posts:
    5
    Hello,

    I am using ARKit Image detection for my project.

    After the Image is detected, I am able to instantiate the 3D Model object(augmentation).But the spawning position is different.

    So I have included a pan script to move the instantiated prefab (augmentation) to my desired position.

    After I moved the augmentation to desired position, I want to lock the augmentation at the exact desired position.

    As per my understanding, I have to add an anchor to the instantiated augmentation prefab in order to lock its position after I moved it to desired position.

    But I am having trouble adding the anchor to the instantiated prefab at the runtime.

    It would be very helpful, if you suggest which anchor (or) anchor method(Plane, User, Image) is appropriate and how to use them in unity - c# scripting.

    Thank you in advance.. : )
     
unityunity