U5 - Problem with Death animation in Sample Assets 3rd Person Controller

I’m using Unity 5 and the Sample Asset’s (now called Standard Assets) 3rd Person Controller. Its quite a complex controller for me, using Blend Trees and whatnot. I’m trying to make a death animation. I have the animation already (in .fbx format), made the State, with new Blend Tree and there I laid the animation. Then I created an one-way transition from Grounded (the default state) to Death state, with a trigger “IsDead” conditional.

Then, in my “health” (actually a oxygen meter) script, I wrote:

private int deadHash = Animator.StringToHash("IsDead");

void Update () {
     if (currentOxygen <= 0) {
       anim.SetTrigger (deadHash);
     }

Then, when I’m testing and the oxygen gets to 0, instead of the death animation, the character freezes, and goes halfway through the ground. And stays there.
What am I missing?

ps.: I tried the same with bool condition, and SetBool (“IsDead”, isDeadOn) and SetBool (“IsDead”, true) but nothing changed.

Below is the animator and the Death state. Note that the animation ifself is set to parameter Forward. Could that be the problem?

As it turns out, the problem was in the animation itself, wich needed to have it’s Import Settings changed to “humanoid”. :roll_eyes:

1 Like