Search Unity

Question VR Hands and movement not working

Discussion in 'VR' started by IvanTheTankable, Apr 11, 2022.

  1. IvanTheTankable

    IvanTheTankable

    Joined:
    Apr 22, 2021
    Posts:
    15
    Hello,

    In my project, I am able to load into VR and look around, but I can't move my hands or perform any locomotion, despite the OpenXR scripts being attached. I expect there is something somewhere in my settings that is incorrect, but I am not sure where. I verified with the debugger that the controllers are tracking correctly, but nothing is actually happening in the scene.
    The project:
    https://drive.google.com/file/d/1a2jjxme8TpN_Kql7FszLd_c3vYHogYGf/view?usp=sharing

    Any guidance would be greatly appreciated.
    I am using an oculus quest 2 on Unity 2020.3.18f1.
     
    AldeRoberge likes this.
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,040
    I'm not going to download the full project, but is OpenXR enabled in XR Management under desktop and android and are the touch controllers enabled under both?
     
  3. IvanTheTankable

    IvanTheTankable

    Joined:
    Apr 22, 2021
    Posts:
    15
    I figured it out in my test scene; importing the oculus integration package smoothed things over. I currently have oculus enabled in both PC and android in my project settings; I had previously had OpenXR enabled but that had not been working.
    In my main scene, however, I am using the uMMO package, which I believe disables the XR interaction toolkit when I load in, giving me the warning

    'Enable Input Tracking' is enabled, but Position and/or Rotation Action is disabled.
    The pose of the controller will not be updated correctly until the Input Actions are enabled.
    Input Actions in an Input Action Asset must be explicitly enabled to read the current value of the action.
    The Input Action Manager behavior can be added to a GameObject in a Scene and used to enable all Input Actions in a referenced Input Action Asset.
    UnityEngine.XR.Interaction.Toolkit.XRBaseController:Update ()
    (at Library/PackageCache/com.unity.xr.interaction.toolkit@2.0.1/Runtime/Interaction/Controllers/XRBaseController.cs:292)

    I think I need to manually reenable XR's perception of movement actions, but I am unsure how.
     
    DevDunk likes this.
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,040
    Did uMMO maybe switch you to the old input system?
     
  5. IvanTheTankable

    IvanTheTankable

    Joined:
    Apr 22, 2021
    Posts:
    15
    It somehow turned off my input action manager, so I had to write a script to reenable all through the input action manager. It is fixed now!
     
  6. Flashheart8

    Flashheart8

    Joined:
    May 21, 2018
    Posts:
    5
    Can you tell us how you did that?

    I'm having the same issue
     
  7. Deleted User

    Deleted User

    Guest

    Hi,
    Facing the same issue. Can you please help !!!
     
  8. IvanTheTankable

    IvanTheTankable

    Joined:
    Apr 22, 2021
    Posts:
    15
    It was quite a while ago I dealt with this but looking back on the code I think the fix was the line

    XRActionManager.EnableInput();

    Presuming you have a method that is manually initializing VR. I took and slightly modified the following from another forum post and put it in the namespace UnityEngine.XR.Interaction.Toolkit.Inputs

    Code (CSharp):
    1. public void StartVR()
    2.     {
    3.         Debug.Log("Initializing VR...");
    4.         if (XRGeneralSettings.Instance.Manager.activeLoader != null) {
    5.             XRGeneralSettings.Instance.Manager.StopSubsystems();
    6.             XRGeneralSettings.Instance.Manager.DeinitializeLoader();
    7.         }
    8.         XRGeneralSettings.Instance.Manager.InitializeLoaderSync();
    9.         if (XRGeneralSettings.Instance.Manager.activeLoader == null)
    10.         {
    11.             Debug.LogError("Initializing VR Failed.");
    12.             VRFail.SetActive(true);
    13.         }
    14.         else
    15.         {
    16.             Debug.Log("Starting VR...");
    17.        
    18.             XRGeneralSettings.Instance.Manager.StartSubsystems();
    19.             mainCamera.enabled = false;
    20.             ToggleVRPlayer playerVR = Player.localPlayer.gameObject.GetComponent<ToggleVRPlayer>();
    21.             XRActionManager.EnableInput();
    22.         }
    23.     }
    Does that help?
     
  9. antonsem

    antonsem

    Joined:
    Dec 13, 2012
    Posts:
    18
    Fix for "Enable Input Tracking' is enabled, but Position and/or Rotation Action is disabled" warning

    Unity asks you to enable the input action asset. If you imported XR Interaction Toolkit you will have one in Assets/Samples/XR Interaction Toolkit/(version)/Starter Assets/XRI Default Input Actions.

    You can assign it to some component in inspector and call
    Code (CSharp):
    1. actionAsset.Enable();
    method on it. Or if you are using the XR Origin (XR Rig) object you can simply assign it to InputActionManager component's Action Assets array. It will take care of the initialization.

     
  10. kisde204

    kisde204

    Joined:
    Mar 11, 2021
    Posts:
    1
    I need some help, im having a problem where it says:
    Enable Input Tracking' is enabled, but Position and/or Rotation Action is disabled. The pose of the controller will not be updated correctly until the Input Actions are enabled. Input Actions in an Input Action Asset must be explicitly enabled to read the current value of the action. The Input Action Manager behavior can be added to a GameObject in a Scene and used to enable all Input Actions in a referenced Input Action Asset.
    UnityEngine.XR.Interaction.Toolkit.XRBaseController:Update () (at ./Library/PackageCache/com.unity.xr.interaction.toolkit@2.5.2/Runtime/Interaction/Controllers/XRBaseController.cs:303
    and,
    'Enable Input Actions' is enabled, but Select, Activate, and/or UI Press Action is disabled. The controller input will not be handled correctly until the Input Actions are enabled. Input Actions in an Input Action Asset must be explicitly enabled to read the current value of the action. The Input Action Manager behavior can be added to a GameObject in a Scene and used to enable all Input Actions in a referenced Input Action Asset.
    UnityEngine.XR.Interaction.Toolkit.XRBaseController:Update () (at ./Library/PackageCache/com.unity.xr.interaction.toolkit@2.5.2/Runtime/Interaction/Controllers/XRBaseController.cs:303)
    and
    'Enable Input Tracking' is enabled, but Position and/or Rotation Action is disabled. The pose of the controller will not be updated correctly until the Input Actions are enabled. Input Actions in an Input Action Asset must be explicitly enabled to read the current value of the action. The Input Action Manager behavior can be added to a GameObject in a Scene and used to enable all Input Actions in a referenced Input Action Asset.
    UnityEngine.XR.Interaction.Toolkit.XRBaseController:Update () (at ./Library/PackageCache/com.unity.xr.interaction.toolkit@2.5.2/Runtime/Interaction/Controllers/XRBaseController.cs:303)
    and finally,
    'Enable Input Actions' is enabled, but Select, Activate, and/or UI Press Action is disabled. The controller input will not be handled correctly until the Input Actions are enabled. Input Actions in an Input Action Asset must be explicitly enabled to read the current value of the action. The Input Action Manager behavior can be added to a GameObject in a Scene and used to enable all Input Actions in a referenced Input Action Asset.
    UnityEngine.XR.Interaction.Toolkit.XRBaseController:Update () (at ./Library/PackageCache/com.unity.xr.interaction.toolkit@2.5.2/Runtime/Interaction/Controllers/XRBaseController.cs:303)
    what do i do?
     
  11. arinawilson

    arinawilson

    Joined:
    Oct 18, 2023
    Posts:
    1
    When your VR hands and movement are not working, it can be frustrating, but there are several troubleshooting steps you can take to resolve the issue like cleaning sensors, re-pairing controllers, restarting everything, etc.

    VR headset and controllers, as the process may vary depending on the specific brand and model you're using. If the issue remains unresolved, professional assistance or repairs may be necessary. Take help from contact support.
     
  12. Nicholas2024

    Nicholas2024

    Joined:
    Jan 19, 2024
    Posts:
    1
    where do you put that script
     
  13. petroslouca

    petroslouca

    Joined:
    May 17, 2018
    Posts:
    14
    I use XR Origin and this inspector assignment solved the issue! (Unity 2022.3, XR Interaction Toolkit 2.5.2)