Hey there, I'm working on a game that uses shooting with the mouse.
The camera is controlled with a lerp function between the crosshair and the player, the crosshair however doesn't follow the mouse completely and only does so from behind slightly - sometimes this can lead to the player accidentally moving their cursor out of the window, which interrupts the gameplay greatly and is also pretty annoying.
I was wondering if it was possible to implement a sort of mouse lock to prevent the cursor from leaving the game's window. I've tried searching for the issue beforehand but couldn't find anything that'd help.
To demonstrate the issue I'm currently having: