Search Unity

No controllers while running steamVR sample scene with Samsung Odyssey

Discussion in 'AR/VR (XR) Discussion' started by Tsilliev, Jan 14, 2018.

  1. Tsilliev

    Tsilliev

    Joined:
    Jan 21, 2014
    Posts:
    35
    So I would like to fiddle around with unity and see how it goes with using a bow in the steam VR interaction sample scene, headset gets detected and I am able to look around but controllers don't appear, I did import the MR sdk and from the top menu chose to apply settings, am I missing something?
     
  2. youssef230788

    youssef230788

    Joined:
    Feb 7, 2018
    Posts:
    1
    hav the same Problem !
     
  3. Zeratul3D

    Zeratul3D

    Joined:
    Nov 11, 2015
    Posts:
    7
    Same here. Just recently SteamVR 2.0 has been released but the hand model of my controllers don't show up.

    I've checked a frame at a time and it seems that for some reasons SteamVR detects the controller as inactive and deletes the hand object, only to not spawn that again.

    The responsible of removing the hand is the Update method in RenderModel...
     
  4. Zeratul3D

    Zeratul3D

    Joined:
    Nov 11, 2015
    Posts:
    7
    After some more research I've noticed that the controllers seems inactive for a brief moment, so I've extended the original class with a graceTimer before actually deleting the hand.

    It's not a true fix but a mere workaround, waiting for Valve to fix this.

    Code (CSharp):
    1. using Valve.VR.InteractionSystem;
    2.  
    3. public class RenderModelMRTolerance : RenderModel
    4. {
    5.  
    6.     public int controllerGraceTime;
    7.  
    8.     private int currentGracedFrames;
    9.  
    10.     // Use this for initialization
    11.     void Start () {
    12.  
    13.         currentGracedFrames = 0;
    14.  
    15.     }
    16.  
    17.     protected override void Update()
    18.     {
    19.         if (handSkeleton != null && handSkeleton.isActive == false)
    20.         {
    21.             if (currentGracedFrames >= controllerGraceTime)
    22.             {
    23.                 handSkeleton.skeletonAction.RemoveOnActiveChangeListener(OnSkeletonActiveChange, handSkeleton.inputSource);
    24.                 handSkeleton.skeletonAction.AddOnActiveChangeListener(OnSkeletonActiveChange, handSkeleton.inputSource); //watch for if it gets activated later
    25.                 DestroyHand();
    26.                 currentGracedFrames = 0;
    27.             }
    28.             else
    29.                 currentGracedFrames++;
    30.          
    31.         }
    32.         else
    33.             currentGracedFrames = 0;
    34.     }
    35. }

    Please be aware that even if this shows the hand model, it's not properly animated to match the MR controller. I suppose that requires more code in some other classes.
     
  5. markjanzen88

    markjanzen88

    Joined:
    May 31, 2017
    Posts:
    68
    interesting hopefully valve can fix it soon. i noticed the same issue and would like to see the animated hand model on my MR controllers.