-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Fix XRHandModifier3D scaling #89130
Fix XRHandModifier3D scaling #89130
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, but we do need to update the class documentation to have information about these.
Especially the motion scale needs some documentation about the use case, it will always stretch the mesh in weird ways but I can see that it will have its uses.
The world scale for me is the important one which we should have in the original release. Here we should include a paragraph in the class documentation informing the user the node will set proper scaling based on world scale so they know that is expected behaviour.
Thanks! Scaling the node transform by world scale makes sense to me - that looks good, and feels like something we should probably always have been doing. I'm confused about applying the skeleton's motion scale, though, largely because I don't really understand what that property is supposed to do. It sort of sounds like it's supposed to scale the amount of movement, but that would seem to imply scaling not just the position but also the rotation? The changes in this PR basically just space the joints out more - is that really sufficient to correctly scale the amount of movement? And if the the bone update mode is set to "Rotation Only", the motion scale will not do anything at all - is that the expected behavior? |
The My guess is that it's for scaling the animation track to match the size of the skeleton. Consider some jogging animation and you want to play it on three NPCs - a dwarf, a human, and a giant. The We wouldn't want to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My guess is that it's for scaling the animation track to match the size of the skeleton. Consider some jogging animation and you want to play it on three NPCs - a dwarf, a human, and a giant. The
motion_scale
can be used to adjust the jogging animation positions to align with the size of the character.
Ah, ok, that makes sense! Using this interpretation of motion_scale
, this PR looks good to me :-)
df8758b
to
515d3d4
Compare
I believe I've captured the position and scaling information in the node documentation. Could you review? |
…tion_scale and XRServer.world_scale
515d3d4
to
2fdabd9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Thanks! |
The XRHandModifier3D scaling needs to be fixed to correctly apply the Skeleton3D.motion_scale and XRServer.world_scale - this is similar to the work in #89103.
Attempting to set XRServer.world_scale before this PR would not uniformly scale the hands with the rest of the player, but would instead only stretch the bones resulting in distorted the hands with spindly fingers:
This PR changes the scaling as follows:
The following video demonstrates the results:
XR.Hand.Scaling.mp4
There's also a test project at https://github.com/Malcolmnixon/GodotXROpenXRTracker to play with the results.