How to get prismatic joint to move in x and y direction?

I’m trying to build a robot that has a rigid body cube sliding in the x and y directions on top of a base cube. I tried connecting two prismatic joints between the two bodies, one for the x and one for the y direction but that doesn’t work.

It works now by creating an intermediary cube which is connected via a prismatic joint in x direction to the base cube and via a prismatic joint in y direction to the sliding cube. I was wondering if there is an easier, more direct way to achieve the desired behavior.

If you don’t need articulation support, you can use a maximal-coordinate D6 joint that has both x and y directions unlocked.

https://docs.omniverse.nvidia.com/extensions/latest/ext_physics/rigid-bodies.html#joints