Apparently you don't need to add in every frame? After setting up the AnimatedSprite2D, it looks like you only need to add the first and last frames in the AnimationPlayer's "frame" track, and then set the track's Update Mode (the line on the right-hand side of the track, underneath the time) to "continuous." Once you've done that, it will just interpolate between the first and last frames, meaning it will go through the frames of the animation you set up in the AnimatedSprite2D.
Is there a way to just play the animation instead of setting up the frames? I guess you could add script with a custom property that you control in the animator. Bit of a pain though, wish this was built-in
Wondering how would you scale this setup to many characters. Let's say I have 20 characters and each has their sprite sheet. Do you manually create 20 scenes, each scene has the exact setup? Or can they share the AnimationPlayer in a smart way?
you only need 1 scene for the player, you can easily switch out sprite sheets in many different ways. or load up all the animations into a few different nodes, etc. there are many ways to solve the problem you have
Great so far but i have encountered an issue where my character moves correctly however the animations are stuck on walk and idle forward, they never switch to the other directions when moving in those directions. I am familiar with blendspaces and state machine trees coming from an Unreal and Unity background where they are very similar, however in those engines its pretty much automatic for the animations to work, you dont need to script the animations to fire. I jumped into godot thinking it would be quicker and easier than those engines but as far as animations for movement and troubleshooting problems it sadly has not been the case.
Hey Omar, idk if you've ever run into this problem before, but animation player acts strange. For example, I create a new animation dash and it won't play in game. It also won't play on the track either. However, the name will show but it will play idle animation. Do you know how to get around this? Or is this some bug? $AnimatedSprite2D works fine. And oh, I notice the animationplayer only plays the animation if I had clicked an animationsprite2d animation on the dialog. And it will only play that nothing else.
wait so am currently using only animatedPlayer2d and i have a (idle, jump, run, hit, fall) when i am doing nothing it idles, when am jumping it jumps when am not it falls, when i run it runs, but when i get hit it overrides with idle or run since there is no priority in it. and also if there is a way to contact you ill be more than happy to do so ❤
I think you could slow down a bit. You move your mouse all over the place and are a bit erratic. I know lots of other hyperactive people probably just love you, but I think for your target audience who is people very new to godot, you are probably moving fast and not being as verbose as needed to fully explain everything like a teacher would in a classroom setting.
yeah, ive gotten this complaint a few times, my only concern is that watch time will be lower with a much longer video than needed. you can also set the video to x0.75 or smt, but regardless i do agree, that i talk fast a lot of the time lol. Ill do my best to talk slower in the future!
@CodingQuests yeah you'll have people that want it both ways, and for intermediate subjects going faster is fine. But slowing down videos sounds terrible
Just what I needed! Thank you!
I was procrastinating on watching a video afraid I'd have to redo all my sprite frames after setting up the AniSprite2D. Thanks man, huge timesaver!
You are a godsend my brother, great job!
This saved me after wasting 2 days in trying combine sprite sheets. Thank you so much
Apparently you don't need to add in every frame? After setting up the AnimatedSprite2D, it looks like you only need to add the first and last frames in the AnimationPlayer's "frame" track, and then set the track's Update Mode (the line on the right-hand side of the track, underneath the time) to "continuous." Once you've done that, it will just interpolate between the first and last frames, meaning it will go through the frames of the animation you set up in the AnimatedSprite2D.
this helped! thanks!
Thank you!! This was a fantastic tip
This really saved me a lot of time and a bunch of extra work! I really appreciate you taking the time to make this tutorial. Thank you!
Thanks :) I finally understood how to have an animationPlayer with an animatedSprite2D, wow it's great :D
I was literally needing this. thanks
Thank you so much - this was exactly what I was looking for.
Is there a way to just play the animation instead of setting up the frames? I guess you could add script with a custom property that you control in the animator. Bit of a pain though, wish this was built-in
Wondering how would you scale this setup to many characters.
Let's say I have 20 characters and each has their sprite sheet. Do you manually create 20 scenes, each scene has the exact setup?
Or can they share the AnimationPlayer in a smart way?
you only need 1 scene for the player, you can easily switch out sprite sheets in many different ways. or load up all the animations into a few different nodes, etc. there are many ways to solve the problem you have
I've had some success with an add on called animated sprite to animation player . Search in the asset library. Then just run the script
Great so far but i have encountered an issue where my character moves correctly however the animations are stuck on walk and idle forward, they never switch to the other directions when moving in those directions. I am familiar with blendspaces and state machine trees coming from an Unreal and Unity background where they are very similar, however in those engines its pretty much automatic for the animations to work, you dont need to script the animations to fire.
I jumped into godot thinking it would be quicker and easier than those engines but as far as animations for movement and troubleshooting problems it sadly has not been the case.
Godots animation system can def use some work tbh, but I think it's current setup isn't too bad since you can have more control over it through code
Hey Omar, idk if you've ever run into this problem before, but animation player acts strange. For example, I create a new animation dash and it won't play in game. It also won't play on the track either. However, the name will show but it will play idle animation. Do you know how to get around this? Or is this some bug? $AnimatedSprite2D works fine. And oh, I notice the animationplayer only plays the animation if I had clicked an animationsprite2d animation on the dialog. And it will only play that nothing else.
I havent run into this issue before. Maybe if you share a bit more detail in my discord, someone can help.
@@CodingQuests ty
@@CodingQuests I figured it out. I didn't create the character as a scene. AnimationPlayer is working fine now!
I know this is late but I have an error that runs whenever I attack an object. Invalid call. Nonexistent function 'getparent' in base 'Area2D'.
Never mind, all I missed was an underscore. Great tutorial, thank you.
Whats the point of using animation player and tree node why cant we just use animatedsprite2d and play animation when we want in the script
try animating ur player without it, and eventually youll see why : )
wait so am currently using only animatedPlayer2d and i have a (idle, jump, run, hit, fall) when i am doing nothing it idles, when am jumping it jumps when am not it falls, when i run it runs, but when i get hit it overrides with idle or run since there is no priority in it. and also if there is a way to contact you ill be more than happy to do so ❤
join discord : )
@@CodingQuests alright man
I think you could slow down a bit. You move your mouse all over the place and are a bit erratic. I know lots of other hyperactive people probably just love you, but I think for your target audience who is people very new to godot, you are probably moving fast and not being as verbose as needed to fully explain everything like a teacher would in a classroom setting.
yeah, ive gotten this complaint a few times, my only concern is that watch time will be lower with a much longer video than needed. you can also set the video to x0.75 or smt, but regardless i do agree, that i talk fast a lot of the time lol. Ill do my best to talk slower in the future!
@CodingQuests yeah you'll have people that want it both ways, and for intermediate subjects going faster is fine. But slowing down videos sounds terrible
@@JasonEllingsworth yeah i understand that. Its def hard finding the sweet spot from my perspective