I would like to create a freejoint that is limited to a certain range in the xy-plane. From the documentation, it doesn't look like freejoint has the "limited" attribute. What is the best way to achieve this?
If you want to stay in the XY plane, you should define a ball joint and two slide joints in the X and Y axes, and put limits on the slide joints. It is better to define the ball joint after the slide joints.
The docs say, "in that case default settings intended for actuated joints may also affect the free joint (depending on how the defaults classes are specified), which is usually undesirable." What default settings should I watch out for?
All default joint settings that are active at a given point in the XML apply to every joint defined there, including joints of type "free". This is why I introduced a specialized mechanism to define a free joint without being affected by any defaults. See XML element <freejoint>.
I'm confused. I thought that your suggestion was to use a ball joint and two slide joints instead of the freejoint. Is there an attribute that I can add to the ball joint and slide joints to designate them as free?
If you want a 6DOF joint that does not inherit any default settings, use <freejoint>. If you want a joint constrained to the plane, you have to use a ball with two slide joints (which is 5DOF) and in that case the defaults will be inherited; there is no flag to ignore the defaults for such joints.
Is there a way of limiting a ball joint so it only rotates along an axis passing through it parallel to the X-axis?
I’ve tried using a hinge joint but it seems impossible to have the joint be ‘in’ the mesh even when playing around with position. Instead the mesh is displaced away from the joint and the object moves in a circular fashion around the joint rather than around its own axis