- Home /
Locking cursor/mouse on an object
Hi guys
I have a sphere that's centered in my camera view. I want the boundaries of that object to define the boundaries of the cursor, so that it can only move on the sphere and nowhere else. Kind of like Screen.lockCursor with a larger radius. Any suggestions?
-Jon
Answer by landon912 · Feb 22, 2013 at 02:14 AM
You can't control mouse position directly since that is in Windows or OSX. You can fake it by using a custom cursor and getting/setting the position of that. While negating the actual cursor.
I can't create a 2d frame that limits my mouse movement? Bummer...
Your answer
Follow this Question
Related Questions
Locking the mouse cursor without it centering after unlocking it? 0 Answers
Mouse cursor lock 0 Answers
Locking cursor without changing position 1 Answer
Unity 3D Screen.lockCursor Problems 2 Answers