Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Fade In and Out Objects

Discussion in 'Scripting' started by Paykoman, Mar 4, 2015.

  1. Paykoman

    Paykoman

    Joined:
    Jun 26, 2014
    Posts:
    500
    Hi guys im searching for a week to find a solution for my question, i already check all the forum answer and nothing work properly.
    So im creating a 3rd person game like Diablo and i want the objects like walls that stays bettween the camera and player to fade off so i can see player behind it and then back to normal when i leave behind, at same time since im using click to move, i wanna know if its possible to fade off the object and click the character to move in that place cuz i test one but even with object transparent i cant click cuz mouse assume the wall yet so i have to click in open zone to character move. If someone cant help me i will appreciate since i already lose lots of time searching...

    Appreciate any kind of help.
     
  2. Strategos

    Strategos

    Joined:
    Aug 24, 2012
    Posts:
    255
  3. Paykoman

    Paykoman

    Joined:
    Jun 26, 2014
    Posts:
    500
    I test it but steal not working... the wall keep full difuse even with the camera casting the Ray line to player :s

    This is so annoying..
     
  4. Paykoman

    Paykoman

    Joined:
    Jun 26, 2014
    Posts:
    500
    Bump. Anyone plz? If it will be easy with Unity 5.0i hv it too installed. Appreciate
     
  5. JamesLeeNZ

    JamesLeeNZ

    Joined:
    Nov 15, 2011
    Posts:
    5,616
    Use a shader with an alpha channel, adjust alpha value to fade in/out
     
  6. Paykoman

    Paykoman

    Joined:
    Jun 26, 2014
    Posts:
    500
    So i hv to cast ray anyway and the if mesh stills betwwen i change alpha? any example or part-example script in internet i can check? im kinda newbie at this.. Sry and ty for ur time
     
  7. JamesLeeNZ

    JamesLeeNZ

    Joined:
    Nov 15, 2011
    Posts:
    5,616