- Home /
How to stop animations on different layers playing simultaneously?
I have a simple character with two kinds of attacks: a light attack that it uses while moving, and a big wind-up attack for when it's standing still.
The light attack is on a separate layer, masked so that the arms and torso can do the attack animations at the same time as the legs are walking.
The big attack uses the whole body, so it's on the main, unmasked layer.
I never want both attack animations to play at the same time, but this happens often, because the light attack is on a different layer, controlled by a different state machine.
How can I have it so that each attack animation will wait for the other to finish before playing?
The animation layers couldn't be simpler: Base Layer is just a blend tree between the idle animation and walking, that transitions into the big attack and back.
The light attack layer has an empty animation state that has no effect on the base layer, that transitions into the light attack animation. The layer is masked so as not to affect the legs.