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;
}
}