timkurvers / valheim-macos

Build-your-own Valheim build for macOS
MIT License
272 stars 14 forks source link

Camera/Cursor Tracking Issue #87

Closed tojala1998 closed 2 months ago

tojala1998 commented 6 months ago

I've gotten the game booted up and running great with BepInX and 13 plugins. I've got a M2 Mac Mini 8GB.

There is an issue I'm having with the camera however, when I move the camera around normally it works as intended, but if I open a menu screen (Chests, Inventory, Workbench, Forge, Map, Menu, etc.), and move the cursor while in this screen, upon exiting the camera angle changes proportional to the inverse of the change made while in the inventory screen.

Below is a link to a short video demonstrating the issue: https://github.com/timkurvers/valheim-macos/assets/90887988/857f20a3-4fa7-457b-8867-1deefc5f8025

I have tested this with and without mods (including BepInX), and have no mods that mess with the camera anyways. I use a Logitech G703 mouse which interfaces with Logitech G Hub, which I have tested enabled and disabled. I have also tested with a different Logitech mouse I own. I have tested with VSync on and off,l fullscreen on and off and at different resolutions.

It's worth noting that the distance tracked has to do with how many pixels it moved on the screen, not within the game window. While in windowed mode (and the windows takes up about a fourth of my screen), if I moved to the top left of the window, the angle offset is much smaller than if I did the same thing in fullscreen mode.

If anyone has had this happen to them or heard of this I'd love to know. Also if you have any solutions/answers I'd be grateful.

Thank you!

stvnksslr commented 6 months ago

Do you have a windows manager like magnet installed by chance? this reads like the issue caused by it.

tojala1998 commented 6 months ago

Do you have a windows manager like magnet installed by chance? this reads like the issue caused by it.

Yes I do in fact have Magnets installed. Is quitting the application enough to fix the issues with Valhiem or do I need to uninstall it (ie: is there some background process screwing things up)?

Also, thanks so much for the reply!

stvnksslr commented 6 months ago

Its been a while since ive used magnets but there is a way to add a specific app to be excluded from being managed. the issue is whatever wrapper it puts around windows doesnt play well at all with some games and causes the issue you have described.

either exit magnets when playing or add it to the excluded list.

tojala1998 commented 6 months ago

Thanks @stvnksslr, I appreciate the insights! I've been dying to play this on my Mac and I'm super excited to get it working smoothly.

tojala1998 commented 6 months ago

Hi @stvnksslr, it's still doing the issue same as before. Ive tried temporarily uninstalling Magnets just to be safe and the issue persists. I've also tried disabling Logitech G Hub at the same time and tried turning off MacOS game mode. Nothing seems to actually work.

stvnksslr commented 6 months ago

Does this issue happen in fullscreen mode by chance? and do you have any launch options set for the game?

this is a weird one now that we have ruled out the window manager we can try and eliminate some of the other possibilities.

tojala1998 commented 6 months ago

No launch options for the game as I'm launching via terminal not steam... the issue persists in and out of fullscreen mode, and with v sync on and off, graphics settings high and low, and at any mouse sensitivity.

stvnksslr commented 5 months ago

You can pass options via the command line like

open build/Valheim.app --args -console
tojala1998 commented 5 months ago

That's not allowing me to see the console... initially I thought my f5 key was locked to another function, but I tried remapping it to mouse 5 and it still doesn't work. Either way I still have the issue with the camera, but I made another observation. It seems whenever I hold down or press left mouse it locks the view in one place. @stvnksslr

timkurvers commented 2 months ago

Closing this issue as the official macOS client is now available! 🥳 (see #104)