Two way joint?

Say you have

Object A : rigidbody/non-kinematic player force controlled

with a configJoint (locked motion, free rotations) attached to

Object B : rigidbody/non-kinematic. Move axis locked to x.

Object A seems to be allowed to move an infinite distance on Y and Z away from Object B. Is it possible to limit the distance between Object A and Object B in a way that prevents Object A from pulling beyond the set distance of Object B?

I tried adding another joint from B to A but that yielded a lot of undesirable interactions.

Another idea is to keep comparing the xyz distance between object A and B and try to clamp the players force movement somehow if they get out of range, but this seems like it might be difficult since the player forces are applied locally. Or maybe do something similar with a collider. Hmm…

Any ideas would be really appreciated.

Well I figured out one way to kind of do this though I’m not using the joint anymore. Basically parent some gameObjects with colliders to Object B (could import an inverted sphere and make it a mesh collider or use box colliders) to create a cage, which keeps A from being able to pull away from B and infinite distance.