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

Fix node constraint posing and initialization order #80

Merged
merged 1 commit into from
Oct 13, 2023

Conversation

aaronfranke
Copy link
Contributor

This PR has 2 fixes:

  • Fix node constraint posing. I did not realize Godot's skeleton pose did not apply on top of rest, and I ran into incorrect behavior once I tried using a rotation constraint on my taur, a non-trivial case which requires posing bones with rotations that do not start out aligned with the constraint's source. See the below video.
  • Fix initialization order, so that we are only adding the node to the tree after the nodes have been generated (_import_post) instead of after the GLTF data has been parsed (_import_post_parse). This fix is required in Godot 4.2 after GLTF: Improve logic for keeping track of the real root node godotengine/godot#80272, but it still works in Godot 4.1.

I have tested this with my taur model in this VRM project on Godot 4.1.1 and a build of the Godot master branch (from after 4.2 beta 1).

pose.webm

Copy link
Member

@lyuma lyuma left a comment

Choose a reason for hiding this comment

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

Looks great!

@lyuma lyuma merged commit d19a03a into V-Sekai:master Oct 13, 2023
@aaronfranke aaronfranke deleted the node-constraint-pose branch October 13, 2023 22:52
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.

2 participants