Constrain the Mouse

I've seen very few of others posting about this on Valheim but its an issue that needs to be addressed. Even if you're running full screen mode, the mouse has a tendency to leave the game and go onto other monitors. This makes combat quite difficult. Please constrain the mouse to the game window. I've seen a few solutions, none of them work, and I shouldn't have to buy or install an unknown third party software to fix the game to do this exact thing.

Also, if you're thinking about posting "it doesn't happen to me!", "works perfectly for me!" or any of that mess, please don't post. Constructive and helpful feedback only please.
8:13 am, August 12, 2021
Naantam 0 comments 0 likes

AllOutWar76 replied to Constrain the Mouse March 18, 2021 @ 6:38:44 pm PDT

I have this issue when I misclick while in inventory since I also run more than one monitor like you.

I do have to ask, how does it effect combat for you? You don't have a mouse pointer while using tools or weapons. My only guess is that maybe you are opening inventory during combat? If so, while we wait for an exclusive full screen a band aid fix for the time being would be to add consumables to the hot bar.
8:13 am, August 12, 2021
0 comments 0 likes

Naantam replied to Constrain the Mouse March 18, 2021 @ 7:11:55 pm PDT

Originally posted by AllOutWar76:
I have this issue when I misclick while in inventory since I also run more than one monitor like you.

I do have to ask, how does it effect combat for you? You don't have a mouse pointer while using tools or weapons. My only guess is that maybe you are opening inventory during combat? If so, while we wait for an exclusive full screen a band aid fix for the time being would be to add consumables to the hot bar.
For me the mouse pointer never goes away. It is constantly on the screen and entering or exiting a menu or inventory does not get rid of it. So in order to actually aim, I have to do a lot more with my mouse, which can lead to under-turn, over-turn, or accidental turn during combat or other activities.
8:13 am, August 12, 2021
0 comments 0 likes

Manwith Noname replied to Constrain the Mouse March 18, 2021 @ 7:20:44 pm PDT

You can try the Unity exclusive fullscreen launch argument and see if it works but I don't have any success with it.

-window-mode exclusive

Put that in the launch options of the games properties within Steam.
8:13 am, August 12, 2021
0 comments 0 likes

AllOutWar76 replied to Constrain the Mouse March 18, 2021 @ 7:22:03 pm PDT

Originally posted by Naantam:
Originally posted by AllOutWar76:
I have this issue when I misclick while in inventory since I also run more than one monitor like you.

I do have to ask, how does it effect combat for you? You don't have a mouse pointer while using tools or weapons. My only guess is that maybe you are opening inventory during combat? If so, while we wait for an exclusive full screen a band aid fix for the time being would be to add consumables to the hot bar.
For me the mouse pointer never goes away. It is constantly on the screen and entering or exiting a menu or inventory does not get rid of it. So in order to actually aim, I have to do a lot more with my mouse, which can lead to under-turn, over-turn, or accidental turn during combat or other activities.
I see, this sounds like a bug. I have not run into this yet but I can confirm that there is no exclusive full screen mode. Since you always have a mouse pointer I can't help but would suggest posting this in the bug report section. Of course keep this thread active as maybe someone else had this problem and found a fix, but an additional thread in the bug forum will let the devs know as they don't read general. Best of luck.
8:13 am, August 12, 2021
0 comments 0 likes

MF SPAWN replied to Constrain the Mouse March 18, 2021 @ 7:38:45 pm PDT

Spam alt+enter a few times to try and force the game into actual full screen mode.
8:13 am, August 12, 2021
0 comments 0 likes

PsychoMark replied to Constrain the Mouse August 11, 2021 @ 11:32:21 pm PDT

None of the suggestions worked for me when this issue occured. I'm not sure what causes it, as it doesn't always happen for me, but it's very annoying when it does and makes the game unplayable.

So, inspired by Dual Monitor Tools I wrote a small application to constrain the cursor to the monitor of the active window (assumes you're playing fullscreen - I could've kept it to just the window but since I play fullscreen this makes it easier to access the taskbar afterwards). Perhaps it's useful to others searching for a workaround until it is properly fixed:

https://github.com/MvRens/MouseTrap
8:13 am, August 12, 2021
0 comments 0 likes