- Home /
how do i keep a gameobject in between the union of 2 or more than 2 circles
So i have this game idea in mind where the object player is interacting with is in between 2 ropes. But the problem is the active object moves anywhere the mouse goes on the screen i need to restrict it so that, theoratically, the ropes become taut and stops the movement of the active object outside the confines of 2 radii each being dictated by how long the rope is.
TLDR; Essentially i need help in coming up with something that can help me limit it in the intersection of two circles or more than two circles
i tried using Vector3.ClampMagnitude() but since the code for each circle comes one after the other it completly ignores the first ClampMagnitude
Any help would be appreciated Thanks :)
Comment