Fading out a character

Hello all!

I am in need of fading out my Character in my game, such that when you zoom in on the back of their head, it will adjust the alpha and fade them to nothing. Much like how World of Warcraft does.

I have tried setting the color.a to a value but it doesn’t like that.

Such as
myAvatarMale.renderer.material.color.a = 0.0F;

Give me an error in the code.

Any suggestions? I just need the entire mesh to fade out of view while the camera is zoomed in (not turned off)

Thanks!

Always post your errors; otherwise, it’s difficult for people to help. (If it’s a compiler error, post the error message; if it’s a run-time error, post whatever’s displayed in the console.)

Anyway, depending on what language you’re using, you may need to assign a new Color object to the material ‘color’ property, rather than just assigning an alpha value.

also you may need to iterate thru all your materials assigned to your character and adjust all their alpha values.

hello all!
actually I want to know that my characters are getting black after the build in mobile can you tell me why

You’ve just necro’d a thread from 11 years ago with absolutely no information. Please create your own threads in the future and provide some information in them.

Please read the Unity Community Code of Conduct .

Thanks.

2 Likes