# How It Works 2 - RECREATED - Half Life : Alyx - Hand Physics (Ebp600yzSHA, 762s) it's me name sony welcome back to uh the how it works series uh now it's been a while since the last video i made on the subject it's been a few months actually since i last did a how it works video and the last video i was making on the subject or in this in this sort of series was about half-life alex and it's hand physics system so in the first video i'd mentioned how i would talk about these things in the games and then make an attempt to recreate them to prove the the concepts that i was discussing in the videos um so that's what i did now in the last the last time you saw this project itself so this is the same project i used in the last recreation video uh where i was describing half-life alex's movement system where it would sort of collide with objects around you and then allow you to move through them if you're if you're not pressing buttons and not pushing the joystick or anything like that it all i also described how it would detect when to do the fade out based on whether your head went through an object like so you can see my body would not physically be able to do this but when the head goes through the fade out would appear uh the videos after that though i hadn't done any of the hand physics stuff and i described how the hand physics works in the game which is uh the first thing we should we should talk about actually is the hands themselves now you can see they are full physics objects and as you could see before i'm able to push things about as well there we go push things about really um so they're full physics objects however they're not always looking like they're active physics because as i described in the game videos um when you are pushing on an object without moving without fake moving you're allowed to do this while you're in room scale because you always run skill moving but when you're not pushing the joysticks the hands will stay completely full physics and get stuck on things and push themselves and try to go through the wall you can see here my controller is pure tracking and the hand itself is the physics object so you can see it gets stuck on the wall however when you move it doesn't seem to do that it does exactly what it does in the actual game where it traces from where your head is in this case it's a little bit lower than the head but you trace it from where the head is to where the controller is and it produces a point on the surface whatever surface it hits where the hand will just jump to so as you can see here when i'm moving the hand just jumps to the surface that it hits brilliant and that means that if the hands do get stuck for example here let's just move and put the hand behind there you can see the hand is stuck now uh the hand is stuck there um when my tracking is here the hand simply jumps through as soon as i start moving and that only happens when we're fake moving when we're moving like this and that is there to do to to actually fix a few problems natural problems with physics first one being of course having the hand get stuck behind objects um sometimes you can open a drawer put your hand in close the drawer and now your hand is stuck inside draw because as i described before there aren't any odds or anything like that it's just entirely it's just entirely physics hands right so there's there's no arm there the wrist is is we use it as a pocket in the actual game as a result you can get your hands stuck so getting them unstuck very simply put they just skip the whole process they just say hey your hands are not even physics when you're moving using the joystick so if you wanted to get your hand unstuck from something in the game you simply move this joystick a little tiny bit and boom it just comes straight out there we go instantly um now the same thing applies when you're holding physics objects now i haven't replicated the game exactly because i kind of did this yesterday pretty much most of the work i did do a little bit of it the last time i was working on this project which was a few months ago but uh most of the physics work i just did yesterday and had a little bit of trouble doing it as well which is why i made the video today um so there we go so this is a very basic system this is basically the absolute most basic uh physics-based hand systems you can make and all it does is grab objects and that's all now i haven't replicated the hand physics thing the the overriding of the hands position with the physics objects as well so as a result you can see what actually happens to the hands if we're not doing that thing with the fake movement now look carefully sorry about that the microphone probably made a loud noise there just moving my headset now look carefully at the hand when i move around in room scale can you see how it lags a little bit behind the controller it doesn't look like it when i'm moving my hand around nice nice and easily but you can see that the hand itself lags a little bit that's because in the world of physics no object can move instantly they always have to accelerate to the velocity that they're going to and of course in vr a player movement system generally you try and protect against motion sickness by moving things instantly click click click click click instant movement which is why the hands technically this is physically impossible it's impossible for me to instantly accelerate like this and have a hand perfectly synchronized with the controller tracking which is why when i do it without that when i don't have that clever stuff going on with the hands you can see here that the the object lags like a a lot more than than is then it's pretty clear isn't it it's pretty obvious and that it doesn't just apply with a heavy object it doesn't matter how light the object is here you can see pretty much light enough for me to move almost instantly and you can see here with my tracking even the hand itself lags however once i start moving there you go only the physics object lags because that's because this is still full physics i haven't done the hand thing yet and the hand itself just overrides its position so there we go when i'm moving around without any fake movement you can see the lag on those hands whereas as soon as i start fake moving there we go it's just overriding the position this is a natural habit of physics now in my own proper systems i've done a lot of work to actually get this minimized very very very close to the tracking and especially when you're moving that lag is no longer there i've done a lot of work on that stuff but that's not what this is about this is about how to protect against that in the simplest way and this is what they were doing they were researching that very concept now there's more to it than that as well let's go grab that box and show you something that i couldn't show you in the last recreation video but it wasn't part of the grabbing system itself here you can see that i collide with the box when i when i walk into it however of course when you're holding an object colliding with it would be a real problem because there's no physical connection between your person your player and the object itself so as a result they just become completely non-collidable now that means that i can stand inside of it here i've let go of the box while i'm standing inside of it as you can see i haven't been pushed out and the reason for that is i haven't told the game that i'm allowed to be pushed out until i joystick move there we go instantly get thrown out of the object and there's more to it than that because the same thing applies with gravity here we go let's just drop a box here um in fact i could have just used any box um but yeah so now i haven't done a mantling system but i'm going to try and stand on this box by faking it all i have to do is give it a little slant and then walk up the slant there we go so yeah a little bit of work to do to make the slanted object be logically handled as you can see this box i'm now standing on top of and obviously if i walked off i'd fall down however if i now grab the box and throw it away and you can see i did this in the game as well you can see i'm still standing off the ground which you can tell by the shadows as well of these of these spheres one showing the center of my tracking space one showing the center of me where i'm standing so basically underneath the head and you can see i'm not falling until i tell the game that i'm okay for it to do any sort of fake movement anything that isn't actually happening from real world tracking is fake movement and that will cause motion sickness if you're not prepared for it as a result the game will only do this when i tell it to so if i move the joystick i'm telling it i can fake move instantly start falling exactly how the actual game works and you can see the slanting problem here that i've got in my own little rebuild here there we go it doesn't care about the slantedness of an object yeah that's my system that's just me being uh building things really quickly there you go this is a pretty much a recreation of the concept that i wanted to discuss in the hand physics videos uh there's still a lot to go um there's still i could have done the teleporting and stuff like that but a lot of these things they're very simple stuff anyway there's a little bit of complexity to them um pretty good stuff there uh but i i don't know it depends it's not as fun to rebuild that stuff as it is to rebuild the movement system itself i do love building movement systems a lot of this stuff is based on what i wrote for the mario 64 imagine project as well so i learned so much about how to build a movement system and collision systems without using existing components from for that project anyways thank you very much for watching this i hope it gave gave you a little bit more of an understanding of how simple this stuff really can be and uh how to really just sort of take a little bit of complexity like a little bit of a sort of physics object grabbing and all of that and just protect against the little problems that we have and how to use the the little bits and bats to to to make those things feel really good in a in vr now again it's not the same sort of concepts that i would go for with my games because i'm going for a full physics world and a full physics character controller full physics hands all the time it's a very different concept but this works in that way this works quite well in fact to do what it tries to do which is build a very base system for movement that considers locomotion sickness considers all the little locomotion options that you might need and puts it all together with a little bit of physicality to the world even though it doesn't do what it could do it does just so the basic level of interaction to make it look good and feel good and that's it and this is this is something you can do really really easily i put together most of this stuff in an overall time of about a week from from the most basic system just building this little basic area super super duper easy to do anyways thanks very much for watching i'm gonna keep rambling otherwise if i don't stop the video now so that is the end of this video think of another game to to talk about now and i'll move on to the next one um probably be born works or something even though i've got similar systems that are similar to that already and i do often describe how the things work not exactly but i do describe how those things work anyway but yeah there might be other games again this is not entirely to do with vr i'll be doing any any type of game um i'll be describing using uh using this series my how it works series thanks very much for watching that is the end of this video i don't want to keep on rambling goodbye [Music]