Fix humanoid avatar bone mappings in Unity (#13) #19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As mentioned/pictured in #13, Unity imports attempting to create a biped humanoid avatar when not using end up constructed incorrectly, potentially because the human description is based on the model with the clavicles attached to the neck. The jaw also appears out of place. This change reconstructs the skeleton when a human animator is selected after the clavicles have been attached to "Bip01 Spine2", and also fixes the jaw's positioning.
There is also an additional boolean which can enable the creation of a wrist bone between the hand and forearm in the hierarchy, which might be useful for projects using these models as self-avatars (something I am personally doing- thank you for the resource! 😄).
Current limitations:
It seems like the avatars must be imported twice before they are given the "avatar" component. I am not sure why this is or how to fix it at the moment, but will continue exploring how to do so.
Please let me know if there are any issues, requested changes, etc. I am new to PRs! Thank you!