- Home /
I'm having problems with running my game on Ubuntu/Linux.
I've been making an FPS game for months, and I have tested it on both Windows and Ubuntu (Through VMWare Player), and for a while, it's worked as it should on both platforms.
However, recently, the Ubuntu/Linux version has become unplayable, for some strange reason, the mouse has messed up, it keeps registering it as if it keep going up, so I'm always jammed looking to the ceiling, and when I try to go left or right with the mouse, it's way too sensitive! The mouse is inverted as well. The framerate is always dropping as well, it starts off at 60fps, then it just drops, and drops, until the game freezes!
It wasn't doing those things before, and I haven't done anything to the mouse look script between it working, and now. The Windows version continues to run as it should, no problems with that version.
Here is what I'm talking about.
Has anyone else had this problem? How do I fix it?
UPDATE: I've found the source of the problem, it's a script I've made that hides and centres the mouse, I've disabled it as a temporary fix, but is there a way I can hide and centre the mouse in a way that also works with Linux?
void Update ()
{
if (hideAndCentreMouse)
{
Screen.showCursor = false;
Screen.lockCursor = true;
}
else
{
Screen.showCursor = true;
Screen.lockCursor = false;
}
}
Check the settings in Input $$anonymous$$anager, specifically sensitivity and dead zone. $$anonymous$$aybe ubutu/linux handle mouse oddly in your case (or all the time; I don't know, I don't use those often)?
Input $$anonymous$$anager settings can't be altered in code, by the way (unless you have a plugin like CustomInput... :D). You could create two versions of the inputs and use one on Linux & pals, or just change the settings in the launch screen every time.
It worked perfectly before the recent builds, and I never changed anything relating to the mouse between then and now.
If you believe you have found a bug you should report it to Unity Support.
@whydoitdoit - If you believe you have found a bug then you should report it to the Unity QA $$anonymous$$m using the bug reporter feature of the editor.
Answer by Cobradabest · Apr 17, 2013 at 07:03 PM
I have just got an email from unity saying they've recreated the bug and are "fixing" it, so I guess that's sorted, then!
Gah, just ran into this issue as well! Did they give any mention of a release date for the fix?
I've nearly got a workaround going based on direct Cursor manipulation using the System.Windows.Forms library, but I'm stuck at figuring out the location of a running Unity application window. Without that you don't know what cursor position would conform to the center of the window.
Still broken as of 4.3.1.
Were you able to find a workaround for this?
Edit: Submitted bug 585517 to Unity, feel free to reference this. They've been "fixing" it for nearly a year now, would be great to have this resolved.
I have not been able to find a workaround short of using an entirely separate input handling library.
This is really bugging me, as any kind camera (or more generally non-cursor) control with the mouse is unfeasible with this bug present.
Answer by OneThree · Feb 22, 2014 at 12:38 AM
Two players of my game are getting this issue in Ubuntu 13.10, though all other Linux players are totally fine.
Has anyone found a viable workaround? Not locking the cursor isn't an option for my game, as it's a first-person game and having a mouse cursor flying all around would be distracting and look like a bug.
Your answer
Follow this Question
Related Questions
3D camera smooth rotation and mouse wheel zoom 2 Answers
Multiple Cars not working 1 Answer
Adjusting Camera for Drag Rigid Body Script. 0 Answers
How do I make my character lean to the sides? 0 Answers
Distribute terrain in zones 3 Answers