Hi, I have installed the package on Xubuntu 14.04. My project can be loaded and launched on Linux. Great work, I am happy to see it happen. However, mouse axis (Input.GetAxis("Mouse X") etc.) do not work. For instance in the MouseLook script in the FirstPersonController asset. Mouse buttons are working. The mouse is also working for the UI. On a new project, the following script attached to the main camera display always values equal to zero. Code (CSharp): void Update () { Debug.Log("Input mouse X " + Input.GetAxis("Mouse X")); Debug.Log("Input mouse Y " + Input.GetAxis("Mouse Y")); }
Same on Ubuntu 15.04. It works when I unfocus the game window, like clicking somewhere else in the editor. It should be the other way around.
Hi, Further details about this bug, after some experimentations: In the editor: - launch the game : get axis does not work - click somewhere else in the editor - put the mouse over the game windows: get axis work (only when the mouse stay over the windows), but the keyboard does not. - click again to focus the game window: mouse does not work, keyboard does. Moreover, CursorLockMode.Locked never work. As said Stoopers, the mouse works correctly when the game is Built. It is probably a bug in the input events dispatcher in the editor.
My experience matches a.emilien's. CursorLockMode.Locked doesn't work, and my getaxis works the same way with the mouse focus. Manjaro/Gnome3
I have the same issue on Arch with Gnome, please let me know if there's anything I can do to help. Is there anybody who do not have this issue?
Just a heads up, this script fails to work completely. http://wiki.unity3d.com/index.php?title=SmoothMouseLook
Issue seems partially fixed for me on manjaro. GetAxis works - but choppy like it's not updated every frame. Anyone can confirm this for other distro's (especially ubuntu based ones)?
Just to report back here, the latest version of Unity 5.1.0f3+2015091501 seems to fix the mouse issues. Confirmed to work on Ubuntu 15.04 64bit (running a build of the project): 1. FirstPersonController rotating works 2. Using Input.GetMouseButton(0) works 3. Hiding cursor with Cursor.visible = false works 4. Using Cursor.lockState = CursorLockMode.Locked works The mouse in the editor when running the project is a bit weird though. For some odd reason, as soon as I drag the mouse into the Game window of the Editor it will always default to looking up at the sky (Vector3.up direction?).
This is still an issue to me in 5.1.0f3, Ubuntu 14.04 LTS. Input.GetAxis has no effect in the game while focused, but if I click somewhere outside the game like the Inspector, both X and Y work fine. As expected though, since the game is no longer in focus, key input is disabled. Keyboard input works as expected when focused but mouse does not, so my guess would be an inverted focus toggle for Input.GetAxis somewhere in Unity? Presumably one toggling whether mouse activity should be registered or not. I went to the issue tracker for this but it's marked as resolved...
Are you certain you are running the latest build? It was fixed in "build #2015090301". It still feels very buggy when the cursor is locked, but you can download the latest build at the bottom of this thread: Unity on Linux: Release Notes and Known Issues
Oh guess I wasn't, probably just assumed the main Linux download would be the latest build, heh. Makes more sense the more I think about it. It's still behaving strangely indeed, but at least I can look around now! Thanks for the pointer!
This is still a problem for me. Running the 5.4 Beta on Ubuntu GNOME 15.10, mouse axis are choppy and unresponsive in the editor and will stop responding if my cursor leaves the window when compiled (even though mouse is locked and not visible).
Link to dedicated thread: http://forum.unity3d.com/threads/weird-mouse-input-with-locked-cursor.357572/
Hi, I have a problem with reading the mouse position on Kubuntu 17.04 (x86-64; KDE 5.9) while it's in full screen mode. As you can see on the screenshot I've attached, the input from Input.GetAxis("Mouse X") and Input.GetAxis("Mouse Y") is working as expected, but values of Input.mousePosition.x.ToString() and Input.mousePosition.y.ToString() are bizarre. I'm working on Unity 5.6.2p1. The same happened with compositing disabled for KWin, and Openbox as the window manager. The problem DOES NOT OCCUR when windowed.
@tora_chan: it sounds like you're experiencing this issue, which is fixed in 5.6.2p3 and 2017.1f3 (there's also a hotfix build for 5.6.2f1 linked in the thread).
We don't support Arch, I have seen weird mouse issues when running on Arch, does this happen in a supported distro such as ubuntu ?