i know how to use the angleBetween command to find the angle between two vectors, and then use the rotateBy method to rotate one vector to align with the other. My problem is though, imagine that the first vector has its freedom of movement limited by an axis, so all it can do is rotate along a particular plane.
Is there a way of finding that angle to rotate the first vector to so that it is pointing in the direction of the second vector, but restricted by its axis.
hope this makes sense
thanks,
Sam
--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/888778fe-c9d8-41a4-b344-5c2d24345b42%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
ive got an image here im trying to upload, but theres no where to post an image. Do you know how ha
sam
sam
--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/cc53602b-b2d7-4b80-aec6-cfb219123c7e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/z1z0PXZe12M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBAtru4sjvXeL84PQDonXTV1qy4daXX%3DK8Abj%2BVYQ6Eow%40mail.gmail.com.

ye, i guess its hard to explain.
This is why I suggested that you mock it up with plain nodes in Maya. Posting a generic image of a vector operation won’t do anyone much good, unless you also annotate on it to illustrate your intent.
It sounds very doable with an aim constraint, as it also does blending back and forth.
--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/f95385e8-4f93-4c23-8837-2bc9b4421dea%40googlegroups.com.
I dont know if i can constrain vectors.
A vector is merely a point stuck at the origin with rotational information. When you aim-constrain a locator at the origin, it’s rotation values is (one of the possible) XYZ vector values.
Its like an aim contstraint, but the object aiming will itself be constrained to an axis
If there are two points involved in an aim-constrain setup, Source and Target, with Source pointing towards Target, are you saying that the Target will also be constrained to something else? In that case, why not merely constrain it that way?
--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/7bd832fc-7eae-422e-9900-9e37aa38bc11%40googlegroups.com.
When you aim-constrain a locator at the origin, it’s rotation values is (one of the possible) XYZ vector values.
Sorry, I’m talking garbage. When you aim constrain a locator at the origin, and offset a child of that locator by 1 unit in the direction of the target, it’s worldspace transform values is vector values.
--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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/fe50bf20-2006-432d-b9c4-5ac5653a122e%40googlegroups.com.
the 'angleBetween' gives you the angle you should rotate vector 1 to so that it aligns perfectly with vector 2. In my example vector 1 can only partially point in the direction of vector 2 because its only allowed to rotate around a specific axis (in my example (0,1,0))
--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/1415077031.2874332.186751973.40B0D4DC%40webmail.messagingengine.com.
For more options, visit https://groups.google.com/d/optout.
<vectorRotationDiagram.jpg>
like this...;)
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAOUxB22sPo86U5CV3pt7CSDwcOypLE%2BdWKXzS7w-PYt8qKBO%2BQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/129CA0F3-5EE7-4190-ACA3-1BD33AE78CC8%40fie.us.
I wrote a vector class midway through my thesis for calculations, only to dive into the API a week later and discover MVectors.
Me too. :) I posted this in an answer to Sam, never heard back on whether or not it was actually useful, but posting it here again as it might be relevant.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAM33%3Da4QedHJF441PjYuwWuAD_q08x-QzUGtEUSu6cPGBSfT4Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/1415237283.3481114.187625457.7AF53F75%40webmail.messagingengine.com.