Add a way to animate armor models in HumanoidArmorLayer #1541
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.
Hello again!
I have a custom armor model that I'm rendering via
HumanoidArmorLayer
, as it should be. The armor model has some extra bits that I would like to animate to sway, similar to how the player's arms do. There's one small issue though:HumanoidArmorLayer
doesn't callsetupAnim
orprepareMobModel
anywhere, making it impossible to do so. I don't really want to handle this through a custom layer as everything else works perfectly, so I drafted up this PR to fix my issue.This PR adds a new method to
IClientItemExtensions
that allows for calling animation methods in the armor model if desired. This is called right before the model is rendered, meaning you can manipulate parts of the model (moving or rotating) as you so desire.Please let me know if anything needs changing or if my documentation needs updating. I'll fix it as soon as I can. Thanks for looking over this!