Inside my char (KinematicBody2D), I've an AnimationPlayer and I want to get the index of a track of the animation:
The script is on the KinematicBody2D like follows:
onready var animMove = $AnimMove # This is the AnimationPlayer
var trackAnimPath = "AnimMove/Head:frame"
var startAnim = animMove.get_animation("walk_down")
var animIdx = startAnim.find_track(trackAnimPath)
print("animIdx: " + str(animIdx))
Then unfortunately to me, its returning: animIdx: -1
Please, what is the correct way to do it ?