How do I sync up animations in the animation tree using custom timeline values

Godot Version

4.5.1

Question

With the following set up how do I set the start offset of the custom timeline, so when I switch between Idle_head and turn_head_10 the Idle_animation node position in time is the same, so I get a seamless transition between the two.

This is the state machine containing two blend tree nodes Idle_head and turn_head_10.

The contents of Idle_head is a looping animation node with custom timeline turned on.

turn_head_10 is similar but with an single run add animation.

My node set up is like so. I’m using a script attached to DeathBodyCombined to manipulate the animations of several objects.

I’m using this function to switch between Idle_head and turn_head_10. It works up until line 60 and 62. I can get the state machine to play the blend tree nodes, and I can get the position of Idle_animation when the switch happens. I just can’t figure out how to find and set the start_offset parameter. I don’t even get an error response so I’m not sure whats going on.

Edit: I’ve tried using animation_tree_head.get_property_list() to print out all the locations I could try. When I try using the locations I just get null values e.g. @onready var animation_idle_node: AnimationNodeAnimation = animation_tree_head.get(‘parameters/StateMachine/Idle_head’), @onready var animation_idle_node: AnimationNodeAnimation = animation_tree_head.get(‘parameters/StateMachine/Idle_head/Idle_animation’)

You can’t access that directly and won’t work as it will start from that point when the animation loops. Try using a AnimationNodeTimeSeek in your blend tree instead.

1 Like

OMG THANK YOU Yes I see how that works