Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved XR Device Simulator WASD inputs ignored

Discussion in 'XR Interaction Toolkit and Input' started by krank23, Oct 9, 2022.

  1. krank23


    Dec 10, 2013
    Is anyone else having problems getting WASD inputs to work? I've tried Unity 2021.3.11 and 2020.3.40, and I'm at the end of my rope.
    • I'm adding the packages (XR Toolkit, XR Plugin Management) and both Starter Assets and XR Device Simulator "samples".
    • I'm adding the Starter Asset presets as default configs.
    • I'm adding an XR Origin (Action-based), an Interaction Manager component and a Input Action Manager.
    • I'm adding the XRI Default Input Actions to the Input Action Manager. Everything works fine when connecting to an actual headset.
    • I'm adding the XR Device Simulator prefab to the scene.
    • I'm making sure the Input system is New or Both in Player Settings.
    But when I try to simulate… Well, the mouse works. Shift and Space works. R works. So it seems like the system isn't having problems detecting keyboard inputs.

    It's just not very interested in WASD or Q/E.

    I know this was working before, and I swear I'm following the same steps… Any suggestions greatly appreciated. Is this me forgetting something, or is it a bug?
    Last edited: Oct 9, 2022
    FYHqp and JackKalish like this.
  2. krank23


    Dec 10, 2013
    I managed to get it working on 2020.3.34 and 2020.3.40, though I had to add the XR Toolkit package manually to the json file in the case of 2020.3.40.

    Still having problems with 2021.3.11 though. I'm not doing anything different; taking the same steps just results in different outcomes.

    EDIT: I tried forcing a newer version of the plugin in 2021.3.11. Recommended verison was 2.0.3 (didn't work), and the 2020.3.x versions worked fine with 2.1.1.

    Reimported everything, recreated the scene. No change. Seems like it's a 2021.x issue, rather than a plugin version issue.
    Last edited: Oct 9, 2022
    JackKalish likes this.
  3. chris-massie


    Unity Technologies

    Jun 23, 2020
    UPDATE (2022-10-26): The shortcut support in Input System package is changing to be opt-in for version 1.4.4 and this script below will not be necessary with that version.

    I think this may be an issue caused when using the Input System package at version 1.4.0 or higher. If you are referring to using the WASD keys for keyboard translation (done by pressing 3 to toggle that feature), that feature is currently conflicting with the same keyboard keys bound to other input actions in composite bindings used by the simulator.

    As a workaround to resolve the issue until a permanent fix is in place, try disabling the keyboard shortcuts feature of Input System by adding this component to a GameObject:

    Code (CSharp):
    1. using UnityEngine;
    2. using UnityEngine.InputSystem;
    4. [DefaultExecutionOrder(-30000)]
    5. public class ShortcutDisabler : MonoBehaviour
    6. {
    7.     protected void Awake()
    8.     {
    9.         // Disable Input System 1.4.0 shortcut feature by adding this component to an enabled GameObject
    10.         // in your main/first scene.
    11.         // See
    12.         InputSystem.settings.SetInternalFeatureFlag("DISABLE_SHORTCUT_SUPPORT", true);
    13.     }
    14. }
    Last edited: Oct 26, 2022
  4. krank23


    Dec 10, 2013
    Thank you!

    Yeah, that's what I was referring to, sorry I wasn't clear.

    And I can confirm the workaround works like a charm!
    chris-massie likes this.
  5. djhatvr


    Sep 22, 2019
    Seems that 1.4.4 XR bindings disable keyboard bindings in PC builds (works fine in Editor). I spent close to a week debuging this. I had to put keyboard bindings in a separate game object with a separate InputAction.
  6. dronelius


    Jan 23, 2023
    just wanted to let yall know i had this same issue but resolved it by updating my xr interaction toolkit package in the package manager window!
    VRDave_Unity likes this.
  7. kentg1


    Dec 22, 2014
    I got mine to work by getting the XR Interaction 2.3 loaded - BUT you then have the XR simulator settings in your package manager
  8. JackKalish


    Feb 6, 2014
    How do you upgrade to XRI 2.3 without breaking your project? When I tried to update to XRI 2.3, and after re-importing the XR Device Simulator, my project no longer compiles, saying "No Controller Action Asset has been defined, please assign one for the XR Device Simulator to work."