Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPTK with new Input System and XR Origin #16

Closed
EphTron opened this issue Jun 13, 2022 · 2 comments
Closed

HPTK with new Input System and XR Origin #16

EphTron opened this issue Jun 13, 2022 · 2 comments

Comments

@EphTron
Copy link

EphTron commented Jun 13, 2022

I am running into an issue when setting up HPTK with Unity 2020.3.34.
I setup a clean project and installed:

  • XR Plugin Managment with OpenXR
  • XR Interaction Toolkit (with XRI Default Input Actions)
  • Input System

I added the HPTK package and followed the instructions here (https://jorge-jgnz94.gitbook.io/hptk/setup) -> changed Physic settings, added HPTK layer, set XR Plugin Managment to OpenXR. Playmode Run time to Oculus, added Oculus Touch Controller to Interaction profiles.
Then I added the DefaultSetup.UnityXR prefab and the DefaultAvatar.Standard to my scene.
In the DefaultSetup I exchanged the XRRig with a XR Origin and replaced the ref of the HPTK 'Tracked Camera' and 'Tracked Space' to the new XR Origin. I also added an Input Action Manager to the XR Origin.
In the DefaultAvatar I added the left and right hand meshes to the Representation>Hand.L/R>Slave/Master to have the hands visible.

When I run this setup I get the error "Controller for Left/Right side was not found! Interrupting update"
HandPhysicsToolkit.Input.UnityXRControllerTracker:UpdateData () (at Assets/HPTK/Runtime/Input/InputDataProviders/UnityXRControllerTracker.cs:78)
HandPhysicsToolkit.Modules.Hand.Input.InputController:ControllerUpdate () (at Assets/HPTK/Runtime/Modules/Hand/Input/InputController.cs:136)
HandPhysicsToolkit.HPTKController:Update () (at Assets/HPTK/Runtime/Modules/Abstracts/HPTKController.cs:36)

Does the HPTK package not support the new Input System?
Can I use the HPTK package with OpenXR without the new Input System?
I would be grateful for any help or advice.
Cheers

@jorgejgnz
Copy link
Owner

jorgejgnz commented Jun 22, 2022

Hi! It seems UnityXRControllerTracker, the input data provider for UnityXR, was not able to find any active device with the characteristic "HeldInHand" enabled.

As you're using XR Interaction Toolkit, you should have "XR Controller (Device based)" components in
XR Origin > Camera Offset > Left/RightHand Controller.

If so, would you mind to write the output you're getting when you use the following component in your scene while using your VR controllers?

using UnityEngine;
using UnityEngine.XR;
using UnityEngine.XR.Interaction.Toolkit;

public class DeviceInfo : MonoBehaviour
{
    public XRController controller;

    void Start()
    {
        if (controller != null)
        {
            InputDevice device = controller.inputDevice;
            Debug.Log("Manuf:[" + device.manufacturer + "] Name:[" + device.name + "]\n";);
            Debug.Log(device.characteristics.ToString());
        }
    }
}

@jorgejgnz
Copy link
Owner

This issue has received no response and will be closed.

@jorgejgnz jorgejgnz closed this as not planned Won't fix, can't repro, duplicate, stale Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants