Add stretchy setup to a mirrored 'orientation' chain

Hi everyone. i recently did some experiment, and i just notice my proc to build stretchy is not working on a mirrored ’ orientation’ joint chain. The problem is, when the strecth is compute, i usualy use the Tx of the joints to feed the multiply Div nodes. But, in this case, the joint get 2 Translates, that makes sense because they oriented like the original joints, but reversed in parenting. My question is , how can i get the distances, without being relative to the joint Tx channel? Do i need to feed 2 translate channels? Do i need to compute the translate offset in the rotation?

Any idea is welcome! :slight_smile:

Thx for reading!

You can probably just use a distanceBetween node. Plug the world matrices of the two objects you’re using into inMatrix1 and inMatrix2, and don’t do anything at all to the point1 and point2 attributes.
http://help.autodesk.com/cloudhelp/2019/CHS/Maya-Tech-Docs/Nodes/distanceBetween.html

Hello! Thx for this answer. I already use DB, i’m still relative to unique parameter, the problem is that i have different Orient for each joint in my case, for exemple, if i have let say, shoulder/elbow/wrist. Elbow and Wrist have 2 values in translate. The db output one value, so i drive the tX value only and feed it in the multiply divide, the value is wrong, because of the different orientations i have two vector. So my question is how can i get those two vectors?

Ok, I think I see. So you’re saying there’s translation values other than just translateX? And you say that’s because the joints get oriented the same across the mirror?
If so, that’s the root of your problem. The mirroring is wrong.

That’s exactly it! But the mirroring seems to be Ok, it’s just the normal behaviour when you choose ‘orientation’ instead of behavior in the maya JointOrient Tool.

So then you should mirror ‘behavior’ not ‘orientation’.
Looks like orientation keeps the orientation in worldspace, but flips the position across the plane, which is not what you want.

And if neither of those options gives you what you want, you’ll probably have to do it yourself.