- Home /
Prefab Transform & Light Child Transform
I have a prefab, and it has a mesh and a light component attached. both components use one transform. I would like to have the light offset (slightly higher, like 0,1,0 ) from the mesh.
I have tried nearly everything to modify just the light's transform, but to no avail. Moving the light's transform manages to modify the entire prefab's.
Is there anyway possible to have an offset on the light?
Answer by Berenger · Jan 28, 2012 at 03:05 PM
Other than spliting your object in two, I don't think you can move only the light. On the other hand, you can podify the mesh to move it's vertex in a given direction. Loop on all the vertices, add your Vector3 offset and your good to go (http://unity3d.com/support/documentation/ScriptReference/Mesh.html)
Your answer
Follow this Question
Related Questions
Clicking on a prefab object in scene view either selects ground behind it or the prefab child 1 Answer
setting the parent of a transform which resdes in a prefab is dusabled to prevent data corruption 1 Answer
Instantiate a Prefab as child 0 Answers
Make a simple tree 1 Answer
Spawn Shield to all objects 2 Answers