Search Unity

Question about TrackedPoseDriver PoseSource (Bug?)

Discussion in 'AR/VR (XR) Discussion' started by R1PFake, Jul 24, 2018.

  1. R1PFake

    R1PFake

    Joined:
    Aug 7, 2015
    Posts:
    540
    Hello,
    i want to track my VR (Vive) controllers with Unity 2018.2.0f2, in the previous version i used the classes from the XR namespace (where you had to get XNodes or something like that and update the position/rotation of you actuall object manually).

    I found a example somewhere were they uses the TrackedPoseDriver component for tracking instead, which updates the transform based on the tracking.

    But my problem is that i don't understand the Pose Source behavior or maybe this is a bug.

    I made two controller objects, both of them have a TrackedPoseDriver with "Generic XR Controller" as Device and for the Pose Source Left and Right Controller.

    Now my problem is that sometimes the Pose Source of my left controller somehow changes to Right Controller after hitting play and this is very annoying, it doesn't happen always, only sometimes and i have no idea why, this is a major problem, because the whole game doesn't work anymore if i suddently have two right controllers instead of one right and one left.

    My ugly workaround is that i have a additonal script on each controller which checks if the TrackedPoseDriver is still the expected Pose Source and otherwise i have to set the correct Pose Source again.

    So is this a bug or is this the expected behavior that the TrackedPoseDriver changes the Pose Source in play mode for what ever reason?

    Btw sometimes i only have my right controller on and don't use the left controller, maybe the TrackedPoseDriver changes Pose Source if it doesn't find the left controller?
     
  2. Matt_D_work

    Matt_D_work

    Unity Technologies

    Joined:
    Nov 30, 2016
    Posts:
    202
    Sounds similar to a multi-select bug im looking at. Please bug this with a repro project!
     
  3. R1PFake

    R1PFake

    Joined:
    Aug 7, 2015
    Posts:
    540
    You are right, it's a multi-select bug.

    - Create 2 game objects
    - Add a TrackedPoseDriver to both
    - Select one of them and change the default setting of the Pose Source from "Left Eye" to anything else for example "Right Eye"
    - While the object is still selected, multi select the other object (with control + click) and now both of them have the same Pose Source value (normally it should show "-" as value instead because the values of the selected objects are different)
    - Select the first object again to confirm that the Pose Source value was changed to the value of the other object

    I don't know how these values are checked but it looks like the bug only happens with the Pose Source property, because
    if i do the same steps but change a different property, for example the "Device" and multiselect the other object it shows "--" as Device value, because both of the values are different and it doesn't change any values