Hi, I am making a top down shooter and I need help with programming this in my project.
What I want to do is restrict the mouse cursor to a radius around my player. So what I mean by this is there is a circle that surrounds my player and the cursor can move freely within this circle, but when the cursor goes to the edge of the circle the cursor does not go past the edge and stays inside the circle.
Here are two sources of the same question but for unity so that you can see visually what I am trying to say:
I am sorry if my explanation is not quite clear.