Download

2D Paper Flipbook Animation State Machine Problem

Hi guys, I recently started a project and followed the official video tutorials and recently completed an animation state machine.

However my character has separate left and right animations due to holding a gun in the left hand. I adapted my state machine to fit this but have run into some problems.

I am dealing currently with 3 animations: running, jumping, and idle. My character now displays the correct animations for running and jumping left and right but I have some problems.

Firstly my character cannot return to idle, he gets stuck in the run animation upon releasing right input, or stuck in jump animation upon landing. However he will return to idle upon collision with a wall rather than the floor.

He will also return to idle from a stuck running or jump animation from a VERY quick left or right input (A or D key or controller). It is probably only a frame or two as any longer will play a repeated running animation again.

This suggests that my machine is working correctly and its an issue with the length of input. Its been driving me crazy for days now and to no avail. Any help or possible solutions would be greatly appreciated.

Here’s some pictures of my machine.

Input

unreal1.jpg

Animation State Machine 1/2

360e2ba29413aa804f648e7c3b0e5646ddc0768b.png

Animation State Machine 2/2

1b0c402755c473dd18e1010ad7ff18ed91eab2f6.jpeg

I have exactly the same state machine for right too

Event Graph 1/2

7117966fefdbb47e9eca6bcf6fcb0d97e51a1fee.jpeg

Event Graph 2/2

950cde4450ddacccca95febb62027411677ccb6b.jpeg