Sorry… that would be 2Pi. Subtract from 2Pi. Sigh.
On Feb 24, 2013, at 6:55 PM, "[email protected]" <[email protected]> wrote: > Joint orientation is an actual pre-transform. So you cannot treat the > ordinals as orthogonal. The correct way to consider it is as concatenation > of the joint orientation transform and then the rotation transform. > > However, the transform you are looking to execute is a simple angle-axis > transform. First you need the unit vectors of each bone. > > Normalize(Bone.Child.Position - Bone.Position) > > The arc cosine of the dot-product of those two vectors will give you the > angle for the short way around (in radians). > > The cross-product of those two vectors will give you the axis you are looking > for. > > You can get the long way around by subtracting the short way from Pi, and > inverting the axis. > > > On Feb 24, 2013, at 6:13 PM, Bradon Webb <[email protected]> wrote: > >> I think this makes sense, Ill give that a go. I think I was trying that but >> i might have reversed one of the vectors. what unit will the angle be in? >> is that a single rotation value that I could plug into the euler X rotation? >> >> however I wonder if i am not overlooking a simpler method. the joints >> orientation is set in the attribute of the joint. I just cant seem to add >> or subtract the numerical values there to make it work? >> >> here is my test scene >> http://pastebin.com/cBQ7ArAT >> >> image showing the orientation of the joint. maybe there is a way to >> directly leverage 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 post to this group, send email to [email protected]. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> <angleBetweenJoint_v3.PNG> > > -- > 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 post to this group, send email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > -- 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 post to this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
