Search Unity

Action <XRHMD>/isTracked not getting called in preview.1

Discussion in 'Input System' started by Jichaels, Oct 15, 2019.

  1. Jichaels

    Jichaels

    Joined:
    Dec 27, 2018
    Posts:
    237
    I just migrated from 0.9.5 to preview.1 (because XR support is now back) but I'm now facing an issue that wasn't here on 0.9.5 :

    Both actions : <OculusHMD>/isTracked and <XRHMD>/isTracked are never getting called (sometimes they are when the game start).

    I was using this to switch between VR/Non-VR at runtime, and it was working fine. I added an XRHMD device as optionnal to all Non-VR control scheme to achieve this. When this action is called, I watch for userPresence state and set control scheme accordingly, it was working like a charm.

    I know some actions have been set to "non noisy" in this version (such has headset/controller position/rotation), could it be that this action was set to "non noisy" by error ?

    I really need a way to know this, is there another way I'm not thinking of ?

    Thanks !
     
  2. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    Hey @Jichaels, this is probably something that I messed up when I brought back the layouts. Would you mind filing a bug with the Unity bug reporter?
     
  3. Jichaels

    Jichaels

    Joined:
    Dec 27, 2018
    Posts:
    237
    Do I need to send my project aswell or just what's happening with a link to this post ?

    EDIT : Sent a bug report without my project but explaining everything and linking this post aswell : Case #1191646
     
    Last edited: Oct 15, 2019
  4. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    Thank you. We'll have a look. As long as there is some repro info for us and details about your hardware and so on, we should everything we need.
     
  5. Jichaels

    Jichaels

    Joined:
    Dec 27, 2018
    Posts:
    237
    I went back to this project, and had a look in the Input debugger, I found this (see attached file).

    So yeah it's probably the problem.
    Sans titre.png
    I'm also facing an issue, both my oculus touch controller are not tracked anymore, ever.

    I tested going back to 0.9.5 in one of my old version (I'm using collaborate), and it doesn't work either ?!

    It should not be my hardware, as it's fully functional in the oculus HUB.

    In the input debugger, actions are enabled, device is bound to my player, callbacks are set up in the playerInput, but I just don't get anything, I don't understand.

    Sans titre2.png

    Everything looks fine to me, is there something I forgot ? I just went back to the project, didn't change anything (I'm pretty sure, but even on the old working version it's not working anymore).

    Thanks :(
     
  6. Jichaels

    Jichaels

    Joined:
    Dec 27, 2018
    Posts:
    237
    Controllers are not "tracked", it's probably related. I'm not getting any inputs, be it position, rotation but even buttons or sticks.

    I believe that by default, oculus controlers are "not active/tracked", and when you press any button they becometracked (at least it's how it is in the samples of the oculus SDK, controllers don't appear until you press anything).

    @Rene-Damm
    Any way I can get around this while it is being fixed ? I can't do anything right now because of this :(


    EDIT : I can get it to be "isTracked" at 1 by spamming buttons while spamming the sensor of the headset with my finger, if that can help lol. All the values are fine in this panel, but I'm not getting any callbacks
     

    Attached Files:

    Last edited: Oct 18, 2019
  7. Jichaels

    Jichaels

    Joined:
    Dec 27, 2018
    Posts:
    237
    Bump, still didn't find a solution :(
     
  8. StayTalm_Unity

    StayTalm_Unity

    Unity Technologies

    Joined:
    May 3, 2017
    Posts:
    182
    IsTracked is not reporting UserPresence, it's reporting if the device is currently able to report it's position. For example, is the Oculus Rift visible to the 2 sensors? Or can a WindowsMR headset deduce it's position changes.

    Not all the platforms are properly updating this, and I'm working with them to make sure that IsTracked properly represents that the device is able to know and update it's tracking.

    What you want however is UserPresence: https://docs.unity3d.com/2020.1/Documentation/ScriptReference/XR.CommonUsages-userPresence.html

    User Presence is available for Windows MR and Oculus devices, in the new Plugin packages. That is actually measuring the on-HMD activity sensor.
     
  9. Jichaels

    Jichaels

    Joined:
    Dec 27, 2018
    Posts:
    237
    I know, that's why I used both to achieve what I wanted. IsTracked was getting called :

    When the "head sensor" was detecting something, and when it lost detection. After that callback I just checked UserPresence to know if I should toggle VR on or off.

    Anyway, layouts are getting fixed soon (thanks a lot !), so everything should be back to normal, and I'll experiment with userPresence and other things.

    Any ETA for the fix ? Thanks a lot for the work !


    EDIT : CommonUsages doesn't even have a userPresence in 2019.2, it seems everything is there but userPresence
     
    Last edited: Oct 25, 2019