REALISTIC Foot Placement Using IK in Unity

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ส.ค. 2024
  • JOIN THE DISCORD SERVER!
    / discord
    -----------------------------------------------------------------------------------
    ABOUT THE VIDEO
    It's another Quick Bits video! In this one we're going over how to achieve a more natural, realistic looking foot placement for your humanoid model's tootsies. No more feet hovering just above the ground because the main collider is sitting on a tiny rock!
    Let me know if you'd like more of this in the comments below!
    Thanks for watching!
    -----------------------------------------------------------------------------------
    LINKS
    Get the script from the video here; github.com/b3a...
    Find the "2 Toon Kids" asset pack on the Unity Asset Store here; assetstore.uni...
    -----------------------------------------------------------------------------------
    SOCIAL STUFF!
    Website: b3agz.com
    Twitter: / b3agz
    Instagram: instragram.com/...
    -----------------------------------------------------------------------------------
    SUPPORT THE CHANNEL
    The easiest way to support the channel is by liking, subscribing, and sharing. But if you want to go that little bit further, sign up for my Patreon at; / b3agz

ความคิดเห็น • 222

  • @juanjomejias1125
    @juanjomejias1125 4 ปีที่แล้ว +45

    Hi, thanks for the useful tutorial. As some other users found out, when going uphill LookRotation(transform.forward, hit.normal) doesn't do the trick, because the forward vector is still aiming at (0,0,1), but you'd want it to aim towards the slope's angle. I don't fully understand why the method commented below works, that's why I wanted to contribute with the one I'm using:
    Vector3 forward = Vector3.ProjectOnPlane(transform.forward, hit.normal);
    anim.SetIKRotation(AvatarIKGoal.LeftFoot, Quaternion.LookRotation(forward,hit.normal));
    I project the transform's forward on the plane defined by the hit normal, and then use that as a forward for the LookRotation call. This makes the foot be paralel to the surface with that normal.

    • @slimabob
      @slimabob 3 ปีที่แล้ว

      Thank you!!!

    • @lupinder2058
      @lupinder2058 3 ปีที่แล้ว

      Can you tell me where ı should add your "Vector3 forward = Vector3.ProjectOnPlane(transform.forward, hit.normal);" script.
      ray = new Ray(m_animator.GetIKPosition(AvatarIKGoal.RightFoot) + Vector3.up, Vector3.down);
      if (Physics.Raycast(ray, out hit, DistanceToGround + 1f, layerMask))
      {
      if (hit.transform.tag == "Ground")
      {
      Vector3 footPosition = hit.point;
      footPosition.y += DistanceToGround;
      m_animator.SetIKPosition(AvatarIKGoal.RightFoot, footPosition);
      m_animator.SetIKRotation(AvatarIKGoal.RightFoot, Quaternion.FromToRotation(Vector3.up, hit.normal) * transform.rotation);
      }
      }
      }
      }

    • @milankiele2304
      @milankiele2304 2 ปีที่แล้ว

      Than you =)

    • @TheXSpitfire
      @TheXSpitfire 2 ปีที่แล้ว

      You can also just use anim.SetIKRotation(AvatarIKGoal.LeftFoot, Quaternion.FromToRotation(Vector3.up, hit.normal));

  • @JacksonAcademy1
    @JacksonAcademy1 4 ปีที่แล้ว +55

    The next brackeys ;)

  • @juanjomejias1125
    @juanjomejias1125 4 ปีที่แล้ว +12

    Hi again, there was a comment below that asked why not use distance instead of curves to decide the amount of IK weight on each foot. The distance would be the distance between the foot transform and the floor before applying IK. This gives you a sense of when the foot is supposed to be on the floor according to the animation, just what you do with the curves. The difference is that if for instance I have a locomotion blending tree with 25 different animations to cater for walk, run, strafe, left and right, backwards and forwards and turn on the spot, I don't have to adjust 50 different curves to have the feet only glued to the ground when they are supposed to.

  • @EdadTace
    @EdadTace 4 ปีที่แล้ว +106

    6:08 "That way you don't get an error if you forget to add an animator"
    Seems like it would be pretty helpful to get an error if you forgot to add the animator.

    • @GameDevAraz
      @GameDevAraz 4 ปีที่แล้ว +4

      xD

    • @MetaCzech
      @MetaCzech 4 ปีที่แล้ว +22

      Put "[RequireComponent(typeof(Animator))]" in front of class declaration and forget about checking every frame if animator component exists or not.

    • @allisongross2946
      @allisongross2946 4 ปีที่แล้ว +11

      Yeah this sort of thing bothers me. Don't turn off warnings! Don't turn those things off! Solve the problem you caused instead!

    • @johnwyatt3646
      @johnwyatt3646 4 ปีที่แล้ว +4

      so that would just go at the top like in this documentation? docs.unity3d.com/ScriptReference/RequireComponent.html

    • @joegiusti528
      @joegiusti528 3 ปีที่แล้ว +1

      put this at the top:
      if (anim == null){
      Debug.Log("Animato is NULL!!");
      return;
      }
      you could even put LogError( ) if you want it to be an error

  • @ishashka
    @ishashka 4 ปีที่แล้ว +26

    Amazing, really helped me understand Unity IK better. Also, you have great voice.

    • @monkeyrobotsinc.9875
      @monkeyrobotsinc.9875 3 ปีที่แล้ว

      yeah but he kept saying not instead of zero. also probably says zed instead of Z.

    • @bitmammothOG
      @bitmammothOG 3 ปีที่แล้ว +1

      @@monkeyrobotsinc.9875 Too much for you to handle? lmfao

    • @bitmammothOG
      @bitmammothOG 3 ปีที่แล้ว +1

      @@monkeyrobotsinc.9875 you realize they say it with only one syllable right? its much faster.

  • @GameDevNerd
    @GameDevNerd 3 ปีที่แล้ว +10

    I'm doing this on a blend tree with an idle, walk and run animation blend. I've about gotten right. The run animation is the last one that needs curve adjustments! Making character's feet match the terrain adds a LOT of polish to your game project. It looks awful when feet are floating in the air or clipping thru terrain ... totally kills the immersion. But when their feet perfectly fits the ground they walk on, it feels like a real world you can get into! :-)

    • @ExperienceAyush
      @ExperienceAyush หลายเดือนก่อน +2

      how did you do it with a blend tree cause i am using it too but it is not working for me :(

  • @sinanermis
    @sinanermis 3 ปีที่แล้ว +5

    i think i have fallen in love with your voice, platonically.

  • @pratyushbarikdev
    @pratyushbarikdev 3 ปีที่แล้ว +2

    It is official. Game dev tutorial creators with 1k to 5k subscribers produce the most in-depth content.

  • @vexedev
    @vexedev 2 ปีที่แล้ว +2

    You can hit "F" on the keyboard to center back/focus/zoom-to-fit on the animation curve when it goes weird like that.

  • @BlueBirdgg
    @BlueBirdgg 4 ปีที่แล้ว +3

    Lol, love your humor about your own lengthened explanation.

  • @phunweng962
    @phunweng962 4 ปีที่แล้ว +1

    I like that you explain all your setup before everything start. it make things clear. subscribed.

  • @xentropian6341
    @xentropian6341 3 ปีที่แล้ว +4

    Dude, really well explained and well made. Kudos!

  • @diceblue6817
    @diceblue6817 4 ปีที่แล้ว +2

    you should dynamically place the collider based on the height difference across both feet - that's what we do effectively as we shift weight ourselves - so when walking across uneven terrain you will see the person lowered, feet at different heights, and then on flat terrain he'll be walking around at full height
    so the offset of the collider should be floor+foot difference - he'll "sink" that much with his most extended leg reaching the ground and his other leg bent up, then you need to look at which foot is on ground and animate the collider with the adaptive leg gait so you are raised more on the one that is higher up etc.

    • @never2return1
      @never2return1 3 ปีที่แล้ว +3

      I am replying to thank you for a very good idea as I've been searching for a solution to this problem you are referring to, Thanks.

    • @diceblue6817
      @diceblue6817 3 ปีที่แล้ว

      @@never2return1 no worries! godspeed and good luck!

    • @perero
      @perero 6 หลายเดือนก่อน

      He should have referred to this problem in the video, this does not seem trivial at all. Thanks for your advice!

  • @Zicrus
    @Zicrus 4 ปีที่แล้ว +7

    Great tutorial! Can you make one about non-human characters?

  • @saadabounasr6366
    @saadabounasr6366 2 ปีที่แล้ว +1

    Cool vid!!! keep up with the content, ever since brackeys quit i couldnt fin a decent enough tutorial for foot IK, thank you!!!

  • @robertbalassan
    @robertbalassan 5 หลายเดือนก่อน

    lifechanging!!!! THANK YOU BROTHER! you saved a life! :D

    • @b3agz
      @b3agz  5 หลายเดือนก่อน

      Glad it helped!

  • @brenxart7179
    @brenxart7179 4 ปีที่แล้ว +3

    Thank you sir. Your tutorial is really educational and thank you for sharing to the community

  • @thatonekid702
    @thatonekid702 ปีที่แล้ว

    This channel is awesome. I love how you linked the github link here, in case we need reference or in case of error. These are the unity tutorials we need.

  • @Ninquenor
    @Ninquenor 3 ปีที่แล้ว +2

    Excellent tutorial, b3agz! What I needed. However I did have to do some searching to make sure the foot also gets X rotation (tilted forward/back and not just left/right). Several people commented already about the easy fix:
    Animator.SetIKRotation(AvatarIKGoal.LeftFoot, Quaternion.FromToRotation(Vector3.up, hit.normal) * transform.rotation);
    I would encourage you to put some kind of note to this effect in your video's description.
    On another note, due to my model's configuration I actually ended up with feet way too close together once I implemented your solution. To remedy this I ended up casting my rays down from each foot's CALF bone (the bone right above it).
    But thanks again for an awesome tutorial!

    • @Shade7x
      @Shade7x ปีที่แล้ว

      I came to the comments looking for exactly this (after trying and failing myself, of course). Thanks!

  • @plankbro
    @plankbro 4 หลายเดือนก่อน

    If anyone is having a problem, make sure the script that you are calling the OnAnimatorIK function is attached directly to the game object that has the Animator component. I ran into a problem since I had the script attached to a parent object that contained my character and the animator component.

  • @rapth
    @rapth 8 หลายเดือนก่อน

    Thanks for the tutorial, fast and straight to point

    • @b3agz
      @b3agz  8 หลายเดือนก่อน +1

      Thanks! Those are the two main things I aim for ❤️

  • @Freak-px9uk
    @Freak-px9uk 3 ปีที่แล้ว +3

    I think it is better to use raycast or a trigger to know when the foot is hitting the floor to set the footweight, specially if you are going to have multiple animations like running or jumping.

    • @bayernmaik8583
      @bayernmaik8583 3 ปีที่แล้ว

      Agreed, if using Blend Trees for animations accessing those animation curves and averaging values gets funny quite quickly

  • @misadate8688
    @misadate8688 4 ปีที่แล้ว +1

    finally i understand how to actually make ik work

  • @velkyngame
    @velkyngame 4 ปีที่แล้ว +1

    You deserve way more views! Really good tutorial. Subscribed :)

    • @b3agz
      @b3agz  4 ปีที่แล้ว

      Thanks!

  • @AdventuresOfAzeth
    @AdventuresOfAzeth ปีที่แล้ว

    Thank you, this was much needed.

  • @REDACT3D
    @REDACT3D 3 ปีที่แล้ว

    that "Ahhh good enough" beauty ^.^

  • @brcosta5
    @brcosta5 3 ปีที่แล้ว

    Works great, great tutorial man. In 2021 it continues to function well

  • @skittles970
    @skittles970 4 ปีที่แล้ว +1

    This is a very well put together and informative video. Subbed!

    • @skittles970
      @skittles970 4 ปีที่แล้ว

      Honestly the best tutorial I've yet seen on a complex topic

    • @Hello-qg4yk
      @Hello-qg4yk 4 ปีที่แล้ว

      I think so too!

  • @ghua
    @ghua ปีที่แล้ว

    very good tutorial, thanks

  • @SirRelith
    @SirRelith 5 ปีที่แล้ว +1

    So cool!
    Thanks for sharing. I gotta try this out!

  • @bensmng
    @bensmng 2 ปีที่แล้ว

    This is really helpful. Nice job explaining everything. Thanks for doing this.

  • @aldigangster123
    @aldigangster123 4 ปีที่แล้ว

    very cool demonstration and explanation! Subscribed

  • @amni5tianone263
    @amni5tianone263 2 ปีที่แล้ว

    perfect one. may the god bless you man

  • @prasenkakade9723
    @prasenkakade9723 3 ปีที่แล้ว

    Didn't know using IK was that simple
    Great video 👍

  • @pikachufan3588
    @pikachufan3588 2 ปีที่แล้ว

    Very cool and informative. Thank you!

  • @thatrealguylogan
    @thatrealguylogan 2 ปีที่แล้ว

    great video, this will help me out a lot!

  • @sashamakeev7547
    @sashamakeev7547 2 ปีที่แล้ว

    Very very nice explanation on subject

  • @RazerFlexing
    @RazerFlexing 2 ปีที่แล้ว

    U r absolutely genius thanks alot!!

  • @svenfruiti494
    @svenfruiti494 5 ปีที่แล้ว +1

    I really love your personality and your talent. I gave you a sub :).

    • @b3agz
      @b3agz  5 ปีที่แล้ว

      Thanks! Positive feedback is always nice 😉

  • @jfehey
    @jfehey 2 ปีที่แล้ว

    Awesome tutorial man!!

  • @mzamanist
    @mzamanist 2 ปีที่แล้ว

    Amazing tutorial, Thank you sir!

  • @sohrabhamza3805
    @sohrabhamza3805 3 ปีที่แล้ว

    Thanks for the tutorial. Very informative as it wasn't a do this and do that and more of a do this becuase.

  • @ktmochiii
    @ktmochiii 3 ปีที่แล้ว

    lol i learned so much watching this. like srsly. thanks so much man.

  • @baran9086
    @baran9086 2 ปีที่แล้ว +7

    So, in case someone has some problems with the height of the character on Terrain thats on different heights, i made this code that will adjust the height of your character depending on the height difference of your two feet.
    //Checking distance from LeftFoot to Ground
    Ray ray1 = new(LeftFoot.transform.position, Vector3.down);
    RaycastHit hit1;
    if (Physics.Raycast(ray1, out hit1, 5f, layer))
    {
    Debug.DrawLine(ray1.origin, hit1.point, Color.red);
    }
    else
    {
    Debug.DrawLine(ray1.origin, hit1.point, Color.blue);
    }
    //Checking distance from RightFoot to Ground
    ray1 = new(RightFoot.transform.position, Vector3.down);
    RaycastHit hit2;
    if (Physics.Raycast(ray1, out hit2, 5f, layer))
    {
    Debug.DrawLine(ray1.origin, hit2.point, Color.red);
    }
    else
    {
    Debug.DrawLine(ray1.origin, hit2.point, Color.blue);
    }

    LeftFootDistance = hit1.distance;
    RightFootDistance = hit2.distance;
    //Clamping controller height, so it doesnt do any weird shit. 1.25f looks just about normal
    controller.height = Mathf.Clamp(controller.height, 1.25f, 1.82f);
    //Because of the placement of the LeftFoot and RightFoot object, there is a little bit offset to the ground.
    //With these 2 if statements we set the offset to 0
    if (LeftFootDistance < 0.06)
    {
    LeftFootDistance = 0;
    }
    if (RightFootDistance < 0.06)
    {
    RightFootDistance = 0;
    }
    //If the left foot is above the right foot
    if (RightFootDistance > LeftFootDistance)
    {
    if(!move.isWalking)
    controller.height = 1.82f - RightFootDistance * 2;
    }
    //If the right foot is above the left foot
    if(LeftFootDistance > RightFootDistance)
    {
    if(!move.isWalking)
    controller.height = 1.82f - LeftFootDistance * 2;
    }
    if (move.isWalking || hit1.normal.y > 0.93)
    {
    controller.height = 1.82f;
    }

    • @knagen
      @knagen ปีที่แล้ว

      I get alot of "does not exist in the current context"
      LeftFoot, RightFoot, layer, controller and such.
      Im kinda new to this, any idea why? I got a hunch but isnt experienced enough to know how to fix it

    • @baran9086
      @baran9086 ปีที่แล้ว +1

      @@knagen aye so this simply means that these variables were not created in your code yet. You cant see it in the Code Snippet above, but i have Variables called "layer" "controller" "LeftFoot" and "RightFoot" and thats why i use them. So to fix your problem you will need to create Variables with these names. You can of course change the names, but when you reference them they obviously need to have the same name as they had when you created/intialized them. "Controller" is a CharacterController, "Layer" is a LayerMask and i believe the Foot Variables were GameObjects

    • @_alieutu9303
      @_alieutu9303 7 หลายเดือนก่อน

      What does this "move.isWalking" refer to?
      Is it a variable of the character controller or your variable?@@baran9086

  • @TheSeanC
    @TheSeanC 2 ปีที่แล้ว

    Thank you!

  • @Niter88
    @Niter88 2 ปีที่แล้ว

    your tutorial are so awesome

  • @nizd3128
    @nizd3128 5 ปีที่แล้ว

    Excellent video learnt a lot thankyou.

  • @vexury
    @vexury 6 หลายเดือนก่อน

    Great voice, great content

    • @b3agz
      @b3agz  6 หลายเดือนก่อน

      Too kind! Thank you.

  • @ako4435
    @ako4435 2 ปีที่แล้ว

    nice tutorial ty

  • @BostonQuigel
    @BostonQuigel 4 ปีที่แล้ว

    This was super useful

  • @ExperienceAyush
    @ExperienceAyush หลายเดือนก่อน +2

    How can I do it with blend tree animations? It is not working for me???
    Edit : I had a generic character that is why it was not working but when turning in to humanoid the character goes through the ground and animations do not work.... PLZ HELP

  • @mohokhachai
    @mohokhachai 7 หลายเดือนก่อน

    Thanks

  • @VRoyTech
    @VRoyTech 2 ปีที่แล้ว

    Cool man , keep it up

  • @domagojalagic6678
    @domagojalagic6678 3 ปีที่แล้ว

    Thanks, really helpful!

  • @dynamicvoltage9765
    @dynamicvoltage9765 4 ปีที่แล้ว

    Superb tutorial

  • @m4gmar
    @m4gmar 4 ปีที่แล้ว

    Thank you!, pls make more IK tutorials

  • @gregarfireBR
    @gregarfireBR 4 ปีที่แล้ว +2

    The best Foot IK tutorial on TH-cam !
    Like + Subscribed !
    Just have some questions..
    The animation "walk" that you already have, did it move the entire legs or just the thigh / knee?
    If I make an animation with the foot keyframmed, does it work?

    • @b3agz
      @b3agz  4 ปีที่แล้ว +1

      Thanks! The walk animation I used was a complete animation, I think it just had less arm movement than a regular animation. Regarding keyframes, afaik (and I'm not certain) keyframes should work as long as the weight is not 0 when the keyframe happens.

  • @nv7287
    @nv7287 4 ปีที่แล้ว

    So cool thanks!

  • @BagelMaster
    @BagelMaster 3 ปีที่แล้ว

    Great video

  • @devvie_hu
    @devvie_hu 16 วันที่ผ่านมา

    Instead of "Quaternion.LookRotation(transform.forward, hit.normal)" use "Quaternion.LookRotation(Vector3.ProjectOnPlane(transform.forward, hit.normal), hit.normal)" to correctly rotate the foot forward and backward too, not just to the sides.

  • @jdigi78
    @jdigi78 3 ปีที่แล้ว +2

    Great tutorial, but the Quaternion.LookRotation should be replaced with this if the feet or the character aren't perfectly straight:
    anim.GetIKRotation(AvatarIKGoal.LeftFoot) * Quaternion.FromToRotation(anim.GetIKRotation(AvatarIKGoal.LeftFoot) * Vector3.up, hit.normal)

  • @LilBigHuge
    @LilBigHuge 3 ปีที่แล้ว

    Why not just set IKWeight based on foot height within the original animation? Seems like the curve is unnecessary. But great video. Thanks.

  • @ZZKJ396
    @ZZKJ396 5 ปีที่แล้ว

    Enjoying your vids. I don’t even use Unity (I use Godot), subscribed!

    • @b3agz
      @b3agz  5 ปีที่แล้ว

      That's cool! Glad to have you

  • @GuillemPoy
    @GuillemPoy 4 ปีที่แล้ว +4

    To fix the problem at 21:10 wouldn't it be better (in terms of scalability) to just avoid the foot IK placing if the ray (in the line 53 of the minute 20:22) does not hit anything "past the foot"?
    I mean: if the ray detects the ground under the foot (not the foot under the grounded surface), don't force the placement.
    Doing it as how you show it isn't very scalable because you should add that curve at every animation.
    I implemented the code this way: i.imgur.com/6YTLS6f.png

    • @caolangadd9734
      @caolangadd9734 4 ปีที่แล้ว

      maxFootElevation? Code didn't work for me anyway... :'(

    • @ThatRazzy
      @ThatRazzy 2 ปีที่แล้ว +1

      Thank you. This worked much better for me! No manual curves thank goodness :D Except I changed "animator.SetIKRotation(foot, Quaternion.LookRotation(transform.forward, hit.normal));" to "animator.SetIKRotation(foot, Quaternion.FromToRotation(Vector3.up, hit.normal) * transform.rotation);", as suggested by another comment.

  • @GameDevAraz
    @GameDevAraz 4 ปีที่แล้ว +6

    Hi, Unity Keeps Referring To:
    "'AvatarIKGoal' does not contain a definition for 'RigthFoot' "
    i Know This Isn't Normal, But Just Asking If You Faced The Same Issue, Tanks!

    • @GameDevAraz
      @GameDevAraz 4 ปีที่แล้ว +2

      -.-. i just realized the "Rigth" lol, Great Tutorial Thanks!

    • @KageToHikari_CG
      @KageToHikari_CG 4 ปีที่แล้ว +2

      @@GameDevAraz Ith appens X)

  • @yusufhabib3507
    @yusufhabib3507 4 ปีที่แล้ว

    i love u for this 14:30

  • @3po_Orisen_Sithappen
    @3po_Orisen_Sithappen 4 ปีที่แล้ว

    amazing ty

  • @caolangadd9734
    @caolangadd9734 4 ปีที่แล้ว +1

    Any way to fix the way to knee bends, it looks a bit weird... Overall this was a good tutorial, I enjoyed it, some more tutorials on IK would be nice!

    • @meddjihed9108
      @meddjihed9108 2 ปีที่แล้ว +1

      Same problem, the knee don't look natural, It's because of the capsule collider, the height need to be at feet level, but if you do that the feet il effect will disappear, so, expect for making the collider thinner or play with height and the transform position.y, there isn't much to do except scratching my head.

    • @caolangadd9734
      @caolangadd9734 2 ปีที่แล้ว

      @@meddjihed9108 Man ill send you my unity project with something like this implemented cant crack the knee thing still all this time later lol

  • @nickbitounis7509
    @nickbitounis7509 3 ปีที่แล้ว

    Nice video!! You think you can make a tutorial on how to detect walls so with ik character will touch walls with his hands while walking or idle? that would be awesome

  • @Nazgul
    @Nazgul 3 ปีที่แล้ว

    This is absolutely perfect! And f**ck Animation Rigging that is still is crashing unity sometimes :)

  • @WazoGaming
    @WazoGaming 4 หลายเดือนก่อน

    Swear to god you sound like Fooster

  • @Reolin6
    @Reolin6 2 หลายเดือนก่อน

    I have an issue with this script, unity seems to come to an error saying "IKleftfoot" does not exist, well not just the left foot, but all of the characters limbs, please help when you can.

  • @beyondbludgeoning
    @beyondbludgeoning 3 ปีที่แล้ว +1

    any way to adjust the y position of the hips to allow for more dramatic differences in height between the feet ?, i want to bring the hips down so one foot isn't floating

  • @ianandrew1997
    @ianandrew1997 4 ปีที่แล้ว +1

    Fantastic tutorial, helped me a ton-- Is there any way the raycasts from the feet can be used as a Ground-Check for jumping and falling?

    • @b3agz
      @b3agz  4 ปีที่แล้ว +3

      You could but for simplicities sake I'd probably do a third raycast dedicated to to groundcheck

  • @RushlineCode
    @RushlineCode 2 ปีที่แล้ว

    why isnot work, i'm using the TPS stater asset, it's use a character controller not capsule collider

  • @ukaszgrabski2811
    @ukaszgrabski2811 3 หลายเดือนก่อน

    Great tutorial but no matter how I tune the settings my character looks like he's crouching on a flat plane. I use navmesh agent and setting it's base offset brings some issues in this solution :/ Maybe im missing something? Thanks nevertheless :)

  • @simsalaanimationen4247
    @simsalaanimationen4247 2 ปีที่แล้ว

    i can't rotate the Bones in the inspector. I can only rotate the Chara entire Chara but not single Bones.

  • @eRKSToCK
    @eRKSToCK 4 ปีที่แล้ว +1

    since you're raycasting from the foot to find its ground placement, couldn't you use the height of the foot transform to decide whether to stick to the ground or not instead of a curve on the animation?

    • @b3agz
      @b3agz  4 ปีที่แล้ว +1

      Hi! The curve isn't so much deciding when to stick to the ground as it is determining when it's ok to make the decision. We don't want the foot sticking to the ground during the high points of a walk cycle

  • @xCrOaTiEnSniPZzx
    @xCrOaTiEnSniPZzx 5 ปีที่แล้ว +1

    I really wish someone would explain Foot IK for 2D :D

    • @b3agz
      @b3agz  5 ปีที่แล้ว +1

      It's basically the same premise. Obviously it would only work on mecanim animatable objects (not flat sprites) but other than that just use a 2D raycast instead of a regular one

    • @N0R35P3C7
      @N0R35P3C7 4 ปีที่แล้ว

      You have to create like custom IK for the character
      But the principle is the same

  • @roundzerodev
    @roundzerodev 4 ปีที่แล้ว

    Finally!!! :)

  • @jamiljawhar4711
    @jamiljawhar4711 3 ปีที่แล้ว

    Awesome tutorial, but late I am late. I got question, the foot is working above the base not below base, how can I fix that.
    like if I m on slop, one leg inclines, but not other.

  • @zenden791
    @zenden791 5 ปีที่แล้ว

    Good !

  • @Official_KB_Studios
    @Official_KB_Studios 2 ปีที่แล้ว

    It for some reason does not work for me

  • @iriswillaert1450
    @iriswillaert1450 4 ปีที่แล้ว +1

    Thanks for the video very useful! got a question where is the tag "walkable" coming from? Did you change the tag to walkable of the left foot transform on your character? Thanks!

  • @Adelious_
    @Adelious_ 3 ปีที่แล้ว +1

    I'm the 34k viewer =)

  • @victor.novorski
    @victor.novorski ปีที่แล้ว

    Mate.... What.. how did you over ride the animation...?

  • @ChapCanai
    @ChapCanai 7 หลายเดือนก่อน

    Hoot?

  • @maya_gameworks
    @maya_gameworks 3 ปีที่แล้ว

    how do you turn this forward walking animation into a system where the character can walk forward, left 45 degrees and right 45 degrees?

  • @xtroy699
    @xtroy699 3 ปีที่แล้ว

    Question: What if it's not a fbx asset, such as manual animation , how to configure animation Curves?

  • @Meow_YT
    @Meow_YT 3 ปีที่แล้ว

    Feels like the function needs a refactor ... nya

  • @naandofer
    @naandofer 3 ปีที่แล้ว +1

    Hello! Great Video! Truly amazing! I just have one question, I'm trying to follow what you have done here using an animation that I got on Mixamo and idk if it works the same way, I didn't finished yet but I'm afraid that maybe it doesn't work. Have you tried? It should work? I'm thinking about the hierarchy of my Skinned mesh! Should I use a animation in place? Or not? I was trying first using an idle but I really wanna lern whats should I do to replicate your tutorial! Again, amazing work! Thanks!

    • @SA_Star_Infinity
      @SA_Star_Infinity 2 ปีที่แล้ว

      It should work. Since those animations have bones too. It should. Maybe some format changing is required but it is unexpected

  • @Josephjohn385
    @Josephjohn385 3 ปีที่แล้ว

    my object disappears when I place first animation on timeline but if I apply Generic Rig then character position does not change , how to fix it ?

  • @Longaui
    @Longaui 4 ปีที่แล้ว

    Hi there
    I have my own character and but I need some setup tutorial because it does not have a ready ik system, can someone please recommend me any tutorial on setting it up?

  • @elrymoe
    @elrymoe 2 ปีที่แล้ว

    You dont want the variable to be public but [SerializeField] private

  • @killereks
    @killereks 4 ปีที่แล้ว

    It doesn't work with blend trees, the curves just return 0.

  • @jesaroartist1622
    @jesaroartist1622 3 ปีที่แล้ว

    How This works with blend tree animations?, my foot bounce, like sometimes work and others don't

  • @brianjensen2532
    @brianjensen2532 3 ปีที่แล้ว

    Animation Events instead of Curves. Much easier.

  • @aglyio
    @aglyio 2 ปีที่แล้ว

    it works also in 2d?

  • @igd1591
    @igd1591 3 ปีที่แล้ว

    Would it be possible to do the same with 2D IK character animation?

  • @nikitagamer604
    @nikitagamer604 2 ปีที่แล้ว

    in my project it is not work and I don not understand why I do all correctly ((((((((((((((

    • @nikitagamer604
      @nikitagamer604 2 ปีที่แล้ว

      Finaly this works in my project, yey