Skip to content

input: use XR_EXT_hand_tracking_data_source for skeletal tracking level#338

Open
ImSapphire wants to merge 2 commits into
Supreeeme:mainfrom
ImSapphire:hand-tracking-data-source
Open

input: use XR_EXT_hand_tracking_data_source for skeletal tracking level#338
ImSapphire wants to merge 2 commits into
Supreeeme:mainfrom
ImSapphire:hand-tracking-data-source

Conversation

@ImSapphire

Copy link
Copy Markdown
Contributor

No description provided.

@ImSapphire
ImSapphire force-pushed the hand-tracking-data-source branch from f2827d0 to 371a497 Compare April 11, 2026 19:51
@SpookySkeletons

Copy link
Copy Markdown
Contributor

This fixes the hack checking of index knuckles profile for determining if handtrack should be full or partial. Allows for Mercury handtrack with synthetic valve index hand poses if enabled in the steamvr_lh driver while monado handles reporting which one is active.

@Supreeeme Supreeeme left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use some tests 👀

Comment thread src/input/devices.rs
hand_tracker: Option<xr::HandTracker>,
skeleton_cache: Mutex<HashMap<u64, Option<xr::HandJointLocations>>>,
skeleton_cache:
Mutex<HashMap<u64, Option<(xr::HandJointLocations, xr::HandTrackingDataSourceEXT)>>>,

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a busy type name. I think it'd be worth the clarity to create a dedicated struct instead of the tuple.

Comment thread src/input/devices.rs
time: xr::Time,
) -> xr::Result<Option<(xr::HandJointLocations, xr::HandTrackingDataSourceEXT)>> {
let ext = base.instance().exts().ext_hand_tracking.unwrap();
unsafe {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer if the actual unsafe portions were the only parts marked with unsafe (within reason)

Comment thread src/input/devices.rs
Comment on lines +211 to +212
let r =
(ext.locate_hand_joints)(tracker.as_raw(), &locate_info, &mut location_info);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this is using the raw version directly because of the source state addon. That could use a comment considering there is a safe version of locate_hand_joints.

Comment thread src/input/devices.rs
.unwrap_or_default();
skeleton_cache.insert(base.as_raw().into_raw(), joints);
joints
fn get_joints_with_data_source(

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't really need to be a nested function imo, makes it a bit hard to read.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants