Why AnimationTree is failing to animate (only left works, not up, down or right)

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Nebulous

I created an AnimationTree to animate a character to go left, up, right and down. The problem is when I run it, the character is always on idle left and always runs to the left, regardless of the direction. Its as if all nodes on idle were idle left and all nodes on run are run left. How to debug or fix this? Since there is no code I can’t debug it.

I created an AnimationTree in the “Action RPG” Project on Youtube (see https://www.youtube.com/watch?v=Z9aR9IiiHT8&list=PL9FzW-m48fn2SlrW0KoLT4n5egNdX-W9a&index=6). Went through it a couple of times but still dont see why this is happening.

:bust_in_silhouette: Reply From: Nebulous

Ok another user left a comment in the video who had the same issue as my own. The following code from the video sets the animation tree with an input vector for movement:

animationTree.set(“parameters.Idle.blend_position”, input_vector)
animationTree.set(“parameters.Run.blend_position”, input_vector)

It should be replaced with this:

$AnimationTree[“parameters/Idle/blend_position”] = input_vector
$AnimationTree[“parameters/Run/blend_position”] = input_vector

Does anyone know why? The previous statements worked in the tutorial video. I am using the Windows version of Godot 3.2.1. AnimationTree is of type AnimationNodeStateMachine