- Home /
Question by
psmith3486 · Dec 28, 2020 at 04:16 AM ·
character customizationcharacter-animation
Why does my character get stuck in T-pose?
I have this weird problem with my character controller. I allow changes to things like gender and costume by destroying the current character object and instantiating the right one. That causes the character to get stuck in a t-pose, however. I tried doing animator.rebind, but that didn't seem to work. For some reason, switching the avatar fixes the issue, but that would be a janky solution. Here's my code for reference.
animator.avatar = genderData.gender.Equals(Gender.Male) ? maleAvatar : femaleAvatar;
if (currentOutfitObject)
{
Destroy(currentOutfitObject);
}
currentOutfitObject = Instantiate(genderData.currentOutfit.currentStyle.outfit, gameObject.transform);
animator.Rebind();
Comment
Your answer
