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

Add bone update option to OpenXRHand to allow preserving original hand scale #87240

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

Malcolmnixon
Copy link
Contributor

@Malcolmnixon Malcolmnixon commented Jan 16, 2024

This pull request adds an option to OpenXRHand to select the type of bone updates to perform.
image

The supported options are:

  • Full (default) which works the same as today applying both position and rotation of the tracked hand
  • Rotation Only which only rotates the bones preserving their relative position and length

The Rotation mode is useful if the hand model is not weighted to support re-scaling to the users hands; or the hand is scaled to non-human sizes.

With "Full" the following hand model gets damaged (the fingers get pushed into the palm):
image

Switching to "Rotation Only" preserves the bone lengths - and the mesh integrity:
image

@BastiaanOlij
Copy link
Contributor

I would rename 'All' to 'Full' and 'Rotation' to 'Rotation only'.

…d scale.

This is useful if the hand model is not weighted to support re-scaling to the users hands; or the hand is scaled to non-human sizes.
@Malcolmnixon
Copy link
Contributor Author

I would rename 'All' to 'Full' and 'Rotation' to 'Rotation only'.

Done
image

@Malcolmnixon Malcolmnixon marked this pull request as ready for review January 16, 2024 05:03
@akien-mga akien-mga changed the title Add bone update option to OpenXRHand to allow preserving original han… Add bone update option to OpenXRHand to allow preserving original hand scale Jan 16, 2024
@akien-mga akien-mga requested a review from a team January 16, 2024 07:28
@akien-mga akien-mga added this to the 4.x milestone Jan 16, 2024
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.

I haven't tested it, but the code looks good to me!

@dsnopek dsnopek requested a review from a team January 16, 2024 22:53
@akien-mga akien-mga modified the milestones: 4.x, 4.3 Jan 17, 2024
@YuriSizov YuriSizov merged commit cf76f3d into godotengine:master Jan 17, 2024
15 checks passed
@YuriSizov
Copy link
Contributor

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.

6 participants