• Godot Help
  • problem setting track key values from code

i have 2 position keyframes and i want to set them in code
i dont understand what to type in track_id and key

8 days later

if any future peoples also having the same issue here is how i did it

#track_set_key_value(track_id,key,value)
#track_find_key(track_id,time)

#finds_track_idx
var animation=$AnimationPlayer.get_animation("walk_right")
var x=animation.find_track("right_walk_sprite_sheet:position")
print(x)

#finds_key
var animation=$AnimationPlayer.get_animation("walk_right")
var x=animation.track_find_key(1,1.4)
print(x)