Hey all. I’m new to avatar masks and I’m having an issue with switching between layers. Immediately going from a layer weight of 1 to 0 is causing my player character to snap back into an idle animation.
Basically, when my player has a shotgun and is walking, I set the layer weight with the mask to 1. When the player isn’t walking, I set it back to 0.
I don’t know the appropriate way to transition smoothly between layers. Any help would be appreciated. Here’s the simple logic I’m currently using:
if(anim.GetBool("hasShotgun") && anim.GetBool("isWalking"))
{
anim.SetLayerWeight(1, 1);
}
else if(anim.GetBool("isWalking") == false)
{
anim.SetLayerWeight(1, 0);
}
Should I decrement the layer weight gradually?