GodotVR / godot_openxr

(Maintenance mode) OpenXR drivers for the Godot Game Engine v3.x
MIT License
278 stars 45 forks source link

tracking confidence always returns 0 when hand tracking #221

Open goatchurchprime opened 1 year ago

goatchurchprime commented 1 year ago

I can see the code which should be working in the Configuration object: https://github.com/GodotVR/godot_openxr/blob/master/src/gdclasses/OpenXRConfig.cpp#L276

My project prints values between 0 (bad) and 2 (good) when I pick up the controllers, but is always 0 when I am doing the hand-tracking.

It doesn't look like this feature has been used in the OpenXR demo with a hide_for_no_tracking_confidence value, so it might not have been tested.

For hand-tracking, it should be hide_for_LOW_tracking_confidence, because when the hand-tracking is low, the hand jumps all over the place and is not worth it. Making the hands disappear when they are not accurately readable is a great way to train the user to keep their mitts in the right place, ie visible in the camera and spaced apart.

mgschwan commented 1 year ago

I am using the tracking confidence from OpenXRPose, that works with hand tracking

BastiaanOlij commented 1 year ago

Is this native on Quest or with SteamVR?

For Quest when you're doing hand tracking, there are no controllers so your controllers will indeed return values of 0. The hands are tracked either through the OpenXRPose (SkeletonBase if I recall) and with controllers 2 and 3.

SteamVR sees the hands as part of the controllers holding the hands so even if you're only using hand tracking they will be recognized as controllers 0 and 1.

It's best to go through OpenXRPose however as this is consistant over both platforms.

goatchurchprime commented 1 year ago

I've just been getting this to work. You don't get to see the settings in the XRPose node such as action and path unless you look at them in the remote tab while live debugging on the Quest. There's no way to make it show up in non-VR mode (the state I do most of my development)?

It seems the only way to set one of these values in the XRPose node is to do it while it is running in the correct mode:

func _ready():
    if OS.has_feature("QUEST"):
        $FPController/Right_hand/XRPose.path = "/user/hand/right"

It cannot be preset in the Godot editor like other parameters. Is this right?