cancel
Showing results for 
Search instead for 
Did you mean: 

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

nima.jamalian
Level 2
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.
5 REPLIES 5

DHARMAKAYA
Level 4

2 months and no answer yet???

 

Was looking for an answer to that today...how to actually get what is in "oculus home" to function in a Unity app...SHOULD be SOOOOO EASY...but the oculus integration package seems to be a mess. 

 

 

DarkTable
Level 5

1. As long as the device is set to "auto-switch between hands and controllers" and your application is set to use "Controllers and Hands," all you have to do is put the controllers down for a few seconds to switch. Check out the YouTube app for a good example of that implementation. This switch should be under the user's control and not the developer because you don't know the environment they're in so it should be up to them. If you want/need the user to switch input modes you can put up a dialog box and wait until the value of "OVRInput.GetConnectedControllers();" changes.

 

2. No. Not for current Quest devices. Controller tracking uses infrared light and hand tracking uses visible light, so the Quest's cameras need to be in different modes to track one or the other. Can't do both at the same time with current hardware.

DHARMAKAYA
Level 4

Thanks for answering and for posting that method! What var changes when it switches modes? Or is there a inputMethodChangedToHands method that I can override to add to? 

 

Thanks in advance! 

DHARMAKAYA
Level 4

PS: Have the avatar animated hand controllers functioning in the scene (although sadly the hands and controllers are pink in URP) and also added hand prefabs to the OVRPlayerController so that now BOTH function and automatically switch, HOWEVER the hands with controllers (avatar hands with controllers) sadly stay in the same place when the locomotion on OVRPlayerController is called seemingly. How to make the avatar hands follow? 

 

Thanks in advance! 

All I can say is you're going on the same voyage of discovery I went on over a year ago. All these issues are solvable, but I realized as soon as Facebook debuted the avatars in Facebook Horizon that the Oculus Avatar system's days were numbered and you'll save yourself a lot of headaches by not using it in its current state.