Search Unity

  1. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

Bug VR with MixedRealityPlayspace possible issue on head rotation tracking

Discussion in 'AR/VR (XR) Discussion' started by o-aragones, Aug 6, 2020.

  1. o-aragones

    o-aragones

    Joined:
    Oct 16, 2013
    Posts:
    10
    Hello everybody,

    We are working on a seated VR solution for a HP VR Headset. We are working with the Portal Mixed Reality from Microsoft.

    We start a clean project with the next packages imported:
    • Microsoft.MixedReality.Toolkit.Unity.Foundation.2.4.0
    • Microsoft.MixedReality.Toolkit.Unity.Tools.2.4.0
    • Microsoft.MixedReality.Toolkit.Unity.Extensions.2.4.0
    • Microsoft.MixedReality.Toolkit.Unity.Examples.2.4.0
    When we try to play with some of the examples included with the headset we detect a little flick rotation position.

    When we rotate over the Y axis around -118 and -120, the system make a change rotation to around 72.

    Please make a look to the video screen recorder:



    We try to capture this issue by code ... but when we try to relocate the camera ... the Head VR movement isn't fluid... it have some little flickers.

    We try to capture this issue with some code to update the camera for the new position without success.

    Any idea? any help?

    Thanks in advance!
     
  2. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    936
    Can you please file a bug for this and post the bug number hear?
     
  3. o-aragones

    o-aragones

    Joined:
    Oct 16, 2013
    Posts:
    10
    Sorry, how can i do that? I'm new trying to report an issue.
    Thanks in advance!
     
  4. o-aragones

    o-aragones

    Joined:
    Oct 16, 2013
    Posts:
    10
    Ok we got it ! reporting... Thanks!
     
  5. o-aragones

    o-aragones

    Joined:
    Oct 16, 2013
    Posts:
    10
    Hello we report the bug at:

    ref number 1268878

    We hope to have a fast solution.

    Thanks in advance.
     
    Last edited: Sep 7, 2020
  6. o-aragones

    o-aragones

    Joined:
    Oct 16, 2013
    Posts:
    10

    We try to "make it working" with a very dirty way...

    We attach the code for a new Tracked Pose Driver:

    Code (CSharp):
    1. using System;
    2. using System.Collections.Generic;
    3. using System.Runtime.CompilerServices;
    4.  
    5. #if ENABLE_VR || ENABLE_AR
    6. using UnityEngine.XR;
    7. using UnityEngine.Experimental.XR.Interaction;
    8. #endif
    9.  
    10. #if ENABLE_AR
    11. using UnityEngine.XR.Tango;
    12. #endif
    13.  
    14. namespace UnityEngine.SpatialTracking
    15. {
    16.     public class TrackedPoseDriverPPT : TrackedPoseDriver
    17.     {
    18.         private bool firstLayer;
    19.         private Quaternion lastRotation;
    20.  
    21.         // [SerializeField]
    22.         // TrackingType m_TrackingType;
    23.  
    24.  
    25.         protected override void SetLocalTransform(Vector3 newPosition, Quaternion newRotation, PoseDataFlags poseFlags)
    26.         {
    27.             /* if ((m_TrackingType == TrackingType.RotationAndPosition ||
    28.                  m_TrackingType == TrackingType.RotationOnly) &&
    29.                  (poseFlags & PoseDataFlags.Rotation) > 0)
    30.              {
    31.                  transform.localRotation = newRotation;
    32.              }*/
    33.  
    34.             /* if ((m_TrackingType == TrackingType.RotationAndPosition ||
    35.                  m_TrackingType == TrackingType.PositionOnly) &&
    36.                  (poseFlags & PoseDataFlags.Position) > 0)
    37.              {
    38.                  transform.localPosition = newPosition;
    39.              }*/
    40.  
    41.             //newRotation = GetComponent<TrackedPoseDriver>().transform.rotation;
    42.  
    43.             if (firstLayer)
    44.             {
    45.                 firstLayer = false;
    46.                 lastRotation = newRotation;
    47.             }
    48.  
    49.  
    50.             bool issueActivated = false;
    51.             if (70 < newRotation.eulerAngles.y && newRotation.eulerAngles.y < 80)
    52.             {
    53.                 if (230 < lastRotation.eulerAngles.y && lastRotation.eulerAngles.y < 250)
    54.                 {
    55.                     //Debug.Log("ISSUE!");
    56.                     issueActivated = true;
    57.                 }
    58.             }
    59.  
    60.  
    61.             if (!issueActivated)
    62.             {
    63.                 //GetComponent<TrackedPoseDriver>().enabled = false;
    64.                 transform.rotation = newRotation;// Quaternion.Lerp(transform.rotation, newRotation, 1f);
    65.                 lastRotation = newRotation;
    66.             }
    67.             //else
    68.             //{
    69.             //if (!GetComponent<TrackedPoseDriver>().enabled)
    70.             //GetComponent<TrackedPoseDriver>().enabled = true;
    71.             //}
    72.         }
    73.     }
    74. }
    75.  
     
  7. o-aragones

    o-aragones

    Joined:
    Oct 16, 2013
    Posts:
    10
    Sorry i don't know if the bug number is this one : 1268878

    Please can you tell us what we can do?

    Thanks in advance.
     
    Last edited: Sep 7, 2020
  8. o-aragones

    o-aragones

    Joined:
    Oct 16, 2013
    Posts:
    10
    Hello any kind of idea or solution?
    We need to try our application on production...
     
  9. keveleigh

    keveleigh

    Official Microsoft Employee

    Joined:
    Jun 19, 2015
    Posts:
    26
    Late follow-up, but this sounds like a bug that has been fixed for a while now, if you're able to update your Unity and Windows XR Plugin versions to the latest.
     
    o-aragones likes this.
  10. o-aragones

    o-aragones

    Joined:
    Oct 16, 2013
    Posts:
    10
    Hello,
    Thanks for your answer! your right... this issue / bug has been fixed.
    Best,
     
unityunity