Search Unity

Question Switching between hand tracking and controller and using both at the same time

Discussion in 'VR' started by nima8, Feb 15, 2021.

  1. nima8

    nima8

    Joined:
    Nov 28, 2019
    Posts:
    10
    Hi,
    I have two questions if anyone can help I would really appreciate it.
    1- Is there a way two switches between hand tracking and controller using C# script in Unity at run time, right now it seems to me that the only way to switch between the tracking mode is to go to OVRCameraRig ->Hand Tracking Support -> Set the tracking mode ~ I wanna know how can I do this using script.

    2- Is there a way to use hand tracking and controller tracking at the same time? (Like left-hand uses controller and right-hand uses hand tracking) Right now even if I set the tracking mode to both hand tracking and controller tracking, they can not work at the same time, only one of the tracking option can work at the time.

    Thank you.
     
  2. Eddi_7

    Eddi_7

    Joined:
    Nov 19, 2018
    Posts:
    4
    I have the same problem :(
     
  3. PincerGame

    PincerGame

    Joined:
    Aug 7, 2018
    Posts:
    16
    Hello @nima8, first of all, tracking happens at Initialization stage of your oculus environment detection. This means, it only requires you to track your environment before you start an app. What I would suggest you to do, prompt the user to switch the tracking mode to hand mode and reload you scene or app. Sometimes, it is quite difficult to change it during the runtime due to user experience capacity.
    Another suggestion is when you put down your controller, Oculus will automatically detect you hands if your hand mode is enabled on your Oculus settings. So, I do think if there is an auto detection mode in OVR camera rig Hand detection unless you initialize it at the beginning of you scene load.

    For you second question, the answer is no, it is either you use you hands or controller. Both can't work at the same time.
     
  4. Eddi_7

    Eddi_7

    Joined:
    Nov 19, 2018
    Posts:
    4
    I think I found a solution!
     

    Attached Files:

    TaartGamingPG, glenneroo and nima8 like this.
  5. nima8

    nima8

    Joined:
    Nov 28, 2019
    Posts:
    10
    Yes's that works for switching between hand I end up with the exact same solution as you as well
     
    Last edited: Jul 29, 2022
  6. nima8

    nima8

    Joined:
    Nov 28, 2019
    Posts:
    10
    Thank you for reply, in the end I end up with a solution that involves disabling the hands gameobjects in order to switch between tracking more @Eddi_7 has posted it.

    It's really shame that we can not have controller tracking and hand tracking at the same time, I think that would open up really interesting options.
     
  7. menguzar

    menguzar

    Joined:
    Jan 31, 2022
    Posts:
    10
    Hi all,
    Is the situation still the same? I'd reaaaallly love to use a controller in one hand and hand tracking in the other :)