Page 1 of 1

torch

Posted: Wed Sep 08, 2010 7:31 pm
by SweetRevenge
ok, I want to make a torch for my player to hold while he is traveling through dark areas or whatever. I want to make a spawn point in the players left hand, and when lets say F is pushed, I want the torch to appear, and when F is pushed again the torch is detroyed. Can anyone help please?

Re: torch

Posted: Wed Sep 08, 2010 8:28 pm
by SweetRevenge
kinda to go along with this, how can i completely turn out all of the lights in unity?

Re: torch

Posted: Wed Sep 08, 2010 8:56 pm
by hallsofvallhalla
should just be able to make the light or torch and turn it into a prefab. then just create a instance of the prefab when button is pushed.

Re: torch

Posted: Wed Sep 08, 2010 10:07 pm
by SpiritWebb
Take a look at the FPS tutorial that Unity offers found here: FPS Tutorial. In there it has swapping of weapons between numbers 1 and 2. You could easily use that to compensate for the "F" press to show the torch and put it away. As for the lights, you could add a light source to the torch and it activates when pressing "F." It will take a little scripting to do, but will achieve the end result. I have this in my space game. When pressing "E" the ship begins to move and the lights turn on and flames come out to give it that "look."

You can find that result on how to achieve that by looking at the 3rd person tutorial that Unity offers found here: 3D Platform Game - 3rd Person

Take a look at both of those tutorials, combining pieces of both should achieve what you are looking for!! :)