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’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. 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.. : )