I'm following this Unity Animation Rigging tutorial by TheKiwiCoder. What I have now is a rig layer containing all kinds of constraints. The tutorial instructs to add an animator to this rig layer and record animation in the Animation window.
I recorded a clip, and use code to play it.
public void Equip(Guns newgun)
{
if (weapon)
{
Destroy(weapon.gameObject);
}
weapon = newgun;
weapon.transform.parent = weapon_pivot;
weapon.transform.localPosition = Vector3.zero;
weapon.transform.localRotation = Quaternion.identity;
rigController.Play("equip_" + weapon.Name + "_pose");
}
but even though the transition appears in the animator, it still won't play. Has anyone encountered this type of issue?
By the way, if I switch up the default like this, it will play the animation, although it doesn't play correctly. So I guess it may have something to do with the configuration?
And if i add the transition, it will end up like this (with no transition play at all, even if it shows transition in the animator):
and this: