This has been a problem in the past (from what google tells me). But seems it was fixed sometime around unity 2017. I test linux about once a year, so here I find myself… Anyway, before I log a bug into the abyss, I’m curious if anyone else has encountered this issue.
2018.2.17 and 2018.2.20 tested.
Set Cursor.lockState = CursorLockMode.Locked. Now call Input.GetAxis(“Mouse X”).
You don’t get back 0.1, or 0.5, or 1, you get back 3000, or more.
Set Cursor.lockState = CursorLockMode.None (or Confined). Call Input.GetAxis(“Mouse X”).
You get back 0.1, 0.2, etc. as expected.
Only happens on Linux (I tested using Ubuntu 18). Windows and Mac OS are fine. Only happens when the cursor is locked (as one is apt to do for implementing a mouse driven camera look).
It appears to be a compatibility prob between unity mouse capture and the way X11 server handles the mouse
I thought X11 handled mouse from top-left screen… hmmm yes… but deltas are sometimes crazy ( like -18K on X )
IMHO U3D devs should dig in nux mouse handling and find the reason of those crazy values. I guess it’s a fight between X-server and U3D mouse capture.
X11 gives a mouse pos but U3D should get it from deeper ( hard polling or something… )
years ago i fought for this and found a way for my apps compiled with GCC.
There a libs allowing mouse access under ( or at lower lvl ) X server. And i found no other way…
This worked for me at the time but it was ubuntu dapper drake… long time ago
nux is just perfect for many things… just this mouse shit ruins all…
I believe now U3D is big enough for talking with buntu ( or better: Debian ) devs to make them consider the way they handle mouse ( even if Deb devs don’t master X11 developments… ).
Maybe a dev ( i wish i had time and the knowledge i had in the past for deving a module grabbing X11 mouse and offering it to apps thru a small API ) can dev some kinda interface X11<—>U3D ?
This would be great !
@andrews_unity
Unfortunately 2019.3.0f6 still proudly got the bug
Did you even try to do something for solving this ?
On my side, i’m setting up a dev env on a linux for making an SO lib serving my unity app for cursor things from X server. I did this 15 years ago… amazing U3D cannot hehehe
I verifed the issue on versions of linux that we support, which is Ubuntu 16.04, 18.04 and Centos 7. We also only support running in bare metal hardware; which means no VMware or anything like that.
So to answer your question yes I verified that this worked on 2019.3 and that it was back ported to 2018.4
All things work fine after i understoob the problem was coming from vmware !
It appears i owe you my apologies as well just like in this post: Weird mouse input (with locked cursor) page-2#post-5440491
Where i give the workaround:
vmmouse.present = “FALSE”
to set in the vmware conf file for making everything work properly
I give this here as i think many people use vmware for running linuxes on windows/mac platforms.