You should be able to achieve that setup using the Physics / Constraints component, in Mesh details. Here you can lock the location, and set a Mode to limit the movement. All details can be found in the following guides:
Thank you, this was close to what I needed. What threw me off in my reading about the PhysicsConstraint component was that it needs 2 meshes in a parent-child relationship.
The constraining mode you were referring to is what I did need though, but it was on the Collision component, in a category called “Constraints”, the “Mode” I needed was ‘YZPlane’.