Making A Solid Object Fade Away

How Do I Do That? :roll:

To make it transparent, have it’s shader be “Alpha”.

Fade. Not Be Transperent.

You’ll need to adjust the color of the material of the object that you want to fade out.

Use this page:
http://unity3d.com/Documentation/ScriptReference/Material.html

That should be all the help you need.

That doesn’t make any sense. There is no alpha change or whatever. :o

As I just said…

The color DOES have an alpha value. You can see this if you click on the links of the page I provided. Change that alpha to make the object more or less transparent.

Depends in what do you want to fade, color ? texture ? transparency ? shape ?

:smile:

Unity allows all that and probably more than i can think!

Your questions are becoming more and more globals, it looks like in one or two months you’ll be asking “How to create a game?”, im not helping you anymore unless you start helping yourself by learning, testing and taking all the help people here give to you.

.ORG

How Do I Create A Game?

:stuck_out_tongue:

Did you bet on me asking that?

I kinda did…

There is another topic like this now. But their scripts don’t work. Um?

I was trying:

var colorStart : Color; 
var colorEnd : Color; 
var duration = 3.0; 

function Start () { 
  colorStart = renderer.material.color; 
  colorEnd = Color(colorStart.r, colorStart.g, colorStart.b, 0.0); 
} 
} 

function FadeOut () 
{ 
  for (t = 0.0; t < duration; t += Time.deltaTime) { 
    renderer.material.color = Color.Lerp (colorStart, colorEnd, t/duration); 
    yield; 
  } 
}

:frowning:

It looks like your braces { and } don’t match. Try cleaning that up:

function Start () { 
  colorStart = renderer.material.color; 
  colorEnd = Color(colorStart.r, colorStart.g, colorStart.b, 0.0); 
} 
}

becomes:

function Start () { 
  colorStart = renderer.material.color; 
  colorEnd = Color(colorStart.r, colorStart.g, colorStart.b, 0.0); 
}

Whenever you have a script error, Unity prints that to the system Console (and to the error log at the bottom of the Unity window). If you include what it says with your errors, we can help you much better :wink:

Oh, and do read: http://www.unifycommunity.com/wiki/index.php?title=Programming_Chapter_1#What.27s_the_Scope.3F