Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

ARKit - Adding anchor to augmentation prefab at runtime.

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

  1. Prabhug


    Dec 17, 2018

    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.. : )