- Home /
Changing character colour on code
Hello guys.
I want to make something like a "stealth mode activation", where the player pushes a button and the character change colour, in a linear way, like:
for(i=0; i< ffffff; i++){
SetCharacterColor = i;
}
and after that, it goes transparent.
The problem is: i dont know the names of variables and methods of the object. The logic i know (of at least think i know).
Thanks
Answer by anwe · Nov 27, 2011 at 08:18 PM
well, to make a colour compleately incvisible u should just change the alpha property of a texture, just look at
renderer.material.color.a -= Time.deltaTime
The idea is to change the value of the alpha color of the character's material to smoothly fade to trasparent. Have u understood? :D
Your answer
Follow this Question
Related Questions
Initialize method parameter 1 Answer
change color object 2 Answers
How to assign an object to variable C#? 1 Answer
Does the two code samples differ? 1 Answer
how to change to another object after button is pressed 1 Answer