GodotVR / godot_openxr_vendors

Godot 4 wrapper for OpenXR vendors loaders and extensions
MIT License
83 stars 17 forks source link

Add XR_FB_hand_tracking_capsules extension wrapper #116

Closed devloglogan closed 2 months ago

devloglogan commented 3 months ago

This PR is a simplified version of my original XR_FB_hand_tracking_capsules extension wrapper (#88), just exposing the extension's capsule data in the wrapper with the following functions:

get_hand_capsule_count()
get_hand_capsule_transform(int p_hand_index, int p_capsule_index)
get_hand_capsule_height(int p_hand_index, int p_capsule_index)
get_hand_capsule_radius(int p_hand_index, int p_capsule_index)
get_hand_capsule_joint(int p_hand_index, int p_capsule_index)

This data can be used to construct capsule meshes or collision shapes when desired.

If this PR is merged, both #88 and Godot PR https://github.com/godotengine/godot/pull/89289 can be closed.

m4gr3d commented 3 months ago

If this PR is merged, both https://github.com/GodotVR/godot_openxr_vendors/pull/88 and Godot PR https://github.com/godotengine/godot/pull/89289 can be closed.

I'm curious about the decision to close https://github.com/GodotVR/godot_openxr_vendors/pull/88. I thought that PR would provide the sphere derived capsule data as mentioned in https://github.com/GodotVR/godot_openxr_vendors/pull/88#issuecomment-1979343684, while this wrapper would provide the vendor capsule data as an alternative; is that not the case?

devloglogan commented 3 months ago

I'm curious about the decision to close #88. I thought that PR would provide the sphere derived capsule data as mentioned in #88 (comment), while this wrapper would provide the vendor capsule data as an alternative; is that not the case?

The discussion around providing capsule data derived from the spheres arose because it would be a vendor neutral way of creating similar data. Users can already construct that data themselves by using functions in OpenXRInterface to get the sphere data and doing the conversions. So if we were going to add something to help with that, it would probably be some functions in OpenXRInterface/OpenXRHandTrackingExtension that would convert that data for users internally. And that would be a different PR to Godot itself, not the vendor repo, so #88 could be closed.

m4gr3d commented 2 months ago

@devloglogan Can you rebase this PR so we can merge it in!

devloglogan commented 2 months ago

Rebased!