Search Unity

How to show the character range in the terrain

Discussion in 'General Graphics' started by jsgg25, Nov 29, 2019.

  1. jsgg25

    jsgg25

    Joined:
    Sep 21, 2019
    Posts:
    3
    Hi everyone and thanks in advance.
    I am trying to paint the terrain showing the range of a character.
    Something like this:
    upload_2019-11-30_0-31-10.png

    The example is with a spotlight but it is not nice, problem with the shadows and different intensities. I would like to paint a triangle in the terrain.
    Any idea of how can I do this?
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,769
    Hi and welcome.
    Firstly this question is more suitable to Game Design forum section.
    I requested to move it there.
    Just use quad GameObject, with triangle shaped texture and put slightly above the ground.
     
    jsgg25 likes this.
  3. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,135
    It most certainly is not. This is a General Graphics question, not a design one. There's already enough things that have nothing to do with game design in Game Design.

    This method will only work if the ground is completely flat at all times. The ideal solution would probably be something involving decals. There's a free asset that works, so long as the instructions in the reviews are followed to ensure compatibility with more recent Unity versions.
     
    jsgg25 likes this.
  4. Olmi

    Olmi

    Joined:
    Nov 29, 2012
    Posts:
    1,553
    @jsgg25 you could also use an image effect that draws a world space distance effect. This would be then independent of geometry complexity and the underlying materials.
     
    jsgg25 likes this.
  5. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    4,044
    IF the terrain is flat, easiest way would be to just use a triangle mesh.
     
    Antypodish likes this.
  6. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,051
    Yea, definitely not design, moving to general graphics.
     
  7. jsgg25

    jsgg25

    Joined:
    Sep 21, 2019
    Posts:
    3
    Thanks to everyone for your tips! My terrain is not always flat, I will check your options.
     
  8. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,631
    Use a projector. It works similar to a light but it's just for drawing things.
     
    jsgg25 likes this.
  9. jsgg25

    jsgg25

    Joined:
    Sep 21, 2019
    Posts:
    3
    I tried with decals but it is too heavy. It needs to build the decal in every movement otherwise, it keeps the terrain shape. I will try with a projector as recommend @kdgalla