Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug XRDirectInteractor stopped working after [2.0.0]

Discussion in 'XR Interaction Toolkit and Input' started by AndersLindaas, Sep 5, 2022.

  1. AndersLindaas

    AndersLindaas

    Joined:
    Nov 12, 2021
    Posts:
    2
    After upgrading to Unity 2022.1.15f1 and upgrading to the recommended version [2.0.3] grabbing stopped working for our project.

    The reason seems to be the fix where they changed from using OnTriggerExit to using OnTriggerStay to determine when a collider is not being monitored any longer.

    What seems to happen to us is that we do get a "OnTriggerEnter", but "OnTriggerStay" does not seem to consistently being called which results in the collider from being removed from the list of monitored colliders.

    Grabbing now only works when I start holding down select button while obviously outside the collider and then move my hand towards it until the interactor collides with the interactable object (in which case the collider is still in the list of monitored colliders)

    This might be a Unity 2022 issue, but regardless this strategy for monitoring colliders might not be a robust solution to solve the original problem with disabled gameObjects during grabbing.
     
  2. VRDave_Unity

    VRDave_Unity

    Unity Technologies

    Joined:
    Nov 19, 2021
    Posts:
    257
    Hey @AndersLindaas,
    DirectInteractors
    should work just fine with 2022.1.15f1 and XRI 2.0.3. You mentioned upgrading both Unity and the XRI version, do you happen to know what version of XRI you migrated from when moving to 2.0.3? I know there were some major changes from 1.0.0-pre.x to 2.0.x. Also, are you seeing the issue with the default XRI classes or with your own custom code?
     
  3. AndersLindaas

    AndersLindaas

    Joined:
    Nov 12, 2021
    Posts:
    2
    We upgraded from 2.0.0-pre.5. The easy fix for us was just rolling back to this version and then it worked again. We are using the default XRDirectInteractor class. I'm pretty sure our physics settings and so on are quite default, but I can try making a new project and see if I can reproduce when I have time.
     
  4. unity_hyTLZfC7oY2FZg

    unity_hyTLZfC7oY2FZg

    Joined:
    Nov 6, 2020
    Posts:
    6
    I ran into this issue after updating to Unity 2022.3.8f1. The fix for me was to select "Improve Accuracy With Sphere Collider" in my XRDirectInteractor. This issue only occurred after updating Unity versions.