- Home /
Flashlight Flare
Please help, i need that it was see only from front side
Check your colliders. The Flare will not be visible through colliders.
Answer by Catlinman · Oct 02, 2012 at 03:03 PM
You have to move the light infront of the flashlight or remove the collider from your flashlight object to get the flare to show up.
ok, i don't using colliders Only $$anonymous$$esh Render and $$anonymous$$esh Filter. Light is in font of the flashlight.
i need fix first screenshot the two screenshot is ligh disabled on three screenshot is all ok
Answer by siOnzee · Oct 02, 2012 at 03:34 PM
ok, i used Mesh Collider and work, thanx ! :) I love you guys !
Answer by camb0t · Nov 03, 2013 at 04:53 PM
var flashlightOn : boolean = false;
function Update () {
//Checks if the boolean is true or false.
if(flashlightOn == true){
light.intensity = 1;//If the boolean is true, then it sets the intensity to what ever you want.
} else {
if(flashlightOn == false){
light.intensity = 0;//If the boolean is false, then it sets the intensity to zero.
}
}
//Checks if the F key is down and whether the boolean is on or off.
if(Input.GetKeyDown(KeyCode.F) && flashlightOn == false){
flashlightOn = true; //If the f key is down and the boolean is false, it sets the boolean to true.
} else {
if(Input.GetKeyDown(KeyCode.F) && flashlightOn == true) {
flashlightOn = false;//If the f key is down and the boolean is true, it sets the boolean to false.
}
}
}
}
Your answer
Follow this Question
Related Questions
Light Glare Effects 2 Answers
Flare showing in cameras that should not show it 1 Answer
Pick up flashlight with "E" ? 0 Answers
Whats wrong with the camera? 0 Answers
How to make lightpole properly? 1 Answer