- Home /
Question by
BawsAnimations · Sep 03, 2012 at 12:44 AM ·
3dlightfiretorch
Unity 3D - Lighting - Torches - HELP!
I am making torches in Unity3d. I have made my wooden mesh and everything. I have also created a fire using the particle system. WHY WON'T MY FIRE LIGHT UP THE SURROUNDING AREA? The fire is lit up, but the small surrounding areas are still pitch black! Please give a solution! Reply soon!
Comment
Best Answer
Answer by save · Sep 03, 2012 at 12:54 AM
How are you activating the torch? I assume it is a point light, try something like this:
var torchLight : Light; //Add the light source to the torch in Inspector
private var torchActive : boolean = false;
function Update () {
if (Input.GetKeyDown(KeyCode.T)) ToggleTorch();
}
function ToggleTorch () {
torchActive=!torchActive;
torchLight.enabled = torchActive;
}
Your answer
Follow this Question
Related Questions
Light flashing through walls help 0 Answers
A node in a childnode? 1 Answer
Fire in Unity3D - Fire particles 1 Answer
How can I import maya dynamics? 2 Answers
Guard pass throught the walls in Unity Project #1 Stealth! 1 Answer