Configurable joint, different anchors per axis?

I don’t really know the best way to explain this, but I want to have each axis of rotation work around a different pivot.

For example, lets say I have a rigidbody body that has its z rotation limited to 30⁰ and the anchor is 2 units to its right. I want to be able to rotate around the y axis relative to the rigidbodys own position rather than the anchor, such that the z rotation causes it swing up and down around the point 2 units to the right, but the y rotstion simply rotates it around its own up axis.

Sounds like two joints to me.

[ A + joint(B) ] [ B + joint(C) ] [ C ]

Do you have a real-world example of an object that behaves the way you describe? Or can you explain what your objects are, to make it more obvious what you’re trying to achieve?

Car suspension. I want the wheel to be able to steer, but when i rotate it about the y axis, it pivots around the point its attached to the vehicle, instead if its own up axis.

I would prefer to just have the wheel rigidbody attached directly to the vehicle, rather than require multiple rigidbodies connected in series.

That’s definitely two joints. Or use the Wheel Collider for its positioning capabilities, which keeps the whole car under one rigidbody. You can do the tire math yourself.

I already have a better solution than the wheel collider so there wouldn’t be any point in using that.

If it requires more than 1 joint then i suppose i will have to use 2 or find a work around. Thanks.

The reason i want to use joints is because i want to have suspension that can move in any way i like, rather than just straight up and down.

I’m using a hierarchy of ArticulationBody joints for this, my revolute steering joint is a child of my prismatic suspension spring, it’s working well for me. My steering joint seems happy with only a nominal mass. I was initially nervous of nesting lots of joints (I’ve ended up with quite a few), but ArticulationBody seems pretty forgiving.
I’ve seen Edy’s been implementing suspension and steering with ConfigurableJoint:

I think he was saying ConfigurableJoint rotations are solid, but linear springs are squishy, there was good discussion of it here:

I’ve found ArticulationBody linear springs to be good (vs ConfigurableJoint), but I’m not testing for the level or simulation fidelity Edy is.

1 Like