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).
1 2 3 4 5 6 7 8
| JointConfigurable hip = new JointConfigurable(getWorld()); hip.attach(torsoBody, thighBody); hip.setAnchor1(new Vector3(sign * TORSO_RADIUS, TORSO_LENGTH/2, 0)); hip.setAnchor2(new Vector3(sign * THIGH_WIDTH, -THIGH_WIDTH/2, THIGH_LENGTH/2)); hip.angularConstraints[0] = JointConfigurable.MOTOR_CONSTRAINT; hip.angularConstraints[1] = JointConfigurable.UNBOUNDED_CONSTRAINT; hip.angularConstraints[2] = JointConfigurable.MOTOR_CONSTRAINT; |
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