One way of getting an orientation from that, is by creating locator A at
that point, locator B at the origin, and aim constrain B to A. Then B will
contain one (of many possible) orientations for that vector. If you like
math, you can also have a look at (pun!) calculating the orientation from
three points; that vector, the origin and an "up vector", for example (0,
1, 0). In OpenGL, such an operation is called "look at"
<https://stackoverflow.com/questions/21830340/understanding-glmlookat> and
is what the aim constraint is doing too.

On Thu, 29 Nov 2018 at 13:45, <[email protected]> wrote:

> Hello there
>
> I got the normals vertex with:
>
>
> cmds.select(  ** my vertex **, r=True )
> resultNormalVertex=cmds.polyNormalPerVertex( query=True, xyz=True )
>
>
> Result -> [0.9876886606216431, 0.0, -0.15643233060836792] which I guess is
> a vector.
>
> I create a locator at the same vertex position, but would like also to
> have a correct orientation based on the vertex normals.
>
> What would be the right python command for that ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/c45e3da3-e3e2-431d-bcf8-2b804456602a%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAbtXghGiU7i%2BWQ6PjYKfFx2pSDhbmTeZjHSs3Ty1%3DJxg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to