- Modificato
SetSkin and Mesh Animation
When changing skins at runtime, on a running animation, the skeleton seems to reset for a fraction of a second (?). Here is a gif:
This does not happen if switching in LateUpdate. just in Update.
This happens with different animations, but does not happen if there is no animation running
The code is simply:
if (Input.GetButtonDown(actionButton))
skeletonAnimation.Skeleton.SetSkin("OpenMouth");
if (Input.GetButtonUp(actionButton))
skeletonAnimation.Skeleton.SetSkin("Normal");
Thank you for your time!
Does this also happen if you call these lines after the SetSkin()
call?
skeletonAnimation.Skeleton.SetSlotsToSetupPose();
skeletonAnimation.AnimationState.Apply(skeletonAnimation.Skeleton);
That fixes it too!
I will keep those lines when updating skins during mesh animations.
Thanks again for your time.