Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store previous relative transforms in XRHandModifier3D #91335

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

devloglogan
Copy link
Contributor

This change makes it so that XRHandModifier3D stores the transforms of each joint on every full execution of the _process_modification() function. These transforms can then be applied if XRHandTracker::get_has_tracking_data() returns false.

After recent updates I was bumping into issues on Quest 2 / Pro where, on opening the system menu, the hand models would jarringly snap back to a resting position. With this PR, the hands will instead remain frozen in position.

@devloglogan devloglogan requested a review from a team as a code owner April 29, 2024 21:09
@dsnopek dsnopek added this to the 4.x milestone Apr 29, 2024
@dsnopek dsnopek modified the milestones: 4.x, 4.3 Apr 29, 2024
@dsnopek dsnopek requested a review from a team April 29, 2024 21:14
scene/3d/xr_hand_modifier_3d.cpp Outdated Show resolved Hide resolved
@devloglogan devloglogan force-pushed the xr-hand-modifier-update branch from 06ef680 to a35196b Compare April 30, 2024 14:00
Copy link
Contributor

@dsnopek dsnopek left a comment

Choose a reason for hiding this comment

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

Thanks!

In my testing, this works perfectly, fixing the regression. (I tested with the 'godot_openxr_vendors' demo on Quest 3.)

The code looks good too! The one thing I wonder is if we should have an option to turn off this behavior or a way clear the previous data? Although, I can't fully picture the use-cases for that now, so I don't think we should hold up the PR on that.

@akien-mga akien-mga merged commit ec73f56 into godotengine:master Apr 30, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

5 participants