It's quite simple, you must use decomposeMatrix node to get information
about postion of joint in the worldSpace.

lets say we have the decomposeMartix for jointBaseA, named jointBaseA

jointBaseA.worldMatrix -> jointBaseA.inputMatrix
jointBaseB.worldMatrix -> jointBaseB.inputMatrix

And for the end joints...
jointEndA.worldMatrix -> jointEndA.inputMatrix
jointEndB.worldMatrix -> jointEndB.inputMatrix


now we substract the value the outTranslation of jointBase from the
jointEnd and we get, the vector
so...

jointAVector is plusMinusAverage Node

jointEndA_M.outputTranslate -> jointAVector.input3D[0]
jointBaseA_M.outputTranslate -> jointAVector.input3D[1]


You do the same setup for jointB, and at the end you will be have two
vectors
jointAVector and jointBVector (which are plusMinusAverage Nodes), and you
can easily connect it into angleBetween node

Cya!

2011/11/21 rudi <[email protected]>

> Hi,
>
> Lets say that i have 2 joint chains: jointBaseA, jointEndA (child of
> joinBaseA) And  jointBaseB, jointEndB (child of joinBaseB)
> I want to extract the vectorA created by jointBaseA, jointEndA and a
> vectorB by jointBaseB, jointEndB.
> Then I want to take vectorA and plug it in in the input vector1 of the
> node angleBetween and take vectorB and plug it in in the input
> vector2.
> So the output of the angleBetween is the angle between the 2 chains.
>
> I tried to take the translation data of the jointBase and the jointEnd
> to put them in plusMinus node with subtract operation, and plus the
> output
> of this plusMinus node to the vector1 and vector2...but I am getting
> wrong vectors, I don“t know why...
>
> To sum up, how can just get the angle between 2 joint chains? Is there
> a node to get faster the vectors of the chains?
>
> Cheers
>
> --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to