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 are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here: unity.com/legal/terms-of-service.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice
  4. Join us on Thursday, September 29, for a day with Unity's SRP teams here on the forum or on Reddit, and discuss topics around URP, HDRP, and the Scriptable Render Pipeline in general.
    Dismiss Notice

Question Lock Spawned GameObjects' position

Discussion in 'AR' started by acandael, May 17, 2022.

  1. acandael

    acandael

    Joined:
    Apr 7, 2021
    Posts:
    52
    Hello,

    I am using ARFoundation to track a QR code and instantiate an object on top of it. This works fine, but the instantiated object is sometimes subject to sudden shift or rotation although the QR code hasn't moved. Or sometimes is a bit 'trembling'. Therefore, since in my case the QR code is not gonna be moving, I'd like to find a way to lock its position/rotation once and for all.

    How could I achieve that, so that the GameObject doesn't move at all anymore?

    Is it possible that the problem comes from the camera position, that is not correctly evaluated at all times?

    Thanks a lot,
    Arnaud.
     
  2. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    150
    If the QR code does not need to be actively tracked, you can disable the TrackedImageManager to stop image tracking once the image has been detected.
     
  3. FernwehSmith

    FernwehSmith

    Joined:
    Jan 31, 2022
    Posts:
    34
    Have a look at the anchors section in the documentation. Sounds like that might be what you need
     
    acandael likes this.
  4. acandael

    acandael

    Joined:
    Apr 7, 2021
    Posts:
    52
    I'll look into that. Thank you guys!
     
unityunity