Search Unity

Resolved WASD in particular stopped working after updating the unity editor.

Discussion in 'Input System' started by chusmimax, Sep 29, 2022.

  1. chusmimax

    chusmimax

    Joined:
    Oct 5, 2019
    Posts:
    2
    After updating to 2021.3.11f1 movement with keyboard has stopped working. It is strange because all other keys keep working as intended. On the other side, movement with a controller is still working fine, so only this is affected. I've run out of ideas on why this could be, so I came here to ask after searching for a solution all day.

    This is the button mapping:
    upload_2022-9-30_0-13-34.png

    and this is the code implementation (Now only returns (0,0)):
    Code (CSharp):
    1. Movement = playerController.OverWorld.Movement.ReadValue<Vector2>();
    I would really appreciate any help on this topic, as only going back to older versions looks like a solution at this point.
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,975
    This is probably just some odd issue somewhere in your code or input settings, not a versioning issue. After all, everything else is working fine.

    What are the settings on "Movement" and one of the keys, ie "W"? I can imagine you simply assigned them to the wrong control scheme, ie they're active only when the gamepad is active, or never active.

    upload_2022-9-30_10-44-24.png
    In the upper left, select the "Keyboard & Mouse" control scheme to see which keys are assigned to that scheme. If WASD vanishes if you do so, they're not in that scheme. If you do not have a Keyboard&Mouse scheme, you need to create one for each control scheme (K&M and Gamepad at a minimum).
     
  3. Spy-Master

    Spy-Master

    Joined:
    Aug 4, 2022
    Posts:
    628
    @CodeSmile I'm not so sure that's the case here.

    There's a well-known issue with 1.4.1+ preventing WASD from working when another action on an enabled action map has WASD. That's due to new behavior for multiple actions using the same bindings.

    https://forum.unity.com/threads/input-system-1-4-1-released.1306062/#post-8368569

    The editor version update probably caused an update to the Input System package when you opened the project with that editor. There was an automatic Input System package upgrade if you were upgrading from editor 2021.3.7 or lower.

    The recommendation is to disable maps that aren't being used at a specific moment - the conflicting map is probably your UI map, which should probably not be active while you're playing the game.
     
    EDevJogos likes this.
  4. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,975
    Oh okay, haven't heard that. I'm using 1.4.2 and so far everything worked fine with keyboard and gamepad.
     
  5. chusmimax

    chusmimax

    Joined:
    Oct 5, 2019
    Posts:
    2