Is there an implemenation of the universal joint type in joode? I’ve tried do it with a JointConfigurable, but that results in explosions. Here’s the code I’m using, where the coordinate system is that imposed by Xith (x viewer right, y local gravity up, z out of screen).
JointConfigurable hip = new JointConfigurable(getWorld());
hip.attach(torsoBody, thighBody);
hip.setAnchor1(new Vector3(sign * TORSO_RADIUS, TORSO_LENGTH/2, 0)); //relative to torso center
hip.setAnchor2(new Vector3(sign * THIGH_WIDTH, -THIGH_WIDTH/2, THIGH_LENGTH/2)); //relative to thigh center
hip.angularConstraints[0] = JointConfigurable.MOTOR_CONSTRAINT; //X, Pitch has motor
hip.angularConstraints[1] = JointConfigurable.UNBOUNDED_CONSTRAINT; //Y, Yaw is unbounded
hip.angularConstraints[2] = JointConfigurable.MOTOR_CONSTRAINT; //Z, Roll has motor
If anyone has just a simple universal joint class, or advice on how to implement it with JointConfigurable, I’d be very appreciative. Thanks,
- Josh