Search Unity

AR Foundation + Unity Terrain

Discussion in 'AR' started by Edur-Games, Sep 15, 2018.

  1. Edur-Games

    Edur-Games

    Joined:
    Nov 21, 2017
    Posts:
    48
    Hello! I want to create a scene Wingnut AR style and I wonder if I can use unity terrain.
    I need a small terrain to use on the Place to Plane. But the terrain is not positioned in the center of the hitpoint. Objects are unregistered and sometimes not displayed.
    Please suggest that I use to generate this type of scenarios and how to fix it?

    Thanks!
     

    Attached Files:

  2. tdmowrer

    tdmowrer

    Joined:
    Apr 21, 2017
    Posts:
    605
    Please see https://forum.unity.com/threads/scaling-with-arfoundation.543953/
     
  3. Edur-Games

    Edur-Games

    Joined:
    Nov 21, 2017
    Posts:
    48
    Hello! Thank you for your answer tdmowrer.
    I'm trying to reproduce the example of the link you've provided me but something I must be doing wrong..
    Can you please send me a screenshot of your hierarchy and how to use the MakeContentAppearIt? To be able to put the terrain in the center

    Thanks a lot
     
  4. Edur-Games

    Edur-Games

    Joined:
    Nov 21, 2017
    Posts:
    48
    Hello again.
    I pass some screenshots of the result when I use a terrain of unity.
    The problem is that the pivot point is not in the center of the terrain and I always catch that point as a point of origin and I want it placed in the center.
    This with a plane object does well but with a terrain I can not do it.

    Thanks
     

    Attached Files:

  5. tdmowrer

    tdmowrer

    Joined:
    Apr 21, 2017
    Posts:
    605
    Hi folks,

    Create a GameObject where ever you want the center of you landscape to be (the "pivot") and use that as the "content" argument to MakeAppearOnPlane. Since this function moves the camera and not the content, it doesn't matter where the content exists in the hierarchy -- it's just a transform in space.
     
  6. Edur-Games

    Edur-Games

    Joined:
    Nov 21, 2017
    Posts:
    48
    Thanks!! its already works for me..
    The pivot gameobject was missing to put it as content..

    Thank you for your help
    Edu