Can I change rotate key from scroll mouse to other button?
    My scroll mouse is crash. Can I change rotate key from scroll mouse to other button? Or add 
rotate key setting to keybinding page.
  rotate key setting to keybinding page.
    
       5:13 pm, July 31, 2021  
    
  
  
  
76561198020743862 replied to Can I change rotate key from scroll mouse to other button? April 2, 2021 @ 7:59:32 am PDT
    thank you for your knowledge :D
  
  
    
       8:13 am, August 2, 2021  
    
  
  
    
       0 comments 
    
     
       0 likes 
    
  
  
C4st1gator replied to Can I change rotate key from scroll mouse to other button? August 1, 2021 @ 3:06:08 pm PDT
    No it's not. Some C# code of the level I can write is certainly not a waste of time, if it makes the game controls better.
  
  
    
       11:13 pm, August 1, 2021  
    
  
  
    
       0 comments 
    
     
       0 likes 
    
  
  
Wariat117 replied to Can I change rotate key from scroll mouse to other button? July 31, 2021 @ 11:41:38 pm PDT
so it's not impossible.noone said it's impossible
it's just pain in the butt and waste of time to make itit's just waste of time
    
       8:13 am, August 1, 2021  
    
  
  
    
       0 comments 
    
     
       0 likes 
    
  
  
C4st1gator replied to Can I change rotate key from scroll mouse to other button? July 31, 2021 @ 3:07:58 pm PDT
    Granted, I didn't modify Unity Engine, but I have enough experience with GTK 3.0 and QT to say that the button is only a means to fire an event. 
This can be done with any other button and mouse wheels really aren't special in this regard. The spinning wheel simply causes a quick succession of wheel-up or wheel-down signals. The game engine has an event loop listener, that executes actions depeding on the input signal.
Besides, Unity Engine also has Cities:Skylines, which was made by 12 people and supported rebinding zoom-in and zoom-out camera controls from day one. I swapped mouse wheel for keyboard wihtout issue there, so it's not impossible.
Looking into its documentation[docs.unity3d.com], Unity seems to support mouse, keyboard and controller input by default. Though they built a SrollHandler class into the engine to handle scroll wheel input. It should be possible to convert the scroll wheel movement into Unity input type.
This article[www.programmersought.com] describes it in some detail. I may look into this more in-depth, but I'd need a way to send the findings to the developers.
Still, I'll probably have to recompile the dll in the short to medium term.
  This can be done with any other button and mouse wheels really aren't special in this regard. The spinning wheel simply causes a quick succession of wheel-up or wheel-down signals. The game engine has an event loop listener, that executes actions depeding on the input signal.
Besides, Unity Engine also has Cities:Skylines, which was made by 12 people and supported rebinding zoom-in and zoom-out camera controls from day one. I swapped mouse wheel for keyboard wihtout issue there, so it's not impossible.
Looking into its documentation[docs.unity3d.com], Unity seems to support mouse, keyboard and controller input by default. Though they built a SrollHandler class into the engine to handle scroll wheel input. It should be possible to convert the scroll wheel movement into Unity input type.
This article[www.programmersought.com] describes it in some detail. I may look into this more in-depth, but I'd need a way to send the findings to the developers.
Still, I'll probably have to recompile the dll in the short to medium term.
    
       11:13 pm, July 31, 2021  
    
  
  
    
       0 comments 
    
     
       0 likes 
    
  
  
Fall3n replied to Can I change rotate key from scroll mouse to other button? March 13, 2021 @ 9:24:52 am PDT
    Same my scroll is broken and I can't rotate things...
  
  
    
       5:13 pm, July 31, 2021  
    
  
  
    
       0 comments 
    
     
       0 likes 
    
  
  
Wariat117 replied to Can I change rotate key from scroll mouse to other button? March 13, 2021 @ 9:27:45 am PDT
    1) You can use controller (just for rotating, and for the rest K+M)
2) You can edit the button in the game files
  2) You can edit the button in the game files
