extends KinematicBody
var state
func _ready():
state = $"Scene Root/AnimationTree".get("parameters/playback")
state.start("death")
func _process(delta):
if Input.is_key_pressed(KEY_UP):
state.travel("walk")
else:
state.travel("death")
Someone on discord told me: if you’re using Blender for 3d animations, you have to open your character in blender, add “-loop” to the end of every animation action you want to loop (don’t add the quotation marks, though), and then re-import it into Godot. Now they’ll loop properly.
Note: you can’t just rename the animations within Godot and add -loop. And you can’t just turn on the loop button for the animation within Godot (even though it’s the intuitive thing to do). You have to rename the animations in Blender and re-import everything afaik Tedious.
I hope Godot simplifies this, as well as the whole importing from blender process because it’s tedious and also causing other unnecessary problems imo
And if you’re not using blender then… Hopefully someone else knows the answer?
That is indeed the case. Your looping animations need to have the suffix “-loop” within Blender (and probably any other content creation tool).