Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Elecman's avatar
Elecman
Explorer
12 years ago

Unity - OVRMain Menu locks mouse

The OVRMainMenu script locks the mouse. This can give unexpected behavior. It took me a while to find out why my mouse wasn't working.

Please give an option on this script to disable this feature.

4 Replies

  • I'm not understanding what you mean by "locking the mouse."

    Can you explain exactly what you are trying to do and what is broken?
  • If I use a normal cursor, the cursor is not visible. If I use a 3d Cursor (VR Gui project), the cursor does not move if I move the mouse. It is caused by the following code in OVRMainMenu.cs:


    // Make sure to hide cursor
    if(Application.isEditor == false)
    {
    Screen.showCursor = false;
    Screen.lockCursor = true;
    }


    Normally this is what you want, but what if you want to pause the game and select a menu item using the cursor?
  • If you need other functionality, feel free to comment out that code.
  • "cybereality" wrote:
    If you need other functionality, feel free to comment out that code.


    LOL, gold!