# NEXT GEN VR Physics - New Adaptive Leg System! (i7F4V9K6SlU, 1959s) [Music] it's me NSO welcome back to another VR video today we are back in Project TX and we are going to be looking at a new little uh well not new but the proper version of my new leg system uh yeah I just said new again but there we go right um I wanted to look at the leg system today um it's it's the new sort of advanced uh fully adaptive procedural legs yeah what I want you to see throughout this video is that there are no animations at all on anything on the body system like literally nothing the fingers aren't animated the the feet are completely procedural you can see them crossing over I'm going to try and fix that soon but right now everything is 100% procedural it's all just maths and uh sort of uh other systems Going On Here There and Everywhere logic stuff right uh but other than that I did want to talk a little bit about some of the things that the things that were mentioned on the comments in the last video as well um first of a few people mention this a few people a little bit critical but that's expected um some people did say uh this is nothing new this uh this is nothing new in that case uh yes you are correct this is definitely nothing new here's a video from about four years ago where which was the start of this project project TX I put that on my channel uh you can have a look at each of these videos on the channel uh a video from probably a year before that which is uh active ragd doll physics in VR so before project TX but it was Again full full ragd doll physics based character control and uh and a video before that as well which is when I first did physics in VR this is like before before I even had controllers like I did I was using a DK2 at this time um this is the PS2 PS2 controller I'm using in hand and a Leap Motion controller to move my hands for hand tracking yeah so I've been doing this for quite a while those videos all uh I'll put in the links in the description as well I'll put the links and uh yeah they're they're quite old videos but this stuff it took me a long while to actually get it stable so yes you are correct it's not new I've been doing it for years I know you didn't mean that but I'm going to take it as that but there we go um so yeah other than that a lot of people don't fully understand the the physics Concepts here uh so I'm going to switch no not the view mirror I'm going to switch over to my camera view so you should be able to see from my camera view I don't know if you can see the actual oh you can see the actual things right okay so I have this thing called the debug for the for the scale body and what you can see here is the actual in fact I'm going to switch the controllers on is the actual tracking points right if I if I hold this box properly you can see here's the actual calculated tracking uh tracking points that my system is targeting right and uh as you can see it actually tries to match that and you can see the weight of this object is weighing down on my hand so I can't actually hold it as as it as I want it right but if you look carefully you'll see that you can never really see those lines right no matter how fast I move my hand unless of course my controller tracking just completely dies uh but you know you can see here that it's full physics but it's completely tracking like really really fast so it doesn't oh I'm just going to break these controllers at one point uh I'm not not used to using these with the ring above them as you can see in the in the game you can see that I use the controllers from the Oculus cv1 which actually they're on the table there but there we go yeah so you can actually see the speed of the tracking now the way this works is that it doesn't slow things down when you've got a heavy object on you you see if I track perfectly with my hands here you can see that they swing at the speed that I'm actually moving my hand but that's only because my hand is able to actually accelerate at that rate in the game right if I start accelerating much faster you'll see that it it it cannot keep up right so there we go it completely swings out of place so I highly recommend you try this in any little uh world that you've got here in in any VR project you've got where just hold your hand one side and then swing it accelerate it and then stop right accelerate to 90° and stop and see what happens to the object very often you'll see that it just does this which is just un it's just not what I think would happen I'm pretty sure the entire arm will try and catch the weight of this object right and that's because all the strength is in these muscles right so if I drop this here and walk over there whoop you can see here that I'm on a ladder oh in fact I'll not use a ladder woo we'll use this pole so here we go very easily I can just climb like so right one hand easy I can lift my hand really really easy but if I simply put my hand out right and you can see me putting my hand out you can see I can't actually lift it right I'll show you that from the camera come from the camera view uh there we go right so again uh we'll Zoom you in so here we go nice and easy if I put my hand in I can lift my hand really really easy I can lift my body quite easily but with my hand out nope right and that's it's it's all in the muscles here so it depends on how you actually control your body that will determine whether it's nice and easy to climb or whether you can't actually climb at all right and that's just how it is but this whole time of course you should be looking at how the legs move because that's where things get really really cool so let's look at the leg system now right and what's actually going on here let's I want to talk about this a little bit cuz I think it's it's kind of missed out on almost every procedural leg system that exists the way people think of legs is that there's sort of a timer where half the timer one foot is up and the other half the other foot is up right so you think okay you've got uh you've got step and then as it touches the ground the other foot lifts up right boom and Boop and and and it switches foot right but that's just not how it works in reality um well it is but only when you're moving really really slow it's like if you're if you're moving like this fair enough but once you start walking at a natural pace or you start running then things start changing right suddenly my feet aren't always on the ground there isn't always one foot on the ground uh so it's not it's not really this and then switch it's more you start switching about here right your foot is halfway off the ground obviously you can't see this in the game but just have a look at the camera and you start to switch to your other foot before it lands so at that point you have both feet in the air and that's actually what's happening here which is why it doesn't look like my my stepping rate is just increasing right I'm not looking like that's not what we want to do we want to actually change the speed of the feet um not necessarily the speed because humans are lazy as with any other animal and the nature of that is that you want to try and move with the least effort possible which means you're not going to increase your stepping rate you're just going to you know you're going to smoothly transition to uh to to lifting your feet at the same time so that you can actually launch forward bouncy bouncy bouncy right and that's what you end up with you can see it works really really nicely even when I start crouching things look all right and it gets even nicer of course cuz it can handle right actually being on other ground as well so let me switch off the controllers here I'll switch off the debug body as well so now you can just see the real stuff and here we go we're on moving ground and I've been thrown off there we go and you can see on moving ground it looks pretty cool and of course I can follow it and get thrown off there you go really really nice right so this is the new leg system it looks really really good and the The Annoying Thing is um I wrote this system and then I wanted to adapt it for swimming and working on swimming resulted in me realizing there were some problems with the uh adaptation from legs to the hip so there was some trouble with the hip and there was trouble with the rest of the body there was trouble with the shoulders there was trouble with the hands everything got out of place and offset and all of this stuff and I basically rewrote all of the systems right hence it took 3 weeks to write a foot foot movement system procedural legs because uh pretty much everything broke everything broke so I've Rewritten everything right there we go I've Rewritten the entire system which is it's actually much much nicer now you can actually see as I T pause it should be tusing in game right which is that's just really really nice right it should actually be reaching the limits of my arm as my arm is actually hitting the limits and then the same thing going forward right so same thing pretty much hitting the limits of my arms and then even going up right it should be hitting the limits of my arms just there it should just hit the limits of my arms in all directions which is very very difficult to do because in reality it's not it's not just an arm length right as you lift your arm the shoulder moves up and down it lifts and so you have to figure out all the mechanical structures there and get them as accurate as possible in order for the limit of your arm to be to be accurate and with a system like this you need to get those limits accurate otherwise you know you can't move the hand properly because remember the muscles impact how things move but the end result of of course is that we have swimming we and it looks way nicer than it was before right so I've got I've got actual kicking here I can just kind of stay in place and you can see nothing happens but as I kick as I move and you can see the character tries to kick and then of course if I use the Crouch a little bit you can actually start seeing that movement look really really nice right this is beautiful and then of course you can see how it transitions out of the water as well when I simply lift up here grab this and there we go very very beautiful right it's it's all about getting that system really really smooth really transitioning everything properly and that matters because remember everything is physics right everything the whole arm structure is connected to the shoulders connected to the real body body and it's all colliding right it's all absolutely colliding so if you pop over to here you'll be able to and I hope that I haven't got any of this colliding with the camera so the camera should be able to swing right through there you go which means now I can actually just kind of do this uh you might need to zoom in though otherwise I'll just place you there oh you you're kind of inside it but that's okay cuz you lift up a little bit here and what's going to happen here is you're going to see me try and crawl and you'll see how the legs kind of adapt and the whole body fits into such a tiny Gap right so here we go we've got a tiny little Gap here's what it looks like from my view right this is a hand look at the size of this Gap tiny tiny little Gap and we're going to crawl through it right so here we go firstly I'm going to lower my body and you'll see that the hip kicks out quite a bit and I don't really want that it's a bit too much we're going to we'll move you over to there right and maybe you can see me maybe you can't zoom you out there we go you might be able to just about see me and you'll see I'm crawling through and now coming out the other side uh coming out the other side and you can see how the flexible hip really works quite nicely s beautiful it's Absol absolutely wild it's crazy but of course that can only be done when you've got no fakery going on right so there's no physics capsule or anything like that there's no character controller object that is tea time I'll be going in a little bit but that's okay we've got a little bit more to see you know there's none of that fakery going on it's just all a ragd doll and the actual collisions happen on the character body right which is why here and then I can actually lean over things as people mentioned in the in the last video as well comments in in the last video I can lean over things only because the Collision is at the actual hip of the body right it's the actual hip the actual spine the actual chest everything you see is colliding legitimately right it's colliding legitimately as you expect which is why that thing behind me there right is just it's just a a a sphere it's just a ball right but it's a very very heavy ball so here if I try and pick it up you can see in the real world that I'm I'm lifting it quite high right if I put the controllers on o there we go you can see I'm trying to lift it and I just can't get it off the ground you can see my whole body has lowered it's too heavy for me to lift so of course I can connect the Rope to me to to me I can connect the rope from it to my foot and now you can see how it actually pulls the foot long it's beautiful right it's absolutely absolutely beautiful and here's me trying to climb now trying to climb with that hanging off my foot you can see here no matter what I do I just can't climber up right so there we go I try and climb we'll move the camera over to there and try and climb I can lower my body I'm trying to crawl now it looks a little awkward because obviously my my hip is nice and strong it can actually kick out quite a bit but the feet just can't lift right so there we go and you can see trying to move here we go I'm running I'm running nothing is I'm not moving I'm going to work a little bit on the idea of the foot of when when there's one foot able to actually ground itself here but there you go you can see I just can't move properly and things get really really crazy when let's just try and drag this along you know what just come with me things get really crazy when I drop into water with one of these these here right so there we go now you drop this into water and dear and now now I'm screwed right because now I'm going to have to try and clamber out and of course I can't right so there we go what's going to happen now remember this is hanging on the ragd doll leg right which is hanging off my body and it's completely stopping me from climbing over to here right so of course once I drop into water now I'm going to try and swim off and I'm trying to swim up right I'm actually pushing my right hand log stick up as well to get my up my upward kick and you can see I'm not able to actually float back up now of course because we're in water I'm able to kind of lift it right it's it's very heavy but I'm able to lift it and there we go so the only solution now cuz I'm I'm going to drown now I'm I'm literally I'm there I'm stuck this is what happens when you mess with Captain Jack Barrow um uh or or the other way around uh whatever beard this beard the the pirate they will attach you to something heavy and drop you into the water and Say Goodbye so of course there's a solution and you can see it right there in the background we're going to have to pick oh there we go pick this up I feel like a real drowned pirate right now and there we go we've got a really powerful fan which does not look anything like a fan because I'm very lazy and I'm not doing the graphics yet and we just have to get over here and let it launch woohoo it's beautiful right come on Move Along move along just go it's so heavy right there we go just just keep moving keep moving keep moving just pull the ball along so that I can get over here and we can detach it wonderful absolutely beautiful but it gets even more awesome than that because of course right of course this whole leg system is not just designed for me and my height now I'm an eggy boy right and you can see here that it still looks really really good right it's still right so I'm an eggy boy but you can see now it just looks legit right it looks really cool I'm still hopping over these objects I still have the ability to grab things and it just works it just works it's really really cool and then of course we can attach it here so there we go now it's attached to this guy's foot and you can see because he is heavier and he has the ability to move a little bit more right he can actually pull it along quite easily right there we go beautiful but of course this system doesn't just work perfectly with any character model that is very humanoid things get really cool when we take it that side you'll notice that I've actually increased my performance a little bit I've got rid of all the models just showing up I haven't done any performance work or optimizations yet so uh everything is just is just perfectly fine it's it's it's as it is it's all very debugyoshi might have wobbled a little bit there but it's okay that's fine and you'll notice that this time unlike before I can actually move around like a T-Rex and you can see my arms still right so there we go look hello it's me the dinosaur and you can see here that as I run the legs look look about right right it looks it looks cooler oh I don't want to drop in the water there hey you can see this is really cool right so I'm standing completely over the water it's look at where my controllers are right it's just crazy this is it's it's Bonkers now of course when I look down you'll notice that the feet do float a little bit maybe there's a little bit of work to do that's because this is a an unexpected character right it's just not how things would be in reality and of course it gets a little bit Wibble wobbly when I jump because I've done no fixes or anything like that woo and then switch things get a little bit crazy right a little bit weird a little bit awkward someone asked which I I think is is kind of self-explanatory but someone did ask um can you pick up a ladder and then just you know place it down and climb it right and of course of course that's the case right so here we go we've got a ladder sorry camera is a little jumpy there um but there we go can I pick up a ladder and just while holding it in physics right just plunk plunk it down you know here it is held in hand and here it is me climbing right so of course yes you can you can grab a ladder you can climb it and then you grab over here and of course I can show you a little bit of zip lining technically but uh right now we can just wee and there we go right so that way is easier and of course we've got some Physics stuff here woo now I haven't done all of the Ley Ley stuff for when you're swinging around so I could make this nicer but for now it just kind of looks a little bit straight a little bit kind of vertical but that's fine oh no I missed and my arm is going a little crazy I know uh there's a few fixes that are needed a few fixes that are needed for the arms there but of course beyond that it just works really nicely right it's it's all very nice and of course all of this is perfectly fine as is traditional uh with the Nimo project at this point I'm going to have to do this just because you know it's it's necessary at this point all of this works perfect perfectly fine in any form of adaptive system oh let me just get uh get me centralized is this a good place I'm not going to hit the blooming curtains this time there we go right and then a hop and a walk right so there we go all of this perfectly acceptable here you can grab whatever you want and of course as I'm running it all looks really nice right so there we go all perfectly fine F and now I can swim and of course it also uses the the the feet kick based on my movement Direction same as uh same as before right so you can see here I can see my body here kicking and if I don't want to kick I just I just don't do that right so there we go I can kick as I want to and if I just swim down a little bit to that side I know where I am don't worry don't worry I won't crash into the wall and and up we go all fine no problems right so it's it's all it's all beautifully fine it's all it all just adapts properly and that's something I wanted to talk about actually so um let's let me try and move to this side try and get the camera over to Here There we go full body tracking so another person asked about that um what is the point of doing all of this derived stuff why don't we just use full body tracking you know know we just need new hardware that'll work fine right okay so a lot of people thinking that that's the case you know and I wanted to talk a little bit about that very quickly let me let me just show you something very much immediately you'll you'll already know why full body tracking doesn't actually fix this problem here's me standing I look the same look in the top in the top right corner of the screen here you'll see my camera you'll see the real me the real me and uh you'll see that things are going things are going as planned you know what yep all is well right so there we go yeah and you can see me standing in reality right here's me in game not uh uh pretty much matching the real world here's me in game now not standing not the hip the hip is not exactly where it was so watch let me show you again whoop here's my hand I'm going to put it on my hip here so this is where my hip is in game yeah okay now I'm going to leave it there whoop not that it's moved out of place in fact it's going to get even worse when I do this so now completely it moves out of place right what that means is the hip even if I had full body tracking is not going to match what my real world tracking says um when we are it's not going to match what my real world tracking says when I'm crouching or when I'm crawling right so there we go right that's that alone is is is not just you know it's not just crouching and crawling it's anything obviously when I'm swimming the whole body is moving in a different way the legs are moving in a different way so what that means is in reality in practice no no part of your body body nothing in terms of tracking is ever actually matching perfectly to the tracking that you're seeing in game except for the camera at the at the headset position the camera from your Viewpoint is always at your Viewpoint right so the tracking of the camera is always 100% exactly perfect but as a result anything else that offsets from that like my hands right now right here's the controllers and now offset right anything that offsets from from that is going to be different between your tracking and what you're seeing in game because the headset is the only thing that's perfect and that applies to everything not just the controllers not just the hip everything just having feet and full full full body tracking full feet tracking and all of that won't help you when it comes to tilting and stuff in water moving your feet like this my real feet aren't doing all of this walking right otherwise wise it would look a little different you have to use the tracking not just as you know as the final position final po poses and everything you have to use the tracking as a guide system which is exactly what we're doing with physics right so here we go we have uh oh that's not a good idea we have this uh here and you can see my controllers are in front of me my controllers are in front of me here together but the hand can't reach that it's being used as a top Target as a guide but it's not the actual result the actual result is this arm is being pulled back by this thing here which of course I can then pull myself towards so you can't just do that you can't just um you can't just use your tracking directly which means even when you've got Perfect full body tracking you still need a fully derived system which is exactly why even if it's available I'm only going to build first with the very most basic tracking in fact it's so basic that it works even without controllers right so even without controllers I have all of the tracking systems and all of the derived stuff working fine including the elbows and the and the wrists and everything right so this is this is the point I'm trying to make is that you can't just you can't just use your direct tracking you have to have a fully derived body and that way when you're crouching your shoulders are going to be correct because they're going to tilt in accordance with the chest and you can see this here if I switch to my camera view here you can see the controllers and as I go into a crawl you can see even though they kind of match here even though they match here they don't match there cuz it's gone past the limit and that's because my shoulder that's because my shoulder changes as I crouch into a crawl because now the shoulder has rotated since the whole chest has rotated you can't just use the tracking directly you have to derive stuff you have to derive stuff it's just the only way to do things here's something really cool even with a very very fast character I can still adapt the foot stepping and everything and here we go we've got Sonic and of course it just it just works like an actual platformer now and that's the beauty of oh no oh dear oh dear so now you can see Sonic is uh is swimming ooo we'll go there we go oh that's a bit too close right we'll just we'll have to Sonic swim over here I know Sonic can't swim that's absolutely something I could I could uh Implement if if I wanted to but uh but there we go right so it's just it's just I've been messing around with this woo quite a lot right it's it's absolutely beautiful there we go the menu button on this controller is much diff much more difficult to actually press than the than the Oculus CV one but there we go um camera over to that side so yeah um that's the new leg system it adapts to absolutely everything and the idea here once I get some full body tracking things are going to get even more Curious and crazy because you're going to be quite amazed at just how much the full body tracking needs to hybridize blend into the real the the in-game virtual world right the the actual guiding systems come from the tracking not the final pauses but there we go it's absolutely beautiful and um yeah thanks very much for watching I will uh see you in the next video I want to talk quite a bit about the next video actually um well not talk about it but uh yeah in next video I am going to get back onto interactions so a few people asked about guns and stuff and and poses and grabs and they're like okay well this is not what I want for guns and stuff like that where I grabbed it in One Direction and people don't really want right people don't want me to for example get this out of here to be able to grab a gun like this the um the wrong way so grabbing it like this shouldn't just flip the gun around you have to understand I wasn't really showing how the grab points on those objects were in in practice right I'm trying to just show the very basic systems themselves and then in the next video I'm going to actually upgrade those interactions and you'll be able to see how crazy it can get right so next video I'm looking at interactions I'm going to have my holster points back I'm going to have my uh my uh hover grab back if you haven't seen any of those things look in my previous videos this project is called called project TX or at least up until now it has been I am planning on giving it a slightly different name for the final game and maybe even a slightly different name in the tech demo just for fun uh but there we go thanks very much for watching look forward to the interaction system next cuz it's going to show you some cool things as well again that's the that's the new leg system it looks great thanks very much for watching I'll see you in the next one [Music] bye-bye [Music]