Hey, is it possible to call Screen.lockCursor = true; without the mouse cursor being centred afterwards? Is there a work-around?
Screen.lockCursor = true;
I need to lock the mouse cursor and let it re-appear in the same spot...
May 19 '10 at 02:11 PM
I don't believe it's possible in unity. You should post more information of what you're doing to try to find a work around.
I'm trying to do a camera control where the user right-clicks in the camera space, the cursor disappears and the user can rotate the camera around. When the user releases the mouse button, the cursor should re-appear in the same place as it initially disappeared.
Unfortunately, this isn't currently possible without platform-specific C++ DLLs. There is a request for this ability on Uservoice.
Jul 30 '10 at 06:49 PM
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
Once you sign in you will be able to subscribe for any updates here
Answers and Comments
The best place to ask and answer questions about development with Unity. Check out our FAQ for more information.
To help users post good questions and use the site effectively we have posted a tutorial video. Please check it out.
asked: May 19 '10 at 02:11 PM
Seen: 2207 times
Last Updated: May 19 '10 at 02:11 PM
Setting the mouse position to specific coordinates
Lock mouse position with a Rect, possible?
Mouse cursor lock
custom mouse changing when hovering over objects
How To Get Current Mouse Position and have a GUI Box on right clicked
Get Mouse Position GUI
lock GUITexture on the screen at specific co - ordinates
"Click" a GUI Button using only joystick input
One Last GUI Question
Locking the Cursor at the center.