Search Unity

XCom style overlay effect for movable area

Discussion in 'General Graphics' started by hakankaraduman, Jul 5, 2021.

  1. hakankaraduman

    hakankaraduman

    Joined:
    Aug 27, 2012
    Posts:
    354
    Hi,

    I'm trying to figure out how to make this kind of effect around the movable area, do you have any tips? See the golden color line in the image please.

     
  2. LethalInjection

    LethalInjection

    Joined:
    Jan 25, 2015
    Posts:
    37
    there are at least two ways to do this.
    1) outline shader on your navmesh/meshcollider.
    this allows the outline to change with your mesh, but a lot of work in the shader.
    2) square texture on a quad and you manually draw in the outline to match your moveable area.
    a) this is easier to implement, but if you change the walk able area, then the texture has to be updated manually to match.
    b) write a c# editor script to make texture2d/sprite based on a convex hull algorithm of the vertices in your navmesh.
     
    hakankaraduman and Rich_A like this.
  3. hakankaraduman

    hakankaraduman

    Joined:
    Aug 27, 2012
    Posts:
    354
    Thanks for giving the direction, both sounds above my skill level but I will try to learn. Do you maybe have some articles you can reference? Okay if not, thanks a lot again.