File: 
\Steam\steamapps\common\Valheim\valheim_Data\Managed\assembly_valheim.dllClass:
public class Player : HumanoidMethod:
private void UpdatePlacement(bool takeInput, float dt)Code:
	if (Input.GetAxis("Mouse ScrollWheel") < 0f) { this.m_placeRotation--; } if (Input.GetAxis("Mouse ScrollWheel") > 0f) { this.m_placeRotation++; }
Either replace those 2 or add next to them	if (Input.GetKey(KeyCode.LeftAlt)) { this.m_placeRotation--; } if (Input.GetKey(KeyCode.RightAlt)) { this.m_placeRotation++; }
Instead of left/right alt you can use different buttons.
  
    
       5:13 pm, July 31, 2021  
    
  
  
    
       0 comments 
    
     
       0 likes 
    
  
  
Fall3n replied to Can I change rotate key from scroll mouse to other button? March 15, 2021 @ 10:21:41 am PDT
    hi, thanks for your answer. Could you tell me how to edit the file? I didn't find how to do it
  
  
    
       5:13 pm, July 31, 2021  
    
  
  
    
       0 comments 
    
     
       0 likes 
    
  
  
Wariat117 replied to Can I change rotate key from scroll mouse to other button? March 15, 2021 @ 10:28:20 am PDT
hi, thanks for your answer. Could you tell me how to edit the file? I didn't find how to do iti'm using program called "dnSpy"
I have heard that "Visual studio" works too
generally any program that allows to edit C# should do
in dnspy once you find the mentioned method you right click -> edit method
once you do your job you right click -> compile
    
       5:13 pm, July 31, 2021  
    
  
  
    
       0 comments 
    
     
       0 likes 
    
  
  
Fall3n replied to Can I change rotate key from scroll mouse to other button? March 15, 2021 @ 12:16:42 pm PDT
    it's hard to control the rotation but it works and that's the most important. Thank you very much for your help!!
  
  
    
       5:13 pm, July 31, 2021  
    
  
  
    
       0 comments 
    
     
       0 likes 
    
  
  
Droptears replied to Can I change rotate key from scroll mouse to other button? April 2, 2021 @ 7:59:32 am PDT
    thank you for your knowledge :D
  
  
    
       5:13 pm, July 31, 2021  
    
  
  
    
       0 comments 
    
     
       0 likes 
    
  
  
C4st1gator replied to Can I change rotate key from scroll mouse to other button? July 31, 2021 @ 8:44:50 am PDT
Instead of left/right alt you can use different buttons.
Thank you so much. I don't know why the developers don't want users to be able to rebind the mouse wheel through the user interface, but this will now be my method of choice. Thank you. You saved Valheim for me.
    
       5:13 pm, July 31, 2021  
    
  
  
    
       0 comments 
    
     
       0 likes 
    
  
  
Weaver replied to Can I change rotate key from scroll mouse to other button? July 31, 2021 @ 9:05:22 am PDT
    Add to an existing comment about keybinds in the suggestion forums. Devs, especially small ones often don't think of many things, such as rebinding everything, because it never occurred to their small team. It's like they likely don't have anyone who is coloblind on the team because for us colorblind folks the mushrooms and berries can be bloody invisble as they blend in with everything else. Accessibility options are often things devs don't think about unless it is brought up to them.
  
  
    
       5:13 pm, July 31, 2021  
    
  
  
    
       0 comments 
    
     
       0 likes 
    
  
  
Wariat117 replied to Can I change rotate key from scroll mouse to other button? July 31, 2021 @ 9:48:28 am PDT
I don't think that unity has easy way to implement thisInstead of left/right alt you can use different buttons.
Thank you so much. I don't know why the developers don't want users to be able to rebind the mouse wheel through the user interface, but this will now be my method of choice. Thank you. You saved Valheim for me.
It looks like buttons and mouse wheel are as different as birds and humans
they are both alive, but you can't really swap them
long story short, it's just pain in the butt and waste of time to make it
small devs usually use what's prepared already by the engine and leave it be while they focus on drinking game
    
       5:13 pm, July 31, 2021  
    
  
  
    
       0 comments 
    
     
       0 likes