I'm recently trying to use AnimationPlayers instead of AnimatedSprite3Ds for some more control over my characters. I'm trying to manipulate the AnimationPlayers through code now, and some things are going well, but others I cannot find any documentation for or mention of.
I want to add a "texture" keyframe for a parent Sprite3D and set it to a specific sprite sheet like this person does in this video at 6:53
I'm able to set values like
var anim = Animation.new()
var frame = anim.add_track(Animation.TYPE_VALUE)
for i in animlength:
anim.track_insert_key(frame, time, i)
player.add_animation("animname", anim)
But it's kind of worthless without being able to switch between my sprite sheets. Since the normal way of doing it has you reference the Sprite in the hierarchy and select a variable from there, I assume I need to reference my sprite somehow in add_track? Probably a different TYPE_? I'm pretty lost on the logic here. Any AnimationPlayer wisdom is appreciated. Thanks!