x


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?

alt text

more ▼

asked Jan 28 '12 at 12:17 PM

pchan3 gravatar image

pchan3
16 1 1 1

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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)

more ▼

answered Jan 28 '12 at 03:05 PM

Berenger gravatar image

Berenger
11k 12 19 53

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1279
x1255
x717
x427
x410

asked: Jan 28 '12 at 12:17 PM

Seen: 752 times

Last Updated: Jan 28 '12 at 03:05 PM