#How do I animate a Sprite3d?
1 messages · Page 1 of 1 (latest)
Link to aforementioned tutorial, by the way: https://www.youtube.com/watch?v=G0ZWNtx5_Xc&list=PLY1jY0hbmKxAya3z6YBuQ3gGNB6Sg137r&index=2
Tutorial series on how to make game like Pokémon in Godot. I'll go over adding walking animations and also being able to turn in the same spot.
Part 3: https://youtu.be/wkNvqmAvtpo
Project Files: https://github.com/arkeve/Godot-Pokemon
Twitter: https://twitter.com/ArkeveGames
Fixing small bug: (0:00)
Adding AnimationPlayer: (0:28)
Adding An...
what does your AnimationTree looks like?
Like this?
If there are other ways to animate it, I'm open to suggestions.
the string should match the state name exactly
I copied it from the Inspector, but I'll see if changing it works.
the inspector will make it TitleCase
I think this is what matters
you can use Blend3 for idle-walk-run logic.
is a bit more advanced
but is cleaner
but I think it needs to be a different tree type
Changing to lowercase removed the errors, but the animation still doesn't play.
click the connections and check the inspector
change mode to enabled
do you have many more animations?
Yes, but only three are available so far.
Done.
is it working now?
it might be because your are calling travel every frame
I suggest you create a StateMachine to check the current state before changing the animation
or even a variable to store the current animation
you can create a funtion to simplify your code
var _current_anim:String
func play_animation(anim:String):
if _current_anim != anim:
anim_tree.travel(anim)
_current_anim = anim