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

Поділитися
Вставка
  • Опубліковано 17 тра 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!
    ua-cam.com/channels/Myg.html...
  • Ігри

КОМЕНТАРІ • 35

  • @TonyHamone
    @TonyHamone 5 місяців тому +14

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

    • @_ByteBlaze_
      @_ByteBlaze_ 13 днів тому

      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

  • @rubixkyoob2
    @rubixkyoob2 Рік тому +3

    Love your tutorials. Very helpful and informative!

  • @amorpilo9666
    @amorpilo9666 2 роки тому +57

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

    • @leonstansfield
      @leonstansfield  2 роки тому +18

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

  • @igorigor3960
    @igorigor3960 2 роки тому +9

    finally, An IK legs tutorial.

  • @Gabirell
    @Gabirell Рік тому +1

    Wow! Just was I was looking for. Thx!

  • @bodamat
    @bodamat 2 роки тому +9

    Great tutorial and good explained. Thanks!

  • @Lucas-gg9yb
    @Lucas-gg9yb 2 роки тому +1

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

  • @lismith5733
    @lismith5733 Рік тому +1

    Good IK Legs Tutorial

  • @akitaropiquet7580
    @akitaropiquet7580 6 місяців тому

    best intro ever ^^

  • @NekotoArts
    @NekotoArts 2 роки тому +4

    0:06 Leon trying not to expose himself

  • @gamemakersgear1611
    @gamemakersgear1611 2 роки тому +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!

  • @novemberdev8292
    @novemberdev8292 Рік тому

    Amazin lets goooooo

  • @jovlem
    @jovlem 9 місяців тому +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.

  • @Bravo_0-7
    @Bravo_0-7 9 місяців тому +1

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

  • @pancelalkov2070
    @pancelalkov2070 Місяць тому +1

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

  • @charleslamb6500
    @charleslamb6500 2 роки тому +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 2 роки тому +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  2 роки тому +4

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

    • @dinkleburg43
      @dinkleburg43 6 місяців тому

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

  • @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

  • @jackeliot4497
    @jackeliot4497 Рік тому

    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  Рік тому

      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 4 місяці тому

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

  • @simonw.1223
    @simonw.1223 7 місяців тому

    how do I know all this stuff.

  • @ahero9249
    @ahero9249 5 місяців тому

    Godot 4 please

  • @kimmiek3763
    @kimmiek3763 2 роки тому +2

    Linux plus open source gang

  • @BrunoJuncklaus
    @BrunoJuncklaus 23 дні тому

    you lost me on bezier