I am making a 2d side scroller, and in it, I wanted the player to be able to walk while swinging their sword, the animations are all working, and most of the transitions are too, but when I transition from the walking to the swinging animations, the swing animation only happens after the character stops walking, so for example, I walk, press the attack key, nothing seemingly happens, so I stop walking, then see the animation. I think that the code for the attack to work happens, but the animation does not.
So here are a few notes to keep in mind:
I am using animation layers so that the arms and the legs can work simultaneously, and have an arm animation for walking and a leg animation that play at the same time.
The transition to the sword animation works with every other state, such as when in mid-air (which cancels the arms moving from walking) or standing idle.
The sword swing and arms moving are the only arm based animations, but5 there are some empty ones for idle and jump.
I have a transition from the walk state to an empty state for jumping, with the same settings as the one for walk to swing, but with a different trigger of course, and that works fine. Just the walk to swing is off.
When entering game mode, sometimes there will be a little error in the transposition box. I would show a picture, but I cant intentionally replicate it. It say something like “cannot play animation: needs AnimatorController” I can make it go away by clicking elsewhere then going back to the transition.
The transition settings are:
No exit time, fixed duration off, transition duration and offset both at 0.
got the error back. I’m not sure how