Search Unity

HTC Vive controller randomly dissapear

Discussion in 'VR' started by RomainSepulchre, Feb 14, 2019.

  1. RomainSepulchre

    RomainSepulchre

    Joined:
    Oct 30, 2017
    Posts:
    4
    Hello,

    I'm currently debuging a VR project and one of the main bug is that in a specific scene the Vive controller randomly dissapear. The bug only happen in build and never in editor and the whole project is composed of 8 differents scenes but it only happen in this specific scene.

    When the controller dissapear i know that the tracking of the controller is still working because we use Final IK and the character 3D model still follow the users movements but the user can't use the controller buttons anymore to grab object in the scene . However the menu button still works and if i go in the menu the controller reappear and work correctly in the menu but when i return in my game the controller still show but the button are still unusable.

    I'm working in Unity 2017.3.0f3 and my steam VR Plugin version is 1.2.2.

    Does anyone ever experienced something like this ?

    My main lead is that a script in my project cause this : i have a script that destroy an object if it's thrown too far and instansiate it back in his position at the start of the scene. He is my main suspect, even though sometimes the controller dissapear before the user grab any object in the scene. I'm currently checking that option and i will keep you updated if i find the solution.

    I will also try to update my steam VR Plugin, it might be a bug that has been solved.

    Have a good day !
     
  2. RomainSepulchre

    RomainSepulchre

    Joined:
    Oct 30, 2017
    Posts:
    4
    I found the solution and forgot to update this topic.

    If anyone has the same problem, in my case it was caused by a script that was destroying object when they enter in a trigger zone. When you release the object and let it fall in the trigger zone everything is fine but when you hold the object and go in the trigger zone with the controller the script destroy the object but steam VR plugin still think you are holding an object. So you can't see the controller because when you hold an object he dissapear and you can't use it to grab another object because the game think you are already holding something.

    Obviously, the solution was to force the controller to release the object before destroying it.