OpenParsec / openparsec

GNU General Public License v2.0
51 stars 8 forks source link

Mouse input, cursor bleeds through into game #89

Open CrazySpence opened 2 years ago

CrazySpence commented 2 years ago

I've used mouse input a couple times as it gives you faster turning and I've noticed sometimes the mouse cursor bleeds through

Platform: Mac OS

Need to find out if this is occurring on the other platforms so if anyone on Linux or Windows has tried mouse mode let me know

uberlinuxguy commented 2 years ago

I don't know if I have seen this on windows. I have an odd setup with the app called Barrier though. So that can cause the cursor to bleed through. I will have to disable barrier and see if it happens.

I did notice oddness with the video and OBS capture though.

slime73 commented 2 years ago

I think this is happening because the game only constrains the cursor by warping it back into the window if it exits, every frame. If you move the mouse fast enough then it'll appear outside the window for the duration of that frame.

The game should really be using SDL_SetRelativeMouseMode which is designed for FPS setups like parsec's gameplay. I tried playing around with it a little bit last weekend (including querying relative mouse positions instead of absolute ones, every frame) but the code around "mouse drift" is a little confusing so I didn't get it to work correctly yet.

There might be other possible workarounds in the meantime, too.

CrazySpence commented 2 years ago

So even in the menus if I move the mouse around rapidly the custom cursor becomes overridden by the system cursor