Anchor alignment
Posted: 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
Align anchor B to A
--tim
Align anchor A to B
Code: Select all
joint[] j = getSelectedJoints();
j[0].setLocalAnchorA(j[0].getBodyA().getLocalPoint(j[0].getWorldAnchorB()));
Code: Select all
joint[] j = getSelectedJoints();
j[0].setLocalAnchorB(j[0].getBodyB().getLocalPoint(j[0].getWorldAnchorA()));