- Home /
Fade in and fade out effect in game?
Hii..I'm facing another problem in unity and can't decide how to make an object from transparent to translucent to opaque when game is active. the transparency should change to opaque as my character comes near the object.
Answer by DaveA · Apr 05, 2011 at 09:49 PM
You need to alter the main color's alpha value on the material(s) involved. You could find the distance and then scale that to the 0 to 1.0 used by the alpha channel.
http://unity3d.com/support/documentation/ScriptReference/Material-color.html
Answer by AVividLight · Apr 05, 2011 at 10:26 PM
Its funny, because I'm not actually googling anything...
HAHAHA brilliant, I was just about to provide the link that your link ends up giving.
Your answer
Follow this Question
Related Questions
Alpha not displaying when changed in code, unless changed manually in the inspector 0 Answers
Shader with both Transparent and Fade as render mode 0 Answers
Transparency / Fade Material Shading Issues 0 Answers
When using 2 fade texture types next to each other, they turn transparent 0 Answers
Gui appear and then fade to black 1 Answer