 All right, so let's focus on creating the lift force and get hooked up to our input so we can lift our Drone off the ground and start to fly it around. Okay. All right So what we need to do is we need to go back to our code over here All right, so we're inside of the drone engine script and what I want to do is we don't need to do this anymore, but I'll just comment it out for now and What I need to do is I need to get access to the rigid body because we're going to have each engine Contribute a certain amount of force. All right, and so to do that We need to add force to the rigid body and so we need to pass in the rigid body into our update engine and we also need to get the Inputs. All right, so inside of the drone controller here What we want to what we really want to do is we just want to pass in the rigid body and our input right here That we're getting. All right But you notice that we get this red squiggly line and that's because our Definition inside of our interface doesn't have those arguments. So we just need to add them We need to do rigid body RB and then we need to do IP drone inputs And we'll call this input like so All right, and now if we go back to our drone controller, you can see that the red warning is gone all right, so inside of the Drone engine you can see now we have red squiggly line because our Implementation doesn't have that same set of arguments. All right, so we need to do a rigid body RB and IP drone inputs called input For the name. All right. Cool. So now we have access to the rigid body and access to the inputs that we are creating Awesome. So the first thing we want to do is we want to create a vector 3 called engine force Like so and we'll initialize this to a vector 3.0. All right, so every frame will just zero it out All right, and then basically recalculate the amount of force Okay, and so to do that what I'm going to do is I'm going to say engine force is equal to our Transform dot up. So this particular engines transform not up not the world up times our RB dot mess times our physics Dot gravity Dot magnitude. All right, so that gets us to hover. Okay So let's put that inside of parentheses there Like so and then we'll open up another set of parentheses over here. So we'll say plus our input dot throttle Times our max power. All right, so if this, you know Zero or one times the max power that will add on that much more force to This particular equation which we know hovers it so if we're adding on or taking away more that means we're going to lift up Or lift or drop down, right? And then we want to go and divide that by four, right because we have four engines Right and remember each one of these engines is contributing. So basically at the end of the day We want to basically add them all up between the four engines so we get our final force that lifts our drone off the ground So we just want need a quarter of this total force right here All right, so then we're going to say RB dot add force and We're just going to give it up the engine force like so and enforce they'll do a force mode dot force All right Cool, so let's go and test that out. So let's go and save this guy, too And we'll go back in the unity over here and let's make ourselves a little bit of room So I'm going to back up a little bit Let's go back here. Just so we have a nice starting point And really all that's going to happen is this guy's going to go up and down, right? So if I hit play I'm going to use the Xbox controller and I start to lift up You can see that we're lifting up and I can go down and I can try to get this guy to be right in the middle So it hovers now you'll notice that when I give it a little bit of force It's just it's just going to keep going right and that's because if we take a look at our rigid body over here We don't we don't have any drag. Well By default you have some sort of drag, right? It's only out in space where you have literally zero drag So if you push something it'll just constantly keep going until it hits something or something counteracts its force, right? So to get it to slow down we could do something like 0.5 for the drag here Let's hit play So now if I lift up You'll notice it'll slowly come to a stop at some point because drag is now Reducing its velocity every frame Cool. So there we go. So pretty easy stuff, right? Nothing crazy again I mean, this is just a basic controller But I wanted to show you guys how to get it at least started and set up so you can go and customize it So now we've got a way to control our drone up and down Pretty cool stuff right there. So now with that all created What we need to do is we need to get it so we can actually control it with the Left stick right now. I can only go up and down and that when that's not very much fun The other thing we should do to while while I'm here before I close out this lecture Let's go to the drone body here And Let's put a box collider around this So let's do a box collider Around there and let's also add a sphere collider just so we can kind of get a medicinal collision for the upper shape here So let's do a sphere collider as well. You can you can have multiple colliders on these guys And what we need to do really is let's go edit the sphere collider So I'm going to hit this little button right here I'm just going to pull this guy up to right about there and then pull this up so that it's not Hitting the ground. We want the box hit the ground cool There we go. So now we got all of our collisions all set up We now have a legit drone All right, so I'm going to close the uh lecture out there and move on to the next