PDA

View Full Version : Bug: Cursor Stuck



MunchieDog
01-30-2018, 12:46 PM
My friend is having a bug that is pretty much causing him to stop playing the game. He's too lazy to post in the forums about it so I'll do my best to find a solution for him

He is currently having a bug where his Target Box (that blue wireframe box around a target) is not actually around his target but off-center. Also, his mouse sometimes gets stuck randomly on the screen when he opens up the loot window. Is this common or has anyone experienced this before and found a fix?


Video of Bug (https://www.youtube.com/watch?v=Sne7_76LWes&feature=youtu.be)


Thank you,

Munchie

Citan
01-30-2018, 02:50 PM
Whatever is under the mouse cursor shows a semi-translucent box that's separate from the selection box. It sounds like he is seeing that box and thinking it's the selected thing because the mouse cursor is not in the place he thinks it should be. So likely all the same bug: the mouse isn't where he wants it to be.

We use the OS mouse cursor so there are not a lot of ways this can happen in game code. If it's stuck in the exact dead-center of the screen, that's something that could conceivably happen code, because Unity moves the mouse cursor to the center of the screen during mouse-look mode. But if it's getting stuck in random places on the screen, that's not likely to be caused by the game. So the first thing I would check is to see if his mouse has dying batteries or a short in the cable.

Karamasha
01-30-2018, 04:57 PM
If mouse gets stuck in loot window and prevent you from looting try look away, for me it used to get back to normal when i do that at least.

MunchieDog
01-30-2018, 07:10 PM
Here is a video of my friend showing off the bug:

Youtube Mouse Cursor Bug (https://www.youtube.com/watch?v=Sne7_76LWes&feature=youtu.be)

Citan
01-30-2018, 10:18 PM
Thanks for the video! Stuck in the dead center ... yeah, that's definitely caused by mouselook mode not stopping correctly when you let go of the right mouse button. Did this start with the most recent update (on Friday) or was it happening before that?

To fix, you should be able to just right-click and pan the camera a bit. By explicitly going into mouselook mode and letting go, it should fix the mouse state. But I don't know what could cause that. There must be something unique about how he's playing, like chording the mouse keys by accident or something. If anybody has insight into how to reproduce that, I'd appreciate it!

Mechant
01-31-2018, 04:49 AM
Disable any virtual joystick Unity doesn't support them if you use one, deactivated it through "Device Management". Go to "Human interface devices" and try to deactivated them 1 by 1 and check your game.

If you are on windows press windows+r button and write devmgmt.msc to open the Device Management.

Crissa
01-31-2018, 07:26 AM
Also, if you have Accessibility options on that might do it. There's a Sticky Keys that if you press a certain single key n times (like five or ten) then other keys (like control keys, mouse keys) will 'stick' in the down position. It's avilable by default in Windows, but the trigger key you have to press is something weird like ctrl or shift but could be anything. Some manufacturer drivers also have this option.

Sometimes a physically dying mouse or low battery/poor wireless condition will fail to send the key-up signal, too.

Just running down the things aside from the game that can happen.

MunchieDog
01-31-2018, 07:53 PM
Thanks for all the replies! I'll see if he is able to get it fixed but I don't think he'll be returning to the game, unfortunately.

Update
I sent him your reply about sticky-keys and ever since the beginning he's been having issues with sticky keys so we might have found a solution!

darxash
02-03-2018, 10:22 AM
I thought I should mention I have been getting this bug since I started playing on the 14th of January. Never submitted a bug report as I haven't been able to purposefully replicate it, but it happens fairly often.

EDIT: Also I do not have issues with sticky keys, I have them disabled. I play in windowed mode as well if that has any effect. Also I do not play on wireless, I haven't had any connection issues.

Crissa
02-03-2018, 03:45 PM
darxash

Thanks for checking that. I hope they can figure out what it is ^-^ Cursor bugs can be so aggravating to try to hunt down!

HardRock
03-27-2018, 05:32 PM
I am suffering from this bug very badly tonight. It was only when there were lootables that it would happen. It would go away if there were no corpses to loot but then reappear about half the time when their were more bodies to loot.

Citan
03-28-2018, 06:17 AM
You're getting the cursor stuck in the center of the screen again? Hmm, I've fixed the only cause of this that I could repro, so I need more clues about what you're seeing.

You say it comes back when there's lootable bodies... if you rotate your character 180 degrees with the keyboard, does it fix itself?

HardRock
03-28-2018, 06:58 AM
Going to try to narrow down the circumstances that produce it. I will try the 180 rotate.

It is slightly different than the classic "locked to center of screen bug". The mouse travels more but when trying to loot or select a targetable (anything with the rectangular aiming box) it jumps back to center. Some group members were suggesting it had something to do with the camera trying to reset to its default position. This would make some sense as I often 180 the camera angle when luring monsters in GK.

Is their a way to loot with the keyboard?

HardRock
03-28-2018, 10:25 AM
You say it comes back when there's lootable bodies... if you rotate your character 180 degrees with the keyboard, does it fix itself?


Took a long time for it to happen maybe 30 mins, but sure enough. I mez a target, go to mouse click over to another target and I notice I cant.
The 180 keyboard turn dint affect the bugs expression other than directly behind my character was nothing targetable so the mouse moved more freely.
Upon tabbing back into the game the bug disapeared, though alt tabbing seems to have no effect I think it might be more relatable to number of targetables on screen at one time. After writing a bit and time passed some of the items on the screen had expired. Sorry this is all so broad and not specific. Ill let you know more as it happens, or hopefully not.

Madmatx
03-28-2018, 02:31 PM
Is their a way to loot with the keyboard?


I think the defaults are cntrl tab to target next and u to interact but there doesn't seem to be a way to loot. If you try to interact again the item just flashes but doesn't loot. A /take all command or key bind would be nice but I suppose that would just make botting easier.

Crissa
03-28-2018, 03:12 PM
The key-bind 'Use' will open an object, like to loot.

But it won't go further and select what kind of looting.

HardRock
03-29-2018, 07:13 AM
Well my work around for this is to change the path of the mouse cursor till it lets you get to where you want it. In order to loot while the bug is active I will move my character a little bit. Then instead of a straight line I will move my cursor in a large looping pattern and try to approach the loot button or item from the top instead of the bottom. If the mouse doesn't go over any other targetables it wont reset back to center, but if I cross a targetable with mouse then it resets. On the upside I am turning into a true keyboard warrior.

Citan
03-29-2018, 08:30 AM
So what you're seeing is that you can move the mouse, but when you try to click, it jumps back. Or is it that whenever you mouse over certain rectangles on the screen it jumps back? Hmm. That's super weird. A few more questions for you:

Does right-clicking and dragging the camera around (then letting go) fix it for a while?

What sort of framerate are you getting when this happens? (If you enable the FPS indicator, it'll give you a color-coded number -- I'm wondering if it's red, yellow, or green when this happens, basically.)

Also, please try opening up the Settings window and adding the word "NoSlowBoxes" (without quotes) and see if that fixes it.

HardRock
03-31-2018, 08:10 AM
Added "NoSlowBoxes" . Cant tell if that has effected anything yet.

My frame rate caps at 30 on this comp and I usually run 1, 0, or -1, graphics settings. -1 as of late. When the bug happens it is usually yellow and between 17-24. Though it happened the other day when I arrived at the platue in Rahu where Pask roams. Their was only one other player there at the time and it seemed to be triggered by their presence.

360 spinning the camera DOES fix the bug but sometimes the camera doesn't want to spin. In that case I move the character around a little or try from a different spot then the camera will spin. The inability to click could just be me trying to click in the split second that the mouse is being dragged back to center. When I say it fixes it, it fixes it till the next instance, which might be 10-25 times during a GK run.

Do graphical settings draw distance affect item interaction? It seems like its a layering of the targeting boxes issue. Sometimes their will be a ghost square thing that flashes near the center of the screen Their are so many things that seem to cause it and it happening in Rahu to me threw me for a loop. I thought it was just a GK dungeon / gaz outdoor thing for me.

PezOfDoom
04-01-2018, 07:36 AM
Interesting, I just had something similar happen to me, cursor was stuck in the upper right corner of the screen though. :/

Problem was I couldn't right click to pan because all my UI windows were in that corner, hah.

ProfessorCat
04-01-2018, 07:42 AM
I had the same issue last night. I was running into a building in Rahu, and the moment I went to click the NPC i was heading for, my mouse went straight into the center of the screen. I could move it maybe 50 pixels or so, and it would rubber band right back to the center. Not sure if it was linked, but it seemed to happen at the same time I got within ear shot of the drummer NPC in rahu, and a player jamming with him.

Resetting the client seemed to resolve the issue. I have never experienced this before in game, or out of game.

Citan
04-01-2018, 09:13 AM
Hmm. Well, I'm still stumped, so please bear with me -- gonna be a little long-winded and try to explain what's going on and what will help me track this down!


This must be caused by not leaving mouselook mode cleanly.

I've double-checked the code, and there's only one time when we ask Unity to put the game into "stuck in the center" mode: when you right-click your mouse while the cursor is over the game world (not over a UI window), and drag the mouse a bit, you enter mouse-look mode. That hides the mouse cursor, and sticks the mouse in the center of the screen. Each frame we detect how much the invisible mouse cursor has moved from the center, and we pan the camera by that much. Then Unity snaps the mouse back to the center and we do it again the next frame. That's how mouselook mode is implemented in Unity games.

When you let go of the right mouse button, it unhides and unsticks the mouse.

The previous bug was actually a Unity bug: sometimes Unity failed to notify us when you let go of the right mouse button. So the fix was to constantly poll the mouse every frame, and if the mouse button had mysteriously been released, we un-stuck the mouse. (We already had code that did this exact thing, but it only un-HID the mouse cursor, it didn't un-stick it. That's why you could see the cursor but not get it out of the middle of the screen.)

That hack seemed to fix the problem. Incidentally Unity fixed this bug in a patch a few weeks ago -- but I'd already added the code to constantly check, and we'll just leave that in forever in case Unity screws up again.

So we have code in the game right now that CONSTANTLY tries to fix this condition... but apparently there's a scenario where it still doesn't work. I can't really come up with a reliable scenario where it could break, either. It seems impossible. But obviously it isn't.

Does entering mouselook mode and exiting it again fix it?

If your mouse cursor is stuck in the center of the screen, you should be able to fix it 100% of the time by right-clicking IN THE WORLD (not overtop a GUI screen), moving the mouse a bit so that the camera pans, and then letting go of the right mouse button. That should fix it reliably. But the problem is that if you have a GUI window in the center of the screen when your mouse gets stuck (like a corpse window), you can't do it: you can't click outside of a GUI window, because your mouse is stuck overtop a GUI window! But any other time, that should fix it.

So, for anyone experiencing this bug: can you enter mouse-look mode, then leave mouse-look mode, and the mouse is still stuck in the center of the screen? Or, perhaps, can you not even enter mouselook mode at all while this is happening? Or does it only ever happen when a GUI window is in the dead center of your screen?

Invisible boxes

Now, there's one additional variable: there are actually invisible GUI windows overtop selectable entities in the world. (That's how you can click on monsters and items and stuff in the world.) But these boxes don't normally count as UI windows. After all, you can enter mouselook mode even when the mouse is overtop a monster. But we're looking for a weird scenario, so maybe they're involved.

The reason I'm suspicious of these invisible boxes is that we recently added an optimization: when there are shit-tons of selectable things on the screen (more than 15), the invisible boxes are slower to reposition themselves -- they update every few frames instead of every single frame. That helps performance a lot. But if your framerate is low, maybe the optimization is buggy somehow: maybe a window gets stuck taking over the whole screen or something. Lots of "maybes" in any scenario I come up with, but... <shrug> maybe it's buggy.

Another reason I'm suspicious: the bug seems to happen when there's lots of stuff on-screen, judging by the anecdotes so far... and that further points the blame at this optimization.

That's why I'd like anyone affected by this bug to add the word NoSlowBoxes to their special settings window. This turns off the optimization! It would be really helpful to know if NoSlowBoxes fixes the issue or not. If so, then I have a much better idea of where to look. If not, then I can look elsewhere.

External app interference?

Brainstorming other ways this could happen, maybe there's another program interfering somehow: maybe a popup from a chat app, or the Steam overlay screen itself. Something like that. When this happens, are you in full-screen mode? Are other programs taking focus from the game around the time it happens? I'm looking for any clues that might help track this down.



I know this stuff is tedious, and I'm sorry it's interfering with your gaming! I'm hoping the answers to these questions will give me a clue about what's happening.

ProfessorCat
04-01-2018, 09:34 AM
When I experienced the issue, as I tried to move my mouse, it would flash a box around the center, as if I had an object selected. My thought was I was stuck on a chair gui window, but there was never an option to "sit" like most chairs have.

Also. We'll be here for you tomorrow! Go enjoy your Anniversary! Couldn't be more happy with the progress you and the team have made. Steam is live! Love is in the air! Time to celebrate!

PezOfDoom
04-02-2018, 07:39 PM
Hmm. Well, I'm still stumped, so please bear with me -- gonna be a little long-winded and try to explain what's going on and what will help me track this down!

External app interference?

Brainstorming other ways this could happen, maybe there's another program interfering somehow: maybe a popup from a chat app, or the Steam overlay screen itself. Something like that. When this happens, are you in full-screen mode? Are other programs taking focus from the game around the time it happens? I'm looking for any clues that might help track this down.



I know this stuff is tedious, and I'm sorry it's interfering with your gaming! I'm hoping the answers to these questions will give me a clue about what's happening.

1. Happy belated Anniversary!

2. This may be something external. Another cursor-couldn't-move-properly happened to me again tonight; I was using mouse look to rotate my view of a pile of corpses I was trying to loot through and I managed to get it stuck where it wouldn't allow me to move too far away from the center screen but it didn't rubber band the cursor back to the center (so maybe a different issue). Instead it was acting as if the mouse cursor was in a smaller window that I just couldn't see. Tried to pan-look around per your suggested fix earlier, but that didn't work.

I didn't want to exit the game without testing some other ideas, so I alt+tabbed out of the game and back to my desktop. Crazy thing is the mouse was still acting the same way outside the game. Whatever was limiting the mouse from moving finally let up when I managed to get it to open a different app; in this scenario it was google chrome.

Side note: keyboard commands work fine.

Could it be something with the Steam Overlay? Even if it was, I don't see why the cursor would be locked to the same behavior after minimizing project gorgon until I brought up another app.

I'll try a bunch of testing tomorrow to see if I can recreate it in any method. The two times it's happened to me I was doing a lot of different things at once (moving, using mouselook to change my angle, usually right after exiting a map or loot window.)

Break
04-03-2018, 10:18 AM
I've double-checked the code, and there's only one time when we ask Unity to put the game into "stuck in the center" mode: when you right-click your mouse while the cursor is over the game world (not over a UI window), and drag the mouse a bit, you enter mouse-look mode. That hides the mouse cursor, and sticks the mouse in the center of the screen. Each frame we detect how much the invisible mouse cursor has moved from the center, and we pan the camera by that much. Then Unity snaps the mouse back to the center and we do it again the next frame. That's how mouselook mode is implemented in Unity games.

When you let go of the right mouse button, it unhides and unsticks the mouse.


Not sure if I'm the only one who feels this way, but I find it very frustrating that the mouse will always move to the center of the screen after using mouselook. Ideally the cursor would unhide at the location that was clicked. It's also annoying when I'm trying to right click an object in the world to walk to/interact with it and I accidentally move my mouse slightly, it switches to mouselook and my cursor is nowhere near the thing I was trying to click.

PezOfDoom
04-04-2018, 05:05 PM
So spent an hour dinking around with various movement / looting / windows / screen moving and I could not recreate the issue. How vexing.

HardRock
04-19-2018, 09:01 PM
It hasn't been nearly as bad lately for me so I think the slow boxes helped. I was unable to enter mouselook mode when the bug was active, I had to spin my character in a circle or move them around a bit and loot from a different angle.

Sam
06-07-2018, 10:48 AM
I'm getting this bug all the time. Not sure what causes it yet.

Kaliyuga
06-27-2018, 11:58 AM
Is there a fix for this problem yet?
Just started playing and i really like the game so far, but having my mouse stuck to the center of the screen everytime i want to move the camera is really annoying. :(

Silvonis
06-27-2018, 09:35 PM
Is there a fix for this problem yet?
Just started playing and i really like the game so far, but having my mouse stuck to the center of the screen everytime i want to move the camera is really annoying. :(

Please see:
https://forum.projectgorgon.com/showthread.php?1056-Bug-Cursor-Stuck&p=9666&viewfull=1#post9666

Boulderdash
07-12-2018, 01:39 AM
Hi,

At times I am having this problem too.

1. In a previous reply someone stated about "invisible" boxes. When I am having the cursor problem, the edges of the box are visible.
2. Each time the problem arises the cursor is a normal Windows cursor: the white arrow.
3. When this happens the cursor can not leave the box and each time the cursor hits the side of the box (or the loot button on top) it jumps back to the center of the box.
4. The problem can be solved by slighty moving the camera with the right mouse button (no need for a big turn).
5. When the camera has moved a bit, the cursor jumps to a game cursor: usually a sword. The box is no longer a barrier.

I am playing full screen on Windows 10.
I am using a Logitech G500s mouse (and its driver).


Boulderdash.

scullion
07-16-2018, 02:38 AM
I have this problem as a new player. Thanks for looking into it.

For me it seems to be related to UI boxes, such as the invisible box around a corpse on the ground. The cursor can get stuck inside the box, but if I move the view with the keyboard while the bug is in effect, it can also get stuck outside, meaning the cursor moves around fine while it's outside the box but seems to be repelled by the invisible edge of the box (presumably the cursor is center-locked only while within the box).


Entering and leaving mouse look mode always fixes it (though sometimes you have to move the view with the keyboard to do this).
It happens in both windowed and full screen mode.
Enabling NoSlowBoxes had no effect.
The window causing the problem doesn't seem to need to be covering the screen center.

It happens for me maybe 50% of the time I kill an enemy.

Valetudin
08-10-2018, 02:15 AM
I have this problem as a new player. Thanks for looking into it.

For me it seems to be related to UI boxes, such as the invisible box around a corpse on the ground. The cursor can get stuck inside the box, but if I move the view with the keyboard while the bug is in effect, it can also get stuck outside, meaning the cursor moves around fine while it's outside the box but seems to be repelled by the invisible edge of the box (presumably the cursor is center-locked only while within the box).


Entering and leaving mouse look mode always fixes it (though sometimes you have to move the view with the keyboard to do this).
It happens in both windowed and full screen mode.
Enabling NoSlowBoxes had no effect.
The window causing the problem doesn't seem to need to be covering the screen center.

It happens for me maybe 50% of the time I kill an enemy.

This aptly explains my experience as well. The only thing I will add is while using mouse look it will stop being in mouse look and instead create an auto run way point then re enter mouse look while I am just running around the world.

I have updated my mouse drivers, Microsoft drivers, enabled noslowboxes, used fullscreen and windowed mode but I still get the same rubber banding mouse in boxes on my screen.

johnnylogen
04-04-2019, 09:57 PM
Is there a fix for this problem yet?
Just started playing and i really like the game so far, but having my mouse stuck to the center of the screen everytime i want to move the camera is really annoying. :(

I am having this problem as well. I tried clicking on empty spaces to enter mouselook mode and release the mouse, with both buttons; I tried reinstalling the game, playing in windowed mode and I added NoSlowBoxes. None of that seemed to help so far.

spider91301
04-05-2019, 04:23 AM
That bugs existed since the dawn of time I don't know why this is suddenly new