mechanical mates

how do I create limits so at the pivot point, the stud attached to the ball doesn't overextend into the shroud?

SolidworksAssemblies