x


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

more ▼

asked Nov 27 '11 at 08:01 PM

diegoasleik gravatar image

diegoasleik
1 1 1 1

(comments are locked)
10|3000 characters needed characters left

1 answer: sort oldest

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

more ▼

answered Nov 27 '11 at 08:18 PM

anwe gravatar image

anwe
114 31 34 38

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1094
x822
x507
x178
x55

asked: Nov 27 '11 at 08:01 PM

Seen: 691 times

Last Updated: Nov 27 '11 at 08:18 PM