Hi, does anyone know if you can switch from normal controllers to hand tracking at runtime? if so, any clues where i should look?
I’ve been testing with featuresManager.enableFeature and disableFeature but only managed to make the oculus hang.
Adding @RaananW
Hey!
This will be done automatically for you. Assuming you are using a quest, if you enter a scene with controllers and lay them down to start using hands (and the hand feature is turned on) the controllers will be disposed and the hand will be shown. Pick up the controllers again, and the hands will be gone and new controllers will be initialized. What you can’t do (as it is session-related) is to disable the hands xr feature during a session (i.e. - force a user to use controllers instead of hands).
Hi RaananW and Deltakosh, thank you both very much for the quick response! I’m going to have to buy you some beers!
Regarding what you tell me RanaanW, I understand that it is like that and it works perfectly as you say.
What I want to achieve is to have a series of objects on a table and when I press a button using the controller, I see the hands and I can manipulate the objects just like in the playground that you gave me last week. Once I manage to put something together with those objects, I should be able to choose to use the controllers again to continue with other tasks.
I understand that when loading the session, the two forms of interaction are available and the change is automatic when taking the controllers, I only imagined a way so that the user can easily choose and understand that he can go from one mode to the other without having to discover it himself same. I’m afraid some users may never realize that they can stop using their hands and go back to the controllers
Here is an example (Hand tracking sample) I have reached the point of having some objects that are not pickable unless you touch on the small cube and they turn green, this makes it possible to interact with the rest of the objects. On pc and phones it works fine but when I test on Oculus what I do is allow to manipulate the objects with my hands or with the beams of the controllers but I would like that when I click on the small green cube again to have inactive objects and that they cannot be manipulated with the hands. Now I did it by removing the physics of the objects when the small cube is off so the hands can no longer interact with the other objects. I was looking for a way to remove the hands and go back to the normal mode of the controllers when the user turns off the small cube. I don’t know if I explained well, English is not my mother tongue.
Thank you very much for any suggestions.
One can never have enough of that!
I understand what you are asking. There is no way of disabling a requested feature once enabled in the session. i.e. - if hands support is enabled, every time the user will waves his hands, the hands support will trigger in. Babylon (or better yet - webxr) will now not even know that there are other controllers. the system doesn’t tell us - there is this and that, use what you want. We are just reacting to the system’s craziness
What you can do is tell the user - hey, pick up your controllers to do that. or, if controllers are recommended, don’t enable the hands support altogether.
I understand, thank you very much for the explanation !!