Inverse Kinematics in Unity: How to Use IK to Improve Your VR Games
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
I love these smaller channels because they always respond and help people out and they put a lot more thought into their videos
I aim to please! 😜
Hey Justin, just wanted to say I appreciate your channel and look forward to your next video! :)
Thanks so much!!
Glad to hear the channel is growing! Exciting stuff man 👍
Thanks!! Having so much fun with it!
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.
Agreed! it is a very fasinating but time consuming topic, dont want to you to stress yourself out.
Wow thank y'all so much, you're so kind! 😊
Download the Project (for FREE): www.vrcreators.io/codedownloads
Amazing content man! Subscribed.
Thanks!!
Great stuff as always!
Thank you!!
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.
Thanks so much!
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.
Yea I've been looking more into PID controllers and stuff. That's what I use in my Gorilla Tag video
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!
Thanks for the idea!
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.
Join the discord if you're still having issues and we can help you troubleshoot!
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!
I would also love to see a tutorial going over that very much
Thanks for the ideas! I'd love to do a melee weapon tutorial! And the leaning over things problem is a big one!
Please show us how to setup hitboxes on our character
That's a good idea!
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
Join the discord and we can help you troubleshoot!
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.
Good tip!
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?
It'll be in the 'Unknown Sources' section of your apps. Won't show up with all the others from the store
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?
Cool idea! Seems like it'd be a little complicated. I'll look into it.
How do I disable again the rig to not show this blue Rig all the time ?? Cant find
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?
Hey. I followed your tutorial but my foot targets don't move.
Can you help me?
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.
Final IK is an amazing asset!
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
Yes you can get local rotation!
Did the procedural hand video get made? I looked through the videos after this one and none seemed to cover that topic.
Yea haven't gotten around to it yet
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
Yea I can definitely do that!
@@JustinPBarnett great! Looking forward to it!
yo a good idea for another video could be climbing, have not seen many recent videos covering it!
That's on the list!
@@JustinPBarnettlegend cheers!
devlogs will definitely be more interesting and get more views, you should do more of them
Will do!
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 ^^
Probably not 😟 I'd have to learn a whole new system
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
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
@@proclaimedgamers5708 same problem(
Join the discord and we can help you troubleshoot!
But how do you fix jumping with ik? I want to have jumping in my game.
Join the discord if you're still having issues and we can help you troubleshoot!
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.
the moment i can make an item in the invention store imma make a free IK auto IK maker
There's someone in our discord working on that exact thing right now!
can you make a video about adding weight to objects
Yea that's a good idea!
i sat throught the whole thing just cause he too cute 😆
😊
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.
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.
Hmmm steam is going to be a little different than OpenXR. They may be fighting with each other
maybe gorilla tag movement ?
Done!
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.
ey mate unpause ya website