Hello,
I decided to work a little more in Tilevania project so I added ability to shoot. But I have problem with one animation.
I modified player sprite and added one where player run and have raised arm to shoot. When player presses Fire1 button, animator sets Firing bool to true (and bullet is instantiated). When player lets go of Fire1 (GetButtonUp) Firing bool is set to false.
Everything works except when running.
Player correctly transitions into running firing animation and when player lets go of the button animation goes back to regular running animation. But the problem is - after transition both animations start from frame 0.
If player was on frame 3 in run animation, he will transition to frame 1 in shooting running animation. Or - what’s worse - when player spams fire button, animation will practicaly always stay on frame 1 (because animator is transitioning betwen normal run and shooting run animation and stays on frame 1 on both of them because animation does not have time to play properly).
I don’t know if I explained it correctly but what I would like to know is: is there a way to not reset animation frame after transition? If “Player Run” is on frame 3, then when transition is triggered (without any exit time, like in the tutorial) the target animation will start FROM same frame? And not from the beginning?
Make transition remember frame and set target animation to same frame?
Or is there another way to do this?