Godot Third Person Control - Animation Blend

preview_player
Показать описание
In this video, I use an AnimationTree to blend the 3D character's animations according to the player movement. The whole animation system consists of "aiming" state with 8 directional strafing, "not aiming" state having blend among idle walk run animations, and a OneShot roll animation which overrides all the animations. The "aiming" and "not aiming" states also have smooth transition between them.

I'm going to make more of these project related videos on my channel. Subscribe and follow me for my upcoming videos.

Timestamps:
Intro: (0:00)
Design: (0:10)
AnimationPlayer: (1:27)
AnimationTree - Strafing/BlendSpace2D: (1:55)
AnimationTree - Free Movement/Blend3: (3:55)
AnimationTree - Roll/OneShot: (5:00)
Code - Aiming/Strafing: (5:40)
Code - Not Aiming/Free Movement: (9:30)
UI - HUD: (10:26)
End: (10:50)
Рекомендации по теме
Комментарии
Автор

Quick tip for when setting up the BlendSpace2D at 2:37 ...
You can set the diagonal node positions to 0.707107, 0.707107 (aka Vector2.RIGHT.rotated(PI / 4).normalized()) and then normalize the input values. That way the diagonals are more accurate.

I have it using the velocity of the character normalized. I find that putting the diagonal nodes in a normalized spot leads to better blending results.

TranquilMarmot
Автор

For anybody trying to make this in Godot 4, when using set() on a transition node, it's not $AnimationTree.set("parameters/aim_transition/current", 0), but rather $AnimationTree.set("parameters/aim_transition/transition_request", "aiming")

sw
Автор

Your video continues to help. Had a problem with the Blendspace2D, your video helped me solve it, thank you mate!

sturgiz
Автор

This is one of the best tutorial series ive come across. You explain everything and it makes a beginner like me easily understand how this godot system works

nathaos
Автор

This series is especially great for people who know other game engines and basics of godot to translate their skills to godot. Very concise explanations, doesn't waste anytime and gives you the information you need. Thanks for the great videos!

mirageowl
Автор

Man, you're great, amazingly great!

marvegomes
Автор

Thanks so much! This was just the tutorial I needed.

PaladinHD
Автор

Cannot thank you enough for this video! It really helped me understand how to use BlendSpace2D. I was trying to do crazy stuff with IK to get the legs turning correctly and was getting nowhere, this makes a lot more sense 😅

TranquilMarmot
Автор

God damn! Hell yeah! MORE of this kinda content.

Hemoplaguer
Автор

Super helpful, still works in Godot 4! Thank you!

travh_
Автор

Thanks, I had to learn how to use Transition, this was useful, settings hidden in the AnimationNodeTransition's inspector...

JebacPresretac
Автор

Nice work bro you made my work very simple

nagavarmanr
Автор

Awesome stuff, thanks for the great tutorial

Calbop
Автор

hey johnny these videos are pure gold, godot can only go from strength to strength as more people learn to do code game mechanics like this! Also am i the only one who loves the in-editor XYZ gizmo that looks exactly like blender :)

warrenbuitendag
Автор

Ah man this is fantastic, thank you so much for this gold!

nincompoop
Автор

Amazing tutorial series, only issue is at 1:31 where you say "save all the individual animations". Not quite sure how you did that. Been googling around for the right way to do that, I'll figure it out eventually. EDIT: aha! For anyone else, here's how to save the animation:

double click your model's .glb file, click "open anyway", click the AnimationPlayer, select the animation. Click on the button labeled "Animation" next to the drop down that selects the animation and click "Save As".

barrynevio
Автор

in case anyone is looking for solution why it's not working for GODOT 4
here you can implement
//
if
Anim_tree.set("parameters/Aim_Anim/transition_request", "Aiming")
else :
Anim_tree.set("parameters/Aim_Anim/transition_request", "Not_Aiming")
//

abhishek-farswan
Автор

thank you very much your tutorial is very helpful

bisquestudio
Автор

A very helpful tutorial with lots of good information. I am stuck on the blend 3 for idle walk run, idle to walk blends fine but for some reason walk to run and run to walk cause my player to dance. I make all my own assets but find myself stumped on making the animations work well in the blendtree. would be nice to see you do a video talking briefly on making the walk run cycles.

ArtER
Автор

I began to follow this tutorial until the part of Blend3 node, I used a character without aiming animation and when I put the script for choose animation their not changing, the player no has aiming animation, any idea about happens?

jotasantos