Notifications
Clear all
[Closed] Get local vertex position in edit poly modifier
Aug 10, 2010 11:15 am
I’m trying to get the local coordinates for vertices in an edit poly modifier.
$.modifiers[#Edit_Poly].getVertex 1
This returns the world coordinates of vertex 1.
in coordsys #local doesn’t return the local coordinates either.
The only way I can get the local coordinates if I manually set the coordsys mode.
toolMode.coordsys #local
$.modifiers[#Edit_Poly].getVertex 1
But I’m sure there must be a better way. I hope there is.
3 Replies
Aug 10, 2010 11:15 am
you don’t need the # in front of local. The syntax of the context is
in coordsys local
nevertheless, I don’t know if this is the solution to your problem.
Aug 10, 2010 11:15 am
Just take away the vertex position from the objects pivot position.
($.verts[1].pos – $.transform.pos)
Aug 10, 2010 11:15 am
localPos = worldPos * (inverse obj.transform)
or
localPos = getVert obj.mesh 1