Search Unity

Vuforia AR Camera not working with terrain object

Discussion in 'AR/VR (XR) Discussion' started by bluehorizons, Jan 30, 2017.

  1. bluehorizons

    bluehorizons

    Joined:
    Jan 23, 2017
    Posts:
    4
    Hello

    I have created a terrain with houses on a hillside. When I use Vuforia AR Camera the houses display perfectly on my target image however the terrain does not. I found
    this video which seems to have a solution which I have tried. It improved the position of the terrain however the terrain is still not aligned with houses and also does not rotate when I rotate target image. (Basically creating Terrain 3D object under the default trackable event script)

    I have tried all sorts of combinations of parenting and childing terrain, I have tried terrain having static unticked and ticked.

    I feel like I am so close and I am missing something super simple. Attached is a simplified test, just using a terrain with the AR Camera and you can see how its scew on the image vs how it looks in editor.

    Please help I am trying to display this for a project in my master in Landscape Architecture (literally been looking for a solution for past 6 hours.)
     

    Attached Files:

  2. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    On scre2.png i can see that you have a camera and the image target parented under the AR camera.
    That makes no sense at all.
    A. Only one camera , the AR camera should be there.
    B. Do not parent the image target under your camera.

    If your terrain does not disappear if you lost sight of the marker you need to do the upgarde to the DefaultTrackableEventhandler Class like in the tutorial.
     
  3. bluehorizons

    bluehorizons

    Joined:
    Jan 23, 2017
    Posts:
    4
    Hi thanks for your reply.
    As I've said in my lengthy blurb I've tried many different combinations of parent and child with target image and AR camera...I am aware that the terrain is supposed to be a child of target image which is itself a parent.
    The AR camera comes standard with a childed camera, if I delete this then I get no background image.
     
  4. bluehorizons

    bluehorizons

    Joined:
    Jan 23, 2017
    Posts:
    4
    Okay update...I have no idea how or why. Literally I repeated this process this morning at 5am and it still wasnt working. I just tried again (keep in mind Ive just spend 2 days trying to find an answer to this), deleted everything in project, redownloaded vuforia, used my same target image, and now terrain moved with objects and is not at a weird angle. I'm so happy and confused I could cry.
     
  5. bluehorizons

    bluehorizons

    Joined:
    Jan 23, 2017
    Posts:
    4
  6. durgaprasadreddy

    durgaprasadreddy

    Joined:
    Feb 10, 2018
    Posts:
    1
    I am also facing the same problem can you please explain how you did it. Thank you
     
    Korosenai_Mod likes this.
  7. ankitmalviya6

    ankitmalviya6

    Joined:
    Jul 31, 2018
    Posts:
    1
    did you figure out how did you do it?
    I'm facing the same problem. Help me please
     
  8. johannesfasching

    johannesfasching

    Joined:
    Jul 21, 2015
    Posts:
    1
    Anyone got deeper into this problem and may provide a workflow?
     
  9. guna_chand

    guna_chand

    Joined:
    Nov 25, 2018
    Posts:
    1
    I've faced the same problem. But now it solved!! Thanks for you. Previously i've set the Image Target as the child of AR camera and it caused the problem.
     
  10. Ministro3D

    Ministro3D

    Joined:
    Sep 16, 2019
    Posts:
    1
    I faced the same problem could you please share the steps and the right settings?
     
  11. unity_HTTpg68h_hZSxw

    unity_HTTpg68h_hZSxw

    Joined:
    Jul 15, 2019
    Posts:
    1
    I was looking at the solution for this problem myself when I stumbled upon this thread: https://forum.unity.com/threads/vuforia-terrain-rotation.584560/

    I too got it working "by setting the setting "World Center mode" of my ARCamera to "specific target" as the target under my terrain!" in the ARCamera -> Vuforia Behaviour (Script).
     
  12. augmentaio

    augmentaio

    Joined:
    Jun 14, 2016
    Posts:
    8
    I am using Vuforia on Hololens and World Center mode cannot be changed here. It must be device. Any idea what else I could do?