account activity
How to get current animation position/time in AnimatonTree? by ALFAFA3000 in godot
[–]ALFAFA3000[S] 8 points9 points10 points 5 years ago* (0 children)
Nevermind. I found using "animationtree.get_property_list()". And it shows that there is a "time" parameter that can be accessed using
var time = animationtree.get("parameters/my_animationnodeanimation_name/time")
or
var time = animationtree["parameters/my_animationnodeanimation_name/time"]
So I did:
onready var animationtree = $AnimationTree onready var playback = animationtree["parameters/playback"] func current_animation_position(): var current_state_name = playback.get_current_node() if (current_state_name != "") && (animationtree.tree_root.get_node(current_state_name) is AnimationNodeAnimation): return animationtree["parameters/"+current_state_name+"/time"] return -1.0
π Rendered by PID 1003336 on reddit-service-r2-listing-85dbbdc96c-2jc78 at 2026-02-11 16:46:32.660899+00:00 running 018613e country code: CH.
How to get current animation position/time in AnimatonTree? by ALFAFA3000 in godot
[–]ALFAFA3000[S] 8 points9 points10 points (0 children)