How to Limit two characters distance?

I’m currently working on some kind of 3dfighting game and I want both my characters to stay in a range(circle) and not be able to move further so they can’t move offscreen.
Any tips?