Home Unity

Make mesh transparent

Hi guys. I would like to know how to approach the buildings fade in and out like Diablo/torchlight when the player moves behind them in a way that we can still move in all map not selecting the transparent build/mesh if we are using a click to move method.

Appreciate any help

Replies

  • MikeF
    Offline / Send Message
    MikeF polycounter lvl 20
    You could do a simple raycast between the camera and the player and compare the results. If the hit object from the raycast ISNT the player, then fade out the hit object (i.e the building blocking the player). Then you'd store this hit object in a temporary variable so that when the raycast IS hitting the player again, you can fade that cached object back to full opacity
  • Paykoman
    I try find some kind of tutorials on this subject and i test some things but nothing seems to work at 100%... Appreciate ur help
Sign In or Register to comment.