Realistic Legs in Godot - IK Legs Tutorial (godot 3.X)

  Рет қаралды 35,298

Leon Stansfield

2 жыл бұрын

Godot Leg Inverse kinematics (IK) tutorial!
Make legs similar to those in AAA games like Breath of the wild and elden ring in your godot project in less than 10 minutes!
This is a godot 3D tutorial devlog for my indie game breath of the wild in Godot combat system tutorial how much money did my indie game make!? it is a game made by 1 person - a solo devlog! This indie game unity devlog is a unity 3D tutorial devlog. Godot.
Any problems or suggestions comment and I will try to help!
Source code:
github.com/LeonStansfield/Godot-IK-Legs
Follow me on Twitter:
Leonstansfield0
And check out the game on Itch.io:
leon-stansfield.itch.io/
Don't forget to like and subscribe if you liked the video!
kzbin.info/door/Myg...

Пікірлер: 40
@TonyHamone
@TonyHamone 8 ай бұрын
5:48 It's crazy that you just silently fast forward past the most confusing part, thanks bro.
@_ByteBlaze_
@_ByteBlaze_ 3 ай бұрын
I haven't tested this myself, so this is mostly just theory, but I think you could probably just do this for IK: BoneAttachment3D for your lower leg/calf, put the RayCast3D here, and move it so the top of the raycast starts at the knee. BoneAttachment3D for your feet. Put Node3D here for tracking foot positioning Do the regular other stuff for the IK, but when you are doing the raycast to move the IK's target node, have it check the hit point of the raycast, get the hit point's distance from the raycast origin, compare it to the distance between the raycast origin and the foot's global position (this is why we add the tracker with an attachment). If the raycast to hit point distance is greater than raycast to foot distance, we don't need to move the foot because it wouldn't intersect with anything. In the case we don't hit anything, set the IK interpolation to 0. If we do, set it to 1. You probably don't need this now, but I figure at the very least it might inspire someone else who comes across my comment to try it and maybe it works more easily
@yaltipolous
@yaltipolous 2 ай бұрын
You're welcome
@igorigor3960
@igorigor3960 2 жыл бұрын
finally, An IK legs tutorial.
@amorpilo9666
@amorpilo9666 2 жыл бұрын
That "function that they use" rotates the foot so it follows the floor slope angle.
@leonstansfield
@leonstansfield 2 жыл бұрын
I did figure that out eventually, but...quite frankly it didnt work and was not explained at all :P
@NekotoArts
@NekotoArts 2 жыл бұрын
0:06 Leon trying not to expose himself
@leonstansfield
@leonstansfield 2 жыл бұрын
😳😳😳
@bodamat
@bodamat 2 жыл бұрын
Great tutorial and good explained. Thanks!
@leonstansfield
@leonstansfield 2 жыл бұрын
Glad it was helpful!
@rubixkyoob2
@rubixkyoob2 2 жыл бұрын
Love your tutorials. Very helpful and informative!
@gamemakersgear1611
@gamemakersgear1611 2 жыл бұрын
0:05 "godamm those are some nice legs" what did he sayyyy?😳😳😳 jokes aside woah,youv improved so much in godot!,keep up the channel mate!
@leonstansfield
@leonstansfield 2 жыл бұрын
Lmaoo thanks man
@gamemakersgear1611
@gamemakersgear1611 2 жыл бұрын
@@leonstansfield lol, no problem!
@Bravo_0-7
@Bravo_0-7 Жыл бұрын
"god damn, those are some nice legs" got me ngl
@Gabirell
@Gabirell Жыл бұрын
Wow! Just was I was looking for. Thx!
@lismith5733
@lismith5733 2 жыл бұрын
Good IK Legs Tutorial
@RPGgrenade
@RPGgrenade 8 ай бұрын
I think I misunderstood the most important part... the animation interpolation bit. What...?
@pancelalkov2070
@pancelalkov2070 4 ай бұрын
Please explain how to properly setup the bones and also what you are doing exactly at 5:50 ?
@Lucas-gg9yb
@Lucas-gg9yb 2 жыл бұрын
nice! keep the good work! make a tutorial but now with the arms, when the character climb or hold a wall
@charleslamb6500
@charleslamb6500 2 жыл бұрын
Can one make a system, where player aims more realistically, say with a laser - weapon . . So, player twists torso, towards a target, while aiming, and, start turning entire body, after some angle . . . Don't really need it, for some cool project, it'd be nice to know the theory, etc . . .
@DemsW
@DemsW 2 жыл бұрын
as you saw here, the target's rotation affects the model rotation depending on which bones you selected, so you could probably point the target towards where you're aiming and it would maybe work with some tweaking
@leonstansfield
@leonstansfield 2 жыл бұрын
It's definitely possible, but I'm probably not going to make that tutorial :P
@dinkleburg43
@dinkleburg43 10 ай бұрын
I have been working on this exact thing for weeks for my TPS game. not there yet, but it seems there are 2 solutions- 1. (The right way) Really, really go in depth with blender and set up custom IK for EVERYTHING in your skeleton. build a system for modular hand placement and rigging so that you can have different items that still look natural. This will require a lottttt of setup and know-how within blender. 2. (The quick way) Use scripting to change the position properties of the IK target, set it to change various things in relation to the player's and the camera's position/orientation. Properties like position/rotation /must/ be changed separately. You cannot use bone attachments for this method, as it causes circular dependencies and messes with your scale. Then you're in hell. This can work and is what I have come down to, as I am not really the blender guru... I have a strong feeling it will come back to bite me and cause a lot of extra work for adding additional weapons. good luck cause I've been searching for a long time. I don't think that tutorial exists...
@jovlem
@jovlem Жыл бұрын
Is it possible to create and animate the target and the interpolations indside Blender? That way each time you need to re-export your character, you dont need to re-create these.
@davymachinegun5130
@davymachinegun5130 23 күн бұрын
Earliest game I know that did this is Legacy of Kain: Soul Reaver on PS1.
@akitaropiquet7580
@akitaropiquet7580 10 ай бұрын
best intro ever ^^
@manancialgd.
@manancialgd. Ай бұрын
really nice, but what about the waist height?
@Jasonsumm
@Jasonsumm 2 жыл бұрын
Great tutorial! Seems ilke your source code isn't updated. Keep up the amazing work!
@leonstansfield
@leonstansfield 2 жыл бұрын
Hmm I just checked my repo and it is updated... It's not the same as the recording so some names are different but other than that it's the same. (Eg, the IK script is named 'animation' in the repo)
@Jasonsumm
@Jasonsumm 2 жыл бұрын
@@leonstansfield when I ran it the walking anim seemed to not be working…could just be me
@novemberdev8292
@novemberdev8292 2 жыл бұрын
Amazin lets goooooo
@jackeliot4497
@jackeliot4497 2 жыл бұрын
Could you make a tutorial on how to make a third person script like the one you used in this tutorial devoid of Ik stuff
@leonstansfield
@leonstansfield 2 жыл бұрын
I probably won't do this as there is already a bunch out there and I have limited time for game Dev, but I recommend and use a modified version of this code: github.com/GarbajYT/godot_updated_fps_controller/blob/main/FPS_controller_4.0/FPS.gd
@simonw.1223
@simonw.1223 10 ай бұрын
how do I know all this stuff.
@kimmiek3763
@kimmiek3763 2 жыл бұрын
Linux plus open source gang
@foixa
@foixa 3 ай бұрын
Can you port it to Godot 4.2.2 stable version?
@facu.aguinaga
@facu.aguinaga 20 күн бұрын
thiss
@ahero9249
@ahero9249 9 ай бұрын
Godot 4 please
@BrunoJuncklaus
@BrunoJuncklaus 4 ай бұрын
you lost me on bezier
Я сделала самое маленькое в мире мороженое!
00:43
Кушать Хочу
Рет қаралды 4,3 МЛН
Это было очень близко...
00:10
Аришнев
Рет қаралды 1,9 МЛН
小蚂蚁会选到什么呢!#火影忍者 #佐助 #家庭
00:47
火影忍者一家
Рет қаралды 105 МЛН
ВЫЖИЛ В ДРЕВНЕМ ЕГИПТЕ!
13:09
Бурёночек🛑
Рет қаралды 464 М.