So thing is I making a so so simple script. Just want to scatter objects on vertices and orient out the objects from vertex normal. (Or an avaraged Vertex normal)
Now getting the position of the vertex was easy. But I am searching all the poly methods for hours now and I only found how to get the normal of a polygon not a vertex.
If someone could tell me the most easy ways to get the vertex normal information out. That would be lifesaver.
Thank you!
Comments (1)
Comment policy
Like this
delete objects
trg = Sphere radius:50 segs:32 name:"targetObj" wirecolor:red
src = Pyramid name:(uniquename "Spike") widthsegs:1 depthSegs:1 heightsegs:1 width:3 depth:3 height:20 wirecolor:yellow
meshObj = snapshotAsMesh trg
up = src.dir
for v = 1 to meshObj.numverts do
(
clon = instance src ; clon.wirecolor = yellow
norm = getNormal meshObj v
x = normalize (cross norm up)
y = normalize (cross norm x)
clon.transform = matrix3 x y norm (getVert meshObj v)
clon.parent = trg
)