How to make the Camera move when the Mouse is on the end of the screen

I’m working on a first-person game, and I’ve been trying to figure out how I would go about making the camera turn to the left and right when the player moves their mouse to the respective side (not whenever the mouse is moved, only left and right, and only when the mouse is at the edge of the screen.) I am also trying to figure out how I would make a maximum turn distance? I took a look online, but most of the posts are people asking how to make the camera move with the player in third person.

1 Like

get the distance between the center of the screen and the mouse screen position and use a function to turn the camera when the magnitude of the distance is greater than (left) or less than (right) a certain amount

1 Like