I want a little help on my unity Project
I try to make a game where you fly and through the gates and try to match the color of the gate and your color.But i need some help at matching the colors becouse u see i have like 3 gates and i made that them could get a random color but how to i do that when i ,,colide'' or intersect with the gate to compare the colors.like if colors match you can continue if not then gameover. here are my scripts. ..On player: public void ColorChange() { int colors = Random.Range(0, color.Length);
    material.color = color[colors];
     myColor = color[colors];
 }
 
               ..On TripleGate: public void ColorChange() {
     int color1 = Random.Range(0, color.Length);
     int color2 = Random.Range(0, color.Length);
     int color3 = Random.Range(0, color.Length);
     material[0].color = color[color1];
     material[1].color = color[color2];![alt text][1]
     material[2].color = color[color3];
 }
 
               [1]: /storage/temp/159811-image.png
Your answer
 
             Follow this Question
Related Questions
Whys isnt the gameObjects changing colour? 0 Answers
color of material not showing up (blender to unity),material color missing 0 Answers
Primitive colors and materials 0 Answers
Storing Renderer in a variable not working! 1 Answer
All colors values are RGBA(127, 127, 127, 255) and I can't fix it 0 Answers