Hi,
I refer to first-person-game cursor movement/lock.
Currently when you click on the option 'Lock cursor in screen's centre when game begins?' you need to click a button (or click the mouse if mapped) to unlock the cursor. The cursor is either locked or unlocked till you toggle the cursor.
What I want to achieve is this: When you right click on the mouse you lock the cursor but this is only for as long as you keep holding the right mouse. When you release the mouse it automatically toggles the cursor to unlock. Hold the right mouse again, and again the cursor will automatically lock.
How can I achieve this?
Many Thanks,
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Give this custom script (FreeAimWhenMouseHeld.cs) a try:
Just attach it to a new GameObject in the scene - is that the kind of behaviour you're after?
Hi Chris,
Perfect exactly as I wanted it.