Search Unity

Terrain How to make a terrain detail rotate according to terrain height?

Discussion in 'World Building' started by Jonhas, Jan 6, 2020.

  1. Jonhas

    Jonhas

    Joined:
    Jul 28, 2019
    Posts:
    42
    Here's an example of my problem:
    https://imgur.com/a/xqB148v

    I am trying to use detail to make my world look a little better then right now, but the grass detail texture is clipping into the hill in the terrain background. I am wondering how to rotate the detail in a way so it looks like its coming out of the hill instead of clipping in the hill. It would be very helpful if there is a fix to this issue. If you answered, thanks for answering!
     
  2. DFAST26

    DFAST26

    Joined:
    Dec 14, 2016
    Posts:
    1
    looks like your detail is a sprite that "always faces camera"
     
  3. Jonhas

    Jonhas

    Joined:
    Jul 28, 2019
    Posts:
    42
    That's not what I mean, if you see the image I linked the grass of clipping into the hill, so I was wondering how to rotate it to a point so it doesn't look like it's clipping in.
     
  4. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,788
    pick the normal of the face it's on
    On grass spawn :
    -Raycast down
    -pick returned normal
    - align grass' up with normal
     
unityunity