Anchor alignment

Let us know if you have a nice R.U.B.E script to share!
Post Reply
tescott
Posts: 68
Joined: Wed Feb 06, 2013 6:32 pm

Anchor alignment

Post by tescott » Sat Jul 13, 2013 6:44 pm

Here are a couple of super simple scripts for aligning joint anchors to the same location:

Align anchor A to B

Code: Select all

joint[] j = getSelectedJoints();

j[0].setLocalAnchorA(j[0].getBodyA().getLocalPoint(j[0].getWorldAnchorB()));
Align anchor B to A

Code: Select all

joint[] j = getSelectedJoints();

j[0].setLocalAnchorB(j[0].getBodyB().getLocalPoint(j[0].getWorldAnchorA()));
--tim

Post Reply