Search Unity

Object Fade when blocking character

Discussion in 'Scripting' started by MrReclusive, Nov 22, 2014.

  1. MrReclusive

    MrReclusive

    Joined:
    Nov 16, 2014
    Posts:
    14
    Hello.
    I am working on an isometric view game, and well its in a city so it has tall builds.
    I need the buildings to fade when blocking the character from the camera.

    came across this http://answers.unity3d.com/questions/390473/hide-objects-blocking-character-view.html#answer-390510
    but cant get it to work.
    I have itween installed, and when watching the camera with that script attached, nothing ever shows up in object field, Ive even tried manually adding an object into that public field and that object still does not fade.

    thoughts? or a better way to do this?
     
  2. fire7side

    fire7side

    Joined:
    Oct 15, 2012
    Posts:
    1,819
    Maybe the hit distance isn't far enough? It's set to 30, hardwired in the function.
     
  3. MrReclusive

    MrReclusive

    Joined:
    Nov 16, 2014
    Posts:
    14
    tried anywhere from 10 to 1000 on this.