Search Unity

Bug XRGrabInteractable.trackRotation set to false blocks XRRayInteractor's anchor control rotation.

Discussion in 'XR Interaction Toolkit and Input' started by langokalla, May 3, 2021.

  1. langokalla

    langokalla

    Joined:
    Aug 4, 2020
    Posts:
    22
    How to reproduce:
    1. Jump into the World Interaction Demo scene in Unity's XR Interaction Toolkit Example project.
    2. Find a cube somewhere that has the XR Grab Interactable script attached and uncheck Track Rotation.
      1. Documentation says: "Whether this object should follow the rotation of the Interactor when selected." (and nothing about Anchor Control) https://docs.unity3d.com/Packages/c...tion_Toolkit_XRGrabInteractable_trackRotation
    3. Disable Force Grab on the XR Ray Interactor you will grab the interactable with (optional: just to make result more clear).
    4. Hit play and grab the cube with the XR Ray Interactor.
      1. The cube interactable follows the position and not the rotation of the ray as expected. Using the joystick to move the anchor position also works. However, rotating the interactable with the joystick does not work due to Track Rotation being false.

    According to the documentation, this is not the correct behavior. With Track Rotation disabled , but it should react to the anchor control rotation of the XR Ray Interactor in my opinion. That's at least how I read the documentation.

    This can also be a feature request I guess, but because of the wording in the documentation I'm tagging it as a bug.

    Unity 2020.3.6f1
    XR Interaction Toolkit 1.0.0-pre3
    Same for OpenXR and Oculus plugin, so this must be a bug in the interaction between the XR Ray Interactor and the XR Grab Interactable.
     
  2. langokalla

    langokalla

    Joined:
    Aug 4, 2020
    Posts:
    22
    By doing the exact same steps but with Track Position on the XR Grab Interactable we can observe the same behavior. Rotating the anchor works, but translating the anchor position does not work. I agree that this is a bit more different when thinking about how it should be implemented instead (like, how and where should the interactable move to if we are moving the anchor, and it does not track the position of the interactor?), but either way, my point stands on the rotation.