I have a game where the cursor is locked, but when the game is paused, it unlocks. The problem is that it appears in a bad, far-off position. Is there a way to set the position of the mouse to the center when it unlocks?
asked May 02 '11 at 08:28 PM
Are you sure you're locking it, or are you just hiding it?
Screen.showCursor will hide the cursor when you set it to false, but the cursor position will still "move" around the screen when the user moves his mouse.
Screen.lockCursor will lock the mouse cursor in the center of the screen and then hide it when you set it to false. It should not move at all, and will still be in the center of the screen when you set it back to true.
answered May 02 '11 at 08:54 PM