You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the hands remain visible when not active. The hand.gd script should be modified to hide the hand when inactive. Also signals should be added when the hands become hidden and visible.
The text was updated successfully, but these errors were encountered:
I think code for the signals should be on a script that is on the ARVRController itself, hand.gd can then subscribe to these signals and hide/unhide the hand mesh.
This will also allow other child nodes to react to this properly without having to embed the same logic as there are now a few steps to detecting hands (is the tracker active, if so, is it actually tracking, etc).
We could extend on that in time and have various function react as well, say a movement function is only active if it is enabled and the hand it is attached to is tracking.
The thing to prevent is to react too directly to lost tracking. For instance a player who is striking a sword may loose tracking when the controller goes out of view, and as a result drop the sword if functions become inactive.
One nice feature here is that if we're detecting the ARVRController becoming inactive, that we set a timer, if it stays inactive for more then say 5 seconds, we emit a different signal. Say we define: controller_became_active, controller_became_inactive, controller_inactive_timeout or something.
I was reviewing the Godot 4 API and it looks like the information we want is exposed by XRNode3D.get_has_tracking_data(). It's a little annoying that we have to add a script to the controller to poll for it rather than having it emitted as a signal when the tracking data state changes.
Currently the hands remain visible when not active. The hand.gd script should be modified to hide the hand when inactive. Also signals should be added when the hands become hidden and visible.
The text was updated successfully, but these errors were encountered: