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

Sdílet
Vložit
  • čas přidán 17. 05. 2022
  • 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/God...
    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!
    czcams.com/channels/Myg.html...
  • Hry

Komentáře • 36

  • @TonyHamone
    @TonyHamone Před 5 měsíci +14

    5:48 It's crazy that you just silently fast forward past the most confusing part, thanks bro.

    • @_ByteBlaze_
      @_ByteBlaze_ Před 28 dny

      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

  • @amorpilo9666
    @amorpilo9666 Před 2 lety +57

    That "function that they use" rotates the foot so it follows the floor slope angle.

    • @leonstansfield
      @leonstansfield  Před 2 lety +18

      I did figure that out eventually, but...quite frankly it didnt work and was not explained at all :P

  • @rubixkyoob2
    @rubixkyoob2 Před rokem +3

    Love your tutorials. Very helpful and informative!

  • @igorigor3960
    @igorigor3960 Před 2 lety +9

    finally, An IK legs tutorial.

  • @Gabirell
    @Gabirell Před rokem +1

    Wow! Just was I was looking for. Thx!

  • @bodamat
    @bodamat Před 2 lety +9

    Great tutorial and good explained. Thanks!

  • @Lucas-gg9yb
    @Lucas-gg9yb Před 2 lety +1

    nice! keep the good work! make a tutorial but now with the arms, when the character climb or hold a wall

  • @NekotoArts
    @NekotoArts Před 2 lety +4

    0:06 Leon trying not to expose himself

  • @lismith5733
    @lismith5733 Před rokem +1

    Good IK Legs Tutorial

  • @gamemakersgear1611
    @gamemakersgear1611 Před 2 lety +4

    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!

  • @Bravo_0-7
    @Bravo_0-7 Před 10 měsíci +1

    "god damn, those are some nice legs" got me ngl

  • @akitaropiquet7580
    @akitaropiquet7580 Před 7 měsíci

    best intro ever ^^

  • @novemberdev8292
    @novemberdev8292 Před rokem

    Amazin lets goooooo

  • @jovlem
    @jovlem Před 10 měsíci +4

    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.

  • @Jasonsumm
    @Jasonsumm Před 2 lety

    Great tutorial! Seems ilke your source code isn't updated. Keep up the amazing work!

    • @leonstansfield
      @leonstansfield  Před 2 lety

      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 Před 2 lety

      @@leonstansfield when I ran it the walking anim seemed to not be working…could just be me

  • @charleslamb6500
    @charleslamb6500 Před 2 lety +11

    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 Před 2 lety +1

      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  Před 2 lety +4

      It's definitely possible, but I'm probably not going to make that tutorial :P

    • @dinkleburg43
      @dinkleburg43 Před 7 měsíci

      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...

  • @pancelalkov2070
    @pancelalkov2070 Před měsícem +1

    Please explain how to properly setup the bones and also what you are doing exactly at 5:50 ?

  • @jackeliot4497
    @jackeliot4497 Před rokem

    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  Před rokem

      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

  • @RPGgrenade
    @RPGgrenade Před 5 měsíci

    I think I misunderstood the most important part... the animation interpolation bit. What...?

  • @simonw.1223
    @simonw.1223 Před 7 měsíci

    how do I know all this stuff.

  • @ahero9249
    @ahero9249 Před 6 měsíci

    Godot 4 please

  • @foixa
    @foixa Před 10 dny

    Can you port it to Godot 4.2.2 stable version?

  • @kimmiek3763
    @kimmiek3763 Před 2 lety +2

    Linux plus open source gang

  • @BrunoJuncklaus
    @BrunoJuncklaus Před měsícem

    you lost me on bezier