Search Unity

2017.1 + SteamVR + Oculus Touch = Wonky?

Discussion in 'AR/VR (XR) Discussion' started by xBrockSamson, Aug 20, 2017.

  1. xBrockSamson

    xBrockSamson

    Joined:
    Jul 21, 2013
    Posts:
    10
    I'm trying to use the combination of Unity 2017.1, SteamVR, and Oculus Touch to set up a basic hello world scene. Some of it works but other things are just... odd... and I'm not sure of the best way to handle it.
    • [Scale] With the [CameraRig] at 1,1,1 scale I appear to be about 3x size in-game and tower over a 205mm reference door frame. I need to change the scale of the [CameraRig] to 0.33-0.36 to have my game position match my real position (where standing up is about eye height and laying on the floor is near the ground). Why isn't 1x scale doing this? Are there other settings to adjust somewhere?
    • [Position] Positioning the [CameraRig] at 0,0,0 results in my real-life standing eye height starting the in-game eye height at ground level. This seems to be the issue noted here (https://forum.unity3d.com/threads/stock-unity-hmd-tracking-y-offset-different-oculus-vs-vive.451977) and my solution so far is to raise the [CameraRig] up to eye height relative to the parent player object. The problem of course is players of different height and I need a way to know how far down their real ground level is so I can scale and translate the real motion to game motion (that 0.33-0.36 scale value above). Is there documentation or other information on where these reference values can be found via game code?
    • [Motion/Rotation] Rotation of the in-game view is exaggerated and twisted compared to my real life HMD orientation.Turning my head left by 30-40 degrees in real life results in the in-game view rotating 90 degrees left. Tilting (pitch) works fine if I'm facing forwards but if I pitch up or down while also having my head rotated then the exaggerated in-game rotation is not only increased but it also starts to roll! A real life 30-40 degrees left and 45 degrees down (but no roll) results in my in-game view being 180 degrees left and 90 degrees of roll to the right (as if I'm looking backwards while laying on my right side). If I turn around 180 degrees in real life then the "phantom roll" is so exaggerated that my real life pitch motions are actually inverted in game (looking up causes my in-game view to look down, and vice versa, even though the camera is still correctly vertical)! It's like there is some axis collision artifact going on similar to gimbal lock where 180 degrees of real life yaw results in 360 degrees of yaw and 180 degrees of roll in the game. Has anyone experienced anything like this or know of a solution? I don't really want any acceleration or anything I just want the HMD to track 1:1 with real life.
    • [Controllers] They are not visible in-game and the only info I can find is about that update poses script which is deprecated and can no longer be added to an object. I know the controllers are tracking though because they create holds in the proximity grid if I get too close to the edge of my play area. I'm following this here (http://answers.unity3d.com/questions/1375026/no-controllers-using-the-latest-steamvr-with-20171.html) but it's been a while and I haven't found any other solution or information that isn't out-of-date.
    Does anyone have information or insight to any of these things? Am I missing something or is this combination of Unity, SteamVR, and Oculus just not functional yet?
     
    Alzaro likes this.
  2. Alzaro

    Alzaro

    Joined:
    Jun 26, 2017
    Posts:
    1
    I am having the exact same issues with Unity 2017.1.0 + SteamVR + Oculus. Hopefully we get some answers/solutions soon!

    Edit:
    I tried the same setup with Unity 5.6.2f1 and the issues are still present. Maybe some odd issue with SteamVR?
     
  3. RSH1

    RSH1

    Joined:
    Jul 9, 2012
    Posts:
    256
  4. pan-master

    pan-master

    Joined:
    Nov 11, 2013
    Posts:
    127
    steam VR and touch haha:) the s..t is unusable
     
  5. Scabbage

    Scabbage

    Joined:
    Dec 11, 2014
    Posts:
    268
    Well I would expect that to be the case...

    SteamVR has always been glitchy for me. Even in SteamVR Home it has random spasms and derpy UI bugs. I just use the Oculus SDK because it's way smoother to use.
     
  6. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,980
    we use oculus sdk, oculus avatar sdk and VRTK and everything is fine, I suggest you try this combination of middleware.
     
    ProTT_VR likes this.
  7. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    668
    Are all those things you mentioned happen for Vive and Oculus, or just Vive?

    For scale issues have you checked the camera component in the "eyes" to if anything weird going on?

    As for the position, sounds like it is set to "SeatedPose". Be sure your setup is set to room scale under steam settings.
    Code (CSharp):
    1.  void ResetToSeatedPose(SteamVR_Render _steamRend)
    2.     {
    3.         _steamRend.trackingSpace = Valve.VR.ETrackingUniverseOrigin.TrackingUniverseSeated;
    4.         Valve.VR.OpenVR.System.ResetSeatedZeroPose();    
    5.     }
    6.     void ResetToStandingPose(SteamVR_Render _steamRend)
    7.     {
    8.         _steamRend.trackingSpace = Valve.VR.ETrackingUniverseOrigin.TrackingUniverseStanding;
    9.  
    10.     }
    I am not working with Oculus yet, but Vive project I am working on (on Unity 2017) everything worked as expected simply by using the [CameraRig] prefab provided by valve. This is a project I upgraded from 5.6 and the controller problem persisted then. I don't see that I had attached any script but can't find what it is that I did to fix -I will dig through the code as soon as I have some time.

    Attached is my CameraRig. Feel free to check it out see if there are any differences, I'd import it to a clean project. Be sure to import the Valve stuff first then import this, so there wouldn't be any missing files.
     

    Attached Files:

  8. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,419
    we stopped using unity for vr and jumped to unreal. Its absolute perfect symbiosis.