Found a neat "feature" in this design. The "IK feet" are independently configurable, so if you shorten the step distance, length and height on one foot, the walker becomes a Limper!
That's awesome! Can you make it so one object can have both States? Imagine it being based on health, so that if you do enough damage to it, it starts limping?
The movement itself can be improved with AnimationCurves for the target lerps, and the only offset the legs need once moving is to start half the total max movement time of the other leg. The AnimationCurves can then also be lerped between to get running motion too as you decide how long each foot will remain on the ground.
Oh my God! It's amazing what you can convey in under 6 minutes! This is just crazy! This is one of the best explainer videos I've ever seen. Take that from someone who makes explainer videos for a living.
If anyone is looking for a way to do this with more points, use the ik chain constraint, you use the tip and the root and it does everything in between. Good luck 👍
Very important detail that they didn't include: The IK motion only appears when your game is running, so if it seems like your bones aren't moving at all, you need to start your game. I spent way too long trying to figure out what was wrong with my rig only to realize it doesn't work in the editor window by itself
Excellent resource on procedural animation. I highly recommend pairing this with the Codeer video that's been flying around. This is the simplest and cleanest approach to get things off the ground and start customizing from there. My only critique of the implementation is with the way the code attempts to understand the 'direction' of the next step. This system (check InverseTransformPoint against the body) totally breaks down if the agent takes a step directly to the right or left, causing the 'direction' to oscillate between -1 and 1 each cycle. Great work though! Got my procedural spiders working off this example.
Made it seems so simple. I have to try it out sometime. Once you have the code done you can quickly adapt it to new models faster than you can keyframe new animations
I always understood everything about procedural walking except how to make the foot move in an arc from point A to B. A sine wave... so obvious now. Thank you
I've downloaded the project and tried running the provided IKFootSolver code with everything setup, but no matter what I do the Leg targets don't move. I am using Unity 2020.2.6f1 so I don't know if it's just due to a newer version of Unity, but I can not get this to work as demonstrated.
Thanks for your comment Graham! Are you checking the terrain layer correctly? If I had to take a wild guess I think it might be related to the Raycast not being able to "find" and collide with the ground! Let me know if you have more question and I'll do my best to help! - André
@@unity Yeah I've tried that. It just seems like I'm either missing something fundamental because I can move the target by hand during game and the legs follow, but when I try to move the whole model the legs don't adjust as they do in the videos
@@greyp3Exact same problem here: Downloaded the example project (and the fitting unity version), video / game plays animation, but moving the walker in scene mode does not move its legs. If it helps, the red sphere is not moving either / gets not placed correctly in the beginning, if I try to recreate it in another project. Maybe that tells you guys how to solve this issue? (It somehow feels like the script execution in scene view is disabled... is there such a feature?) EDIT 1: adding the [ExecuteInEditMode] tag to the script fixed at least the spheres... legs are still not moving though (got a feeling that the transformation is not getting animated in edit mode)
[4:07] _Error 404. Info not found_ Maybe I'm too new, but I can't find the following variables: ♦ body ♦ footspacing ♦ terrainLayer This information is not explained in the video. I suppose that information can be obtained from previous videos? Like in "Prototype Series"? (Edit) I think body could be this.transform? At least you can download the project, thanks ;)
I don't know if it's just me, but for some reason, your walker works correctly only in one direction of the world (when rotating the game object around its axis (y), the steps are counted in the same direction as at the beginning (tied to a specific axis of the world) , thanks to the gizmo it is very clear that the steps are counted in one direction and in other directions the walker's legs cross and lie down.The other interesting thing is that I thought the problem was in the offset type variables or something, but they work well as local positions, so I don't understand what could be wrong... please help🥲
I know this was 3 years ago but, where is the project for this prototype series? The project on the download are the samples from the animation rigging samples.
You can easily substitute whatever IK solution you prefer. The actual leg animation happens in script and is not dependent on the Animation Rigging package.
im trying to procedurally animate a human all the way (like 100% no keyframes). the hardest part is by far the position of the hips relative to the characters root object
This is absolutely awesome and super easy to set up! I am going to have way too much fun with this! Only small bug, when I hit play my character falls half way through the floor. Usually this is because there is no animator attached to the body, but I have an animator attached to the body. Any ideas why that is still happening? Oh, and the foot IK is staying where it should, so I get this hilarious image of a guy's foot stuck inside him lol
If Anyone stumbles across this and cant get their bones to move with their targets, it needs to have an active animation. And also its tied directly to the animation clip. My way of playing with it was to click the recording button on the clip and then immediately unclicking the record button. Adding new rig children broke, but you can repeat the click/unclick process after clicking to a different object and clicking back. Its kinda frustrating when learning something and seeing something entirely different than whats in the video. =/ Still not sure why when I click the record button my entire ik bone system crumples to a center point. Progress though, right?
I started using the code from this video. Unfortunately, you don't get very far with these methods. I recommand to use coroutines and AnimationsCurves for lerping between two positions or animating the step. Also rotation isn't working well with this setup. (The double step animation also looks like a bug.)
This code is just a basic explanation, the rest is up to you. If you noticed he doesn't show the script in the inspector after he put the code. PS: the code works
I have a humanoid model that I'm trying to get to walk through this method. Unfortunately, the targets don't seem to place in the right spot. Instead, the target and hint place themselves at the same spot in the middle of the scene. Unity has no issue importing this rig, so I'm confused as to why this happens? Additionally, the targets don't seem to be visible by default.
Actually, I can't seem to really get any of this to work. The Foot Solver script only updates if my character is floating 4 units above the ground. The feet never position themselves as I move the character. Gonna dig into the project and see what I messed up
Another great prototype! Procedural animation is a fascinating subject, I really need to research it at some point.
Hello. I have seen your channel. Can you pls make a walking system like Dani did in billy
Bro can you make tutorial about procedural animation
Yeah well, i need it sire, I cannot get my spider walking;(
PLLLLLLLSSSSS Make a procedural animation Series 😢
Whoever good in code but sucks at animation can understand the number of endorphins flow in my body right now
I feel you brother
same here
The best thing is, you don't even need to be good at modeling to create your own assets for this
The workflow for creating rigs is pretty simple
Well i know how to animate but dont know how to code but stil i want to learn this lol
We do... We do...
Always impressed by how few lines of code can create awesome results in Unity
Found a neat "feature" in this design. The "IK feet" are independently configurable, so if you shorten the step distance, length and height on one foot, the walker becomes a Limper!
That's awesome! Can you make it so one object can have both States? Imagine it being based on health, so that if you do enough damage to it, it starts limping?
@@potaterjim like monster hunter ?
This tutorial is so complete and satisfying to watch great job andre!
Go ahead, do your tutorial too please :)
The movement itself can be improved with AnimationCurves for the target lerps, and the only offset the legs need once moving is to start half the total max movement time of the other leg. The AnimationCurves can then also be lerped between to get running motion too as you decide how long each foot will remain on the ground.
This was incredibly useful for a unity official tutorial, so much useful information condensed in five minutes, great job Andre!
Sooooo important! The less keyframing we have to do the better.
Needed to learn this today, video published today. Perfect.
I was legitimately JUST looking for procedural animation tutorials. Awesome vid!
These are great, keep them coming. Good work Andre!
Codeer - uploads video*
Unity - 😏
I was literally thinking that 😂
OUR video
Oh my God! It's amazing what you can convey in under 6 minutes! This is just crazy! This is one of the best explainer videos I've ever seen. Take that from someone who makes explainer videos for a living.
Came for mechanics, stayed for André's voice 😀😄☺
Thank you so much. I really like learning unity. I waiting for video from official channel every day
Although I didn't fully understand the explanation, I am quite excited we can now animate using code without creating keyframes
If anyone is looking for a way to do this with more points, use the ik chain constraint, you use the tip and the root and it does everything in between. Good luck 👍
Finally a video from unity that explains this, great!
you guys are crazy, this is excactly what i needed thank you so much
This is by far the best Unity series, maybe rivaled by Open Projects. Keep it up!
I've been looking for this system in Unity! Great work and hopefully we can also make other procedural character movements
Very important detail that they didn't include: The IK motion only appears when your game is running, so if it seems like your bones aren't moving at all, you need to start your game. I spent way too long trying to figure out what was wrong with my rig only to realize it doesn't work in the editor window by itself
ty lol
Maybe adding "execute in edit mode" Option to your script fix that problem i am not sure
lifesaver
Saved me from spending a long time searching for the fix myself lol ty
codedeer already taught me this :) but nice to see your version
i actually needed this for my game... i have tried to find it but never did until now. Thanks
i feel you
I'm only just seeing this now, but still, such an amazing demo and thank you for the wonderfully succinct explanation!!
Yay! This is how i am gonna teach my son how to walk!
Yes this is what I was looking for so many days thanks a lot man really appreciate it 😊🔥❤️
This is just what I needed to learn about. Awesome timing :-)
it was great to share this unity lesson!
This is precisely what I needed! Thank you for being awesome! I love you!
This is amazing, and code pieces are very helpful!
You know what would i love to see this prototype turned into a full fledged game made by UNITY team that would be amazing
I just started dealing with it today and am feeling very excited
Excellent resource on procedural animation. I highly recommend pairing this with the Codeer video that's been flying around. This is the simplest and cleanest approach to get things off the ground and start customizing from there. My only critique of the implementation is with the way the code attempts to understand the 'direction' of the next step. This system (check InverseTransformPoint against the body) totally breaks down if the agent takes a step directly to the right or left, causing the 'direction' to oscillate between -1 and 1 each cycle. Great work though! Got my procedural spiders working off this example.
Please do more procedural animation stuff! Tentacles that are jiggly but able to grab things next perhaps? 🤔
Made it seems so simple. I have to try it out sometime. Once you have the code done you can quickly adapt it to new models faster than you can keyframe new animations
I always understood everything about procedural walking except how to make the foot move in an arc from point A to B.
A sine wave... so obvious now. Thank you
This is freaking awesome!!!
This is what I wanted to learn about! Thanks
Unity’s channel is famous for reading our mind!
Was planning to work on this myself!
I will learning this and use in my second game.
Thank you!
well this video have given me some amazing things to work with. i gota allot of playing around to do in unity now.
Yeah, i was waiting for this tutorial long time
God bless Mix and Jam.
Amazing as always keep up the videos thank you!
Are you kidding me! I was literally thinking about adding procedural animations to my game a minute ago!
Love to see shader programming for low end mobile devices
I've downloaded the project and tried running the provided IKFootSolver code with everything setup, but no matter what I do the Leg targets don't move. I am using Unity 2020.2.6f1 so I don't know if it's just due to a newer version of Unity, but I can not get this to work as demonstrated.
Thanks for your comment Graham! Are you checking the terrain layer correctly? If I had to take a wild guess I think it might be related to the Raycast not being able to "find" and collide with the ground! Let me know if you have more question and I'll do my best to help!
- André
@@unity Yeah I've tried that. It just seems like I'm either missing something fundamental because I can move the target by hand during game and the legs follow, but when I try to move the whole model the legs don't adjust as they do in the videos
@@greyp3Exact same problem here:
Downloaded the example project (and the fitting unity version), video / game plays animation, but moving the walker in scene mode does not move its legs.
If it helps, the red sphere is not moving either / gets not placed correctly in the beginning, if I try to recreate it in another project.
Maybe that tells you guys how to solve this issue? (It somehow feels like the script execution in scene view is disabled... is there such a feature?)
EDIT 1: adding the [ExecuteInEditMode] tag to the script fixed at least the spheres... legs are still not moving though
(got a feeling that the transformation is not getting animated in edit mode)
Woow, this is great!! Thank you!!
A procedural tutorial 😍😍😍❤️ from unity 😍
[4:07] _Error 404. Info not found_
Maybe I'm too new, but I can't find the following variables:
♦ body
♦ footspacing
♦ terrainLayer
This information is not explained in the video.
I suppose that information can be obtained from previous videos? Like in "Prototype Series"?
(Edit)
I think body could be this.transform?
At least you can download the project, thanks ;)
I don't know if it's just me, but for some reason, your walker works correctly only in one direction of the world (when rotating the game object around its axis (y), the steps are counted in the same direction as at the beginning (tied to a specific axis of the world) , thanks to the gizmo it is very clear that the steps are counted in one direction and in other directions the walker's legs cross and lie down.The other interesting thing is that I thought the problem was in the offset type variables or something, but they work well as local positions, so I don't understand what could be wrong... please help🥲
I'm using a quadruped (robo dog thing) and having the same issue
I needed to know the logic behind interpolating the mainBody with respect to its feet bones. Sadly I didn't find it in there. Great help tho!
amazing knowledge in 5 min!
Clever!
super cool
Looks Really Cool :D
Love it ! Thanks
I know this was 3 years ago but, where is the project for this prototype series? The project on the download are the samples from the animation rigging samples.
Pretty awesome.
Looks like a great project for the weekend :)
Haven't I have seen this before... oh yes... Codeer ^^
Short: Nice! :-) Thanks! :-)
this is really handy
Finally, a weapon to surpass Metal Gear.
Awesome
800 like , and 1 dislike .
That 1 dislike from unreal game developer.
And his mom and dad.
Or maybe that's because the end result looks like having a limp
they called the uncle you see
If only the animation rigging package had not so many bugs/glitches this would actually be interesting
You can easily substitute whatever IK solution you prefer. The actual leg animation happens in script and is not dependent on the Animation Rigging package.
im trying to procedurally animate a human all the way (like 100% no keyframes). the hardest part is by far the position of the hips relative to the characters root object
this is impressive
Why if I do not create this empty parent object called "root", it barely works as expected?
Fantastic
How can I download the package?
That right click on the component to find options is insanely counter intuitive... Great demo though.
Очень круто :) спасибо :)
What is “body” in the code? why is it not working?!
303 likes and 0 dislikes. u re da best
wow so cool
Anyone else find this guys voice attractive....
For some reason my targets are going all over the place, anyone has an insight into what I could be doing wrong?
Well that's work only on z axis in project
does anyone know how to fix the roatation of the foot? my feet are just upside down. please help!
What if I had one more bone in my leg past what the two bone IK constraint would let me put in?
This is absolutely awesome and super easy to set up! I am going to have way too much fun with this!
Only small bug, when I hit play my character falls half way through the floor. Usually this is because there is no animator attached to the body, but I have an animator attached to the body. Any ideas why that is still happening? Oh, and the foot IK is staying where it should, so I get this hilarious image of a guy's foot stuck inside him lol
Found my problem! I had attached the Rig to the Armature component, not the base component. Working nicely now!
Reminds me of Spyder!
how does the "Check to animate on ly when one is on the ground" work?
If Anyone stumbles across this and cant get their bones to move with their targets, it needs to have an active animation. And also its tied directly to the animation clip. My way of playing with it was to click the recording button on the clip and then immediately unclicking the record button. Adding new rig children broke, but you can repeat the click/unclick process after clicking to a different object and clicking back.
Its kinda frustrating when learning something and seeing something entirely different than whats in the video. =/
Still not sure why when I click the record button my entire ik bone system crumples to a center point. Progress though, right?
what needs to have the animation
Thank you so much!
What's the difference between this and Umotion?
Two bone IK Cointraint dident show up for me under components, adding "using UnityEngine.Animations.Rigging;" to one of my scripts fixed the issue
cool stuff
Great👍
Can this be done using a three legged creature?
4:32 We will now proceed to write our HeeHee script without grabbing our junk.
how to install ur packatge?
for me when I put in the IK solver code an error comes and it says that the name 'body' does not exist in the current context
What is "body.right" and "footSpacing" in 4:09
"currentPosiiton" in 4:33
"body.right" is a Tranform for the main Body and "footSpacing" is a float which controls how far (to the left or right ) the foot is from the body.
@@obscure045 Thanks so much!
cool
And the download link?
I started using the code from this video. Unfortunately, you don't get very far with these methods. I recommand to use coroutines and AnimationsCurves for lerping between two positions or animating the step. Also rotation isn't working well with this setup. (The double step animation also looks like a bug.)
This code is just a basic explanation, the rest is up to you.
If you noticed he doesn't show the script in the inspector after he put the code.
PS: the code works
Can you guys make more videos about shaders ?
We'll certainly put that into consideration :)
I have a humanoid model that I'm trying to get to walk through this method. Unfortunately, the targets don't seem to place in the right spot. Instead, the target and hint place themselves at the same spot in the middle of the scene. Unity has no issue importing this rig, so I'm confused as to why this happens? Additionally, the targets don't seem to be visible by default.
Actually, I can't seem to really get any of this to work. The Foot Solver script only updates if my character is floating 4 units above the ground. The feet never position themselves as I move the character. Gonna dig into the project and see what I messed up
@@IgnoreSolutions i have the same exact issue, did you find any solutions?
same problem here
BROOoo I have the same problem uuuughhh i hate it