Forum Discussion
volkerku
5 years agoExplorer
Quest: check if HandTracking or Controller is active
Is there a way in Unity to check if Handtracking is active or controller?
With OVRHand.IsTracked I can check if a hand is currently tracked, but this does not tell me if handtracking is active.
Also, is there a similar command to check if teh Quest lost controller tracking (controller out of sight of quest cameras)?
With OVRHand.IsTracked I can check if a hand is currently tracked, but this does not tell me if handtracking is active.
Also, is there a similar command to check if teh Quest lost controller tracking (controller out of sight of quest cameras)?
4 Replies
- AltairEONExplorer
I encountered this problem as well since IsTracked is always true so I can't depend on it.
My solution is a bit of a hack but it solved the problem for me. Just expose the variable shown below in OVRMeshRenderer class and make use of it in your own class. This variable is true when the hand is visible (hand tracking mode) and false otherwise. OVRMeshRenderer is a component inside the OVRHands prefab which is instanced per hand.public bool shouldRender = false;//My Hacky Fix CODE private void Update() { if (_isInitialized) { //bool shouldRender = false;//Original CODE if (_dataProvider != null) { var data = _dataProvider.GetMeshRendererData(); - SirMaziusExplorer
Well im a bit late here but anyways... You can use OVRPlugin.GetHandTrackingEnabled() to check if hand tracking is enabled
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 11 months ago
- 2 years ago