- Home /
Light position
Hi - I am pretty new to Unity, and am bit confused.
I would like to have an object, what makes light - like a torch. I have it's position in space, I want a point light out of it, but not from it's position, but some bit relative to it: so the light comes from fire and not from the torch itself.
I tried to set light's position like this:
light.transform.position = transform.position + new Vector3(0, RelY, 0);
... and well, my whole object started to fly away LOL.
So... how is this done properly?
Thanks in advance: Péter
Answer by DaveA · Aug 15, 2012 at 08:54 PM
I bet you did that in an Update function. Do it at start. Or better yet, just make the light a child of the torch and do it in the editor (3d view and/or Inspector) and don't bother to code it at all.
Your answer
Follow this Question
Related Questions
Make a Lava Object Shiny 1 Answer
How to get a 'glow/highlight' effect on a object 1 Answer
how do you destory an object with light?? 2 Answers
How to fix the light passes through the object 1 Answer
Exclude objects from lights 1 Answer