I have a design where a part can slide on a rod that is aligned with the X axis. I need to move the part around to see how it looks in different positions on the rod. To make this easier, I have locked the Y and Z location transforms, so I can just press G and move the part around on the X axis. However, I don't want to be able to slide it off the rod, so I'd like the part's X position to be locked between, say, 0 and 70.
I know this is possible in animation but I'm not doing any animation here, I just need to move the part occasionally to check the esthetics but I don't want to be able to drag it too far along the axis.
Is there a way to do this?