Inverse Kinematics in Unity: How to Use IK to Improve Your VR Games

Sdílet
Vložit
  • čas přidán 8. 06. 2021
  • I know a LOT of you have been asking for the lower body portion of the IK tutorial, and it's finally here! In this video, I'll show you how to use procedural animation to get your character to walk!
    Hey, devs! It's been a few weeks since we've done a proper tutorial! I've had a lot of requests to do the second half of my upper body IK tutorial, and today is the day! We'll use a mix of Unity's built-in Inverse Kinematics and Animation Rigging package, as well as coding a procedural animation. There is a decent amount of coding, and I show you all the code for free, but if you want a more convenient option, feel free to download the Unity asset by supporting me on Patreon!
    📺 Watch Next: • What Do I Need to Beco...
    🥽 Enroll in the (now FREE) VR Creator Academy: skool.com/vrcreatoracademy
    #vr #ik #unity

Komentáře • 74

  • @MusselPump1
    @MusselPump1 Před 3 lety +10

    I love these smaller channels because they always respond and help people out and they put a lot more thought into their videos

  • @noah_hines
    @noah_hines Před 3 lety +4

    Hey Justin, just wanted to say I appreciate your channel and look forward to your next video! :)

  • @AnthonyCerrato
    @AnthonyCerrato Před 3 lety +1

    Glad to hear the channel is growing! Exciting stuff man 👍

  • @sulcatathor9946
    @sulcatathor9946 Před 3 lety +3

    As much as I want the hand tutorial, don't stress yourself out man. Do what makes you happy. I'll be here supporting you anyway I can.

    • @devchicken1482
      @devchicken1482 Před 3 lety +2

      Agreed! it is a very fasinating but time consuming topic, dont want to you to stress yourself out.

    • @JustinPBarnett
      @JustinPBarnett  Před 3 lety +1

      Wow thank y'all so much, you're so kind! 😊

  • @JustinPBarnett
    @JustinPBarnett  Před 3 lety +7

    Download the Project (for FREE): www.vrcreators.io/codedownloads

  • @syntaxdefinition3055
    @syntaxdefinition3055 Před 3 lety +2

    Amazing content man! Subscribed.

  • @ProdigiaGames
    @ProdigiaGames Před 3 lety +1

    Great stuff as always!

  • @computer__eyez
    @computer__eyez Před 3 lety +1

    I appreciate the amount of detail you put into these videos. I recently took up Quest 2 development courses on Udemy.
    Being a VR game designer, the ability to rapidly create a prototype & test design theories / mechanics is a must! Coding syntax is difficult, but extremely important.

  • @martinfultot5756
    @martinfultot5756 Před 2 lety +3

    Very cool, thanks a lot for this.
    Quick tip:
    To make it more anticipatory you might want to take velocity and acceleration into account. The body leans forward to align to the gravito-inertial axis, so during forward acceleration the center of mass is expected to be outside of the base of support, and the feet should adapt to that, and as you reach steady state velocity the gravito-inertial axis becomes straight up again.

    • @JustinPBarnett
      @JustinPBarnett  Před 2 lety

      Yea I've been looking more into PID controllers and stuff. That's what I use in my Gorilla Tag video

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

    Also please add the words "procedural animation" to your video titles. I've searched for procedural animations on youtube for 3 months and this tutorial never popped up in the results, although it's the best one I've found so far!

  • @0noSendai
    @0noSendai Před 3 lety +5

    About the direction of the feet: When you use the snapturn, the feet don't adjust position, they stay in the direction of the headset at the moment of startup. They also don't rotate if you turh the headset around and look/walk in another direction.

    • @JustinPBarnett
      @JustinPBarnett  Před 2 lety

      Join the discord if you're still having issues and we can help you troubleshoot!

  • @imdixon8108
    @imdixon8108 Před 3 lety +1

    Really love the tutorials! Have you considered doing a melee weapon sort of tutorial? I've not been able to find one on youtube, and it's quite hard to make feel good using the XR toolkit. All sorts of buggyness with handling physics based interactors and walls, floors, movement, and how they all line up. Probably be a big task but could really set you apart!
    Another idea I could suggest is how to handle leaning over desks or tables to pick things up while using continuous movement. At the moment you have to sort of decide whether to let a player enter a wall/object or push them back, and allowing desk leans can be tricky, without the player being able to pop through things or get to places they shouldn't be. I've sort of just hybridized both and haven't come up with a way to handle this, though I haven't spent much time thinking about/working on it.
    Food for thought!

    • @daxseay4252
      @daxseay4252 Před 2 lety

      I would also love to see a tutorial going over that very much

    • @JustinPBarnett
      @JustinPBarnett  Před 2 lety

      Thanks for the ideas! I'd love to do a melee weapon tutorial! And the leaning over things problem is a big one!

  • @daxseay4270
    @daxseay4270 Před 2 lety +3

    Please show us how to setup hitboxes on our character

  • @Praedyth_
    @Praedyth_ Před 2 lety +3

    Having a few issues with the rotation of feet and also legs constantly moving even when still, seems like no matter what rotation offset i put in the feet find a way to twist on play, and the legs often constantly walk even when standing still. Also the rig stays still unless i put the line: isFirstStep = false; inside the if statement where we check it

    • @JustinPBarnett
      @JustinPBarnett  Před 2 lety

      Join the discord and we can help you troubleshoot!

  • @martinfultot5756
    @martinfultot5756 Před 2 lety +3

    Also I would make sure the second line below void update() reads transform.localRotation rather than transform.Rotation. When you pivot the root object the feet will not follow otherwise.

  • @isni1946
    @isni1946 Před 3 lety +1

    Hello, once I build my game on my quest 2, I can't find it in the apps menu, I have to rebuild each time I want to try my game, any solution?

    • @JustinPBarnett
      @JustinPBarnett  Před 3 lety +1

      It'll be in the 'Unknown Sources' section of your apps. Won't show up with all the others from the store

  • @PuppyGamerYT
    @PuppyGamerYT Před 3 lety +1

    Hey, I wanted to ask this cause I can't find anything on it and you are creating vr tutorials. I want to create a program that can run over other programs, for example if I want to show something like a watch on my wrist while I am in other vr games, is that possible? Kinda like that program that shows your stream chat on the back of your hand while you are playing games. And can you maybe make a tutorial about it?

    • @JustinPBarnett
      @JustinPBarnett  Před 2 lety

      Cool idea! Seems like it'd be a little complicated. I'll look into it.

  • @ricardoi8171
    @ricardoi8171 Před rokem

    How do I disable again the rig to not show this blue Rig all the time ?? Cant find

  • @hennoreyneke4238
    @hennoreyneke4238 Před rokem +1

    Hey man awesome tutorial i have learnt so much!! My feet targets are not updating though i can see the next step location but my feet targets wont move to _newPos do you know what my problem is?

  • @joshuat07
    @joshuat07 Před 2 lety

    Hey. I followed your tutorial but my foot targets don't move.
    Can you help me?

  • @betterlifeexe4378
    @betterlifeexe4378 Před 2 lety +1

    I'm probably going to use the finalIK solution, I know the ragdoll solution he makes is pretty good (if a pain in the butt). Partel gives fairly good tech support too. BTW, Justin, Could use your feedback on the LBHT beta activity board. let me know if your having problems with the program.

  • @fernandoangelrodriguezcort6080

    is it possible to obtain each bone local rotation? I'm interesting in modelling a full body VR avatar though IK and use that to teleoperate a humanoid robot. I need help figuring out how to get each joints' angle :(( beautiful tutorial btw

  • @brandonhalvorsen2185
    @brandonhalvorsen2185 Před 2 lety +1

    Did the procedural hand video get made? I looked through the videos after this one and none seemed to cover that topic.

  • @stail2394
    @stail2394 Před 2 lety +1

    Can you make a video on sound effects like for when things collide? I've been having trouble finding a video on it that isn't 3 years old

    • @JustinPBarnett
      @JustinPBarnett  Před 2 lety +1

      Yea I can definitely do that!

    • @stail2394
      @stail2394 Před 2 lety

      @@JustinPBarnett great! Looking forward to it!

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

    yo a good idea for another video could be climbing, have not seen many recent videos covering it!

  • @EEGAR
    @EEGAR Před 3 lety

    devlogs will definitely be more interesting and get more views, you should do more of them

  • @halo2masterX
    @halo2masterX Před 3 lety +1

    Will you be doing any unreal content too? I found these videos interesting enough to watch them anyways but it would be awesome to see some unreal content ^^

    • @JustinPBarnett
      @JustinPBarnett  Před 2 lety

      Probably not 😟 I'd have to learn a whole new system

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

    Hi so was doing this tutorial and my player legs dont move and the red dots that get generated just constantly go back and fourth as if my player is taking steps

    • @proclaimedgamers5708
      @proclaimedgamers5708 Před 2 lety +1

      Ok so i got the legs to contact the ground and everything the knees will bend and stuff but still no movement and the red dots are doing the same thing

    • @lageinable
      @lageinable Před 2 lety +1

      @@proclaimedgamers5708 same problem(

    • @JustinPBarnett
      @JustinPBarnett  Před 2 lety

      Join the discord and we can help you troubleshoot!

  • @daniel.luneng
    @daniel.luneng Před 2 lety

    But how do you fix jumping with ik? I want to have jumping in my game.

    • @JustinPBarnett
      @JustinPBarnett  Před 2 lety

      Join the discord if you're still having issues and we can help you troubleshoot!

  • @grvishakaguru
    @grvishakaguru Před rokem

    Hi Justin, Your tutorial is amazing and thank you for the streamlined workflow. I have sent you the mail-related package concern, Need your support. Looking forward to seeing Hand tracking XR interaction toolkit with avatars like Ready player me tutorials including grabbing and poke gestures.

  • @sixdagamer5492
    @sixdagamer5492 Před 2 lety +1

    the moment i can make an item in the invention store imma make a free IK auto IK maker

    • @JustinPBarnett
      @JustinPBarnett  Před 2 lety

      There's someone in our discord working on that exact thing right now!

  • @hackermonke6531
    @hackermonke6531 Před 3 lety +1

    can you make a video about adding weight to objects

  • @miriamnama9380
    @miriamnama9380 Před 10 měsíci +1

    i sat throught the whole thing just cause he too cute 😆

  • @communistdog4620
    @communistdog4620 Před 3 lety +1

    Am I the only one having a problem with the steam VR plugin when using a quest/quest 2 when everything is set up it just shows a black screen. I asked here because he's like the most active CZcamsr to their comments.

    • @0noSendai
      @0noSendai Před 3 lety +1

      I have exactly the same problem (when I upgraded the libraries from the previous upper body tutorial to match the ones specified in this tutorial), when I upgraded all the packages at once. I redid it upgrading them one by one, and intermittent playing the project, and then it worked. Maybe something went wrong when upgrading all libraries at once.

    • @JustinPBarnett
      @JustinPBarnett  Před 2 lety

      Hmmm steam is going to be a little different than OpenXR. They may be fighting with each other

  • @rage9695
    @rage9695 Před 2 lety

    maybe gorilla tag movement ?

  • @travisray5179
    @travisray5179 Před 2 lety

    Followed all of the tutorials to here and each one of them has been full of issues/bugs. This one didn't work at all. I would recommend other solutions on CZcams.

  • @adriantell7237
    @adriantell7237 Před 3 měsíci

    ey mate unpause ya website