- Home /
Issue with blend tree
Hello everyone.
I'm having some big and weird issue here with a blend tree. So i'm using animator for a turret wich have many state and one of it is a blend tree for moving the canon with 0 = full in and 1 = full out. Problem is this blend tree doesn't work, I put the value to change randomly in the update and nothing happen. i can see the value changing but no move occurs. But here is the best: I have some particle effect when I want my gun to fire (some kind of warning before it fires actually) and when it's active and only that time the blend tree works! So knowing that I'm sure it is at least supposed to work but why would it not work without the particle system? I can't understand and I can only think of a bug.
I just tried to do all the animator controller with fresh animations all over again but with the same result. I don't know what to do. Someone have an idea?
Check your animator component is pointing to the right Avatar. If you have another animator controller attached (but disabled), try removing that. Failing that, some screenshots of the items might help.
Thanks for your tips.
Animator doesn't have any avatar. I don't use it for non humanoid stuff but all other animations works, only the blend tree. No other animator attached. As for screenshot I'm not sure what I should show you. I managed to "fix" my issue by always having that particle system (a grand child of the turret by the way) emitting but with 0 at $$anonymous$$ size when I don't want the effect... I would still hope for a real fix.
Answer by kubajs · Jan 26, 2021 at 11:49 AM
I know this is too late but I was facing very similr issue. Couldn't figure it for 3 hours. Make sure the animator component is present on the same game object where the mesh is located. This fixed the issue for me. Animator won't work with mesh put to any child object when the animator is in the root game object. Interesting thing was the animation was working only once with the same structure. This distracted me completely and I immediately suspected there must be something wrong with the unity beta version. I then decided to create brand new object with animator and it worked flawlessly. Comparing those 2 gameobjects it was suddenly clear the mesh must be located exactly on the same game object the animator was located. Based on what you were describing you might have been facing the same problem. BTW The behavior was identical. I saw animator properties were properly changed in blend tree (interaction worked flawlessly), Blend tree properly changed the states but the mesh wasn't animating. Also avatar doesn't need to be present to have animation working. So no worries about empty avatar.