- Home /
Change light color when entering trigger
Hi :) I'd like to change the color of a spotlight by walking into a trigger but it doesn't work. What did I do wrong?
var licht : Light;
function Update () {
}
function OnTriggerEnter(col : Collider) {
if(col.tag=="li") {
licht.Color = Color.red;
}
}
Comment
Answer by SeasiaInfotechind · Oct 29, 2015 at 10:51 AM
Hi, your this line( licht.Color = Color.red; ) should be licht.color = Color.red; I hope this is the only problem.
Your answer
Follow this Question
Related Questions
Disco like GUITexture? 1 Answer
Popular Color/Light Bleeding Effect 0 Answers
GUI text shown on collision 1 Answer
How can I achieve homogenous lighting? (Same intensity no matter the range from origin) 0 Answers
Using shadows as Triggers? 1 Answer