AnimationTree parameter doesn't change...

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

I try to turn my 3D player’s head position based on animations so my setup looks like this:
I have a animationTree wich is child of the Player’s Skeleton. The Camera is Turned by animations from my AnimationPlayer (also child of the Skeleton node wich works well). The AnimationTree has an AnimationNodeBlendTree as Tree Root. The BlendTree’s output is connected to an Add2 node (“in” is a BlendSpace2D for my head position, “add” is a StateMachine with my movement animations and “add amount” is 1 and the filter is set to default). I’ve already tested my BendSpace2D and it worked. Let’s show you the line of _physics_process which should turn the player’s head:

anim_tree.set("Parameters/head_pos/blend_position", cursor_pos)
head_pos is my BlendTree’s name and cursor_pos was set to Vector2(1, 1) scince I haven’t written the function to turn the player’s head now.

I ran my project and looked up the current input value for my stateMachine in the editor - it was still (0,0).

NOTE:
I know where to look up the current variables and I’m sure i didn’t looked at the value before the game starts.

Bimi124 | 2021-04-18 11:47