Mouse axis not working

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.

void Update () {
    Debug.Log("Input mouse X " + Input.GetAxis("Mouse X"));
    Debug.Log("Input mouse Y " + Input.GetAxis("Mouse Y"));
}

i get this problem too, can’t get mouse axis to rotate camera,.

Same!!!

The same problem on Ubuntu 14.04.3

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.

but, when you Build the game, Mouse Axis will working normaly,.

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.

We’ll investigate - thanks!

My experience matches a.emilien’s. CursorLockMode.Locked doesn’t work, and my getaxis works the same way with the mouse focus.

Manjaro/Gnome3

Same experience as Cirmik…

Same… Mouse never gets locked or invisible. Also camera doesn’t look at mouse

elementary OS Freya

Same. prevents testing any fps-like game in editor

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?

I have the same problem.
Slackware, KDE 5, xorg-1.16.4, gtk 2.24.27

Just a heads up, this script fails to work completely.

http://wiki.unity3d.com/index.php?title=SmoothMouseLook

I have the same problem.
Linux Debian 3.16.0-4-amd64, KDE 4.14.2

Same issue. Ubuntu Mate 14.04.

Same issue. Linux Mint 17.2

1 Like

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)?

I can confirm. It kinda works but not perfectly. Also, Input.GetMouseButton (0) never returns true.