Skip to content

feat(hands): report each hand's last pinch as engagement (ADR-034 Amendment 6) - #4

Draft
dfattal wants to merge 2 commits into
feat/hands-rolefrom
feat/hands-engagement
Draft

dfattal wants to merge 2 commits into
feat/hands-rolefrom
feat/hands-engagement

Conversation

@dfattal

@dfattal dfattal commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Stacked on #3. Provider side of runtime PR DisplayXR/displayxr-runtime#2460 (the controller role follows the engaged device).

  • With CONTROLLERS=1, fills the new optional get_engaged_ns(inst, hand) slot with the last time that hand pinched (ot_monotonic_ns, the runtime's os_monotonic_get_ns clock on every platform).
  • Each call counts as demand: the runtime polls it while it resolves roles for a live app, including when the keyboard/mouse holds the role, so the camera stays open to see the pinch that takes the role back.
  • CONTROLLERS=0 (the default) never engages: hand joints only, no controller pair.
  • On an older runtime the slot is past its struct_size and is never called: behaviour unchanged.
  • include/xrt regenerated from runtime 43264c33f (#2460's head); ABI check passes; the headers job is pinned there. Repin to main once #2460 merges (do not merge this before).

Local: 29/29 ctest. Live test (pinch takes the role, mouse takes it back) pending a runtime build of #2460.

🤖 Generated with Claude Code

dfattal and others added 2 commits October 29, 2026 01:16
…ndment 6)

With CONTROLLERS=1 the provider now fills the runtime's get_engaged_ns slot: the last time each
hand pinched. On a runtime that has the slot, a controller role goes to the hands when a hand
pinches and back to the keyboard and mouse when they are used, instead of the hands holding the
roles whenever a camera is present. Each call is demand, so the camera stays open while an app
resolves roles and can see the pinch that takes a role back. Hand joints alone (CONTROLLERS=0)
never engage.

include/xrt regenerated from the runtime's feat/input-engagement (runtime PR #2460, 43264c33f);
the headers job is pinned there until that PR merges and the pin moves to main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Live, a hand that entered the camera's view resting (thumb near the index, under PINCH_ON_MM) took
the left controller role from the keyboard with nobody pinching. Engagement now needs the pinch to
start on a hand already tracked open, and lasts while that pinch is held; losing the hand resets it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant