Search Unity

Question Controller Rotation Not Quite Right

Discussion in 'XR Interaction Toolkit and Input' started by senih1999, Aug 18, 2021.

  1. senih1999

    senih1999

    Joined:
    Dec 7, 2020
    Posts:
    2
    Hey, I keep running into this one problem. I have made and remade XR rigs multiple times because of this issue. The engine seems to think my controllers always have a 90 offset upward on the x axis. At first I thought this was because of the rotation of my hand model, however I tried with no model attached, and the ray still points up when I have my hands straight forward in front of me, no matter what. I'm sure I messed up a setting somewhere or something, but this is getting frustrating. Here's a screenshot.




    upload_2021-8-18_17-14-30.png

    upload_2021-8-18_17-14-52.png

    upload_2021-8-18_17-15-4.png

    upload_2021-8-18_17-15-16.png

    My system:
    i7 6700k
    16 gb Ram
    RTX 2080
    Oculus Quest 2 through airlink
     
  2. Matt_D_work

    Matt_D_work

    Unity Technologies

    Joined:
    Nov 30, 2016
    Posts:
    202
    ok, so what I think is happening is that the XR Controller is using the "device" pose of the controller at the left hand. the "device" pose is usually intended to be the "grip" pose, which is orientated for holding items, not the "pointer" pose which is intended for pointing at things.

    I would swap over to the Action based XR Rig, where its more explicit on which pose information you wish to use to drive the orientation of the hand node in this case. or you can use a pose provider with your existing configuration to change which pose data is being used.
     
  3. senih1999

    senih1999

    Joined:
    Dec 7, 2020
    Posts:
    2
    Hey that sounds really helpful, but I think I found the problem myself some time ago. Sorry that i didn't mark this resolved.

    The problem was I was using Open XR(VR?) plugin, and not the Oculus plugin in the XR Plugin Manager. I think maybe Open VR thinks I'm using a generic controller. This is probably backed up by the fact that the debug script I got from one of Valem's tuts could not find and assign the correct controller. It kept saying it didn't know which controller I was using. When I switched to Oculus plugin everything worked perfectly with that script as well.
     
    aivo likes this.