fix: patch non-standard skeleton hierarchies #119
Merged
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.
Fixed avatar animation getting stuck on first frame with non-standard skeleton hierarchy.
Some wearable assets use a non-standard skeleton hierarchy where the Armature node and bones have numeric suffixes (e.g., Armature.001, Avatar_Head.001). This caused issues with emotes that use a mixed animation approach, where the main motion is applied to the Armature node while shorter animations are applied to individual bones to position the avatar correctly.
Previously, the animation targeting was strict and required exact node name matches, causing animations to fail when the asset used numbered suffixes. This resulted in the avatar appearing stuck on the first frame while props animated correctly.
The fix modifies the animation targeting logic to ignore numeric suffixes when matching node names. This allows the system to properly map animations regardless of whether the asset uses standard names (e.g., "Armature", "Avatar_Head") or numbered variants (e.g., "Armature.001", "Avatar_Head.001").
Key changes:
This solution ensures compatibility with both standard and non-standard asset hierarchies without requiring changes to the assets or the animation system's core approach.
Testing:
Here's an example of an emote that uses the mixed animation appraoch (dependent on a correct skeleton hierarchy) being applied to a skin with a standard skeleton hierarchy, and also applied to a skin with a non-standard hierarchy (duplicated armatures:
Armature.001
andArmature.002
.