 So, you're starting to see how programming works, but you want to learn how to move. Not a problem. Real quick, I wanted to thank everyone who watched the last video and left a comment. It was a lot of fun to read through, and I honestly didn't expect this many people to be interested in learning to code. So that made me real excited, and I want to try and do the best job I can to share what I know. Also, a big thanks to the veteran programmers in the comments, especially about the fixed update and the built-in destruction time parameter. I'm pretty sure I'm not the only one who appreciates you sharing your knowledge and experience. Please continue to share any golden nuggets of wisdom if you have the opportunity. For the sake of keeping things as simple as possible, I am only going to be using the default start and update methods in this series. My plan is to just introduce the main codes one step at a time, and after I see people start to get the logic down, then we'll start to talk about optimization and efficiency. So for the veterans here, I just want to let you know that I'm not trying to ignore you, I'm just sticking to the default methods to keep the environment really simple for now. Okay, now in my experience for a 3D game, the five most important things that you need to be able to control are an object's position, rotation, scale, collision, and conditions. If you only knew how to program five things, that is what I'd recommend you pick. Last video I introduced you to conditional code with if statements. Today I'm going to introduce you to controlling position. So let's create a basic position control code by right-clicking, create, C sharp, name it something like movement, press enter, drag the script onto our cube, and here we are. Position and unity is like position in every other 3D software. X goes left and right, Y goes up and down, and Z goes forward and back. Now if we go here in the update method and type transform dot position equals new vector three, one, two, and five, and save, you will see that initially our cube starts out just sitting there in the middle at zero zero zero. But as soon as the game starts, it goes exactly where we set it to one X, two Y, and five Z. If we go back in here and change it to a different location like two zero two and run the game, that's exactly where the cube is going to go instead. Now that's global position, but what about local position? When an object is parented to another. We can parent the cube to the sphere by dragging it in the hierarchy, and it will then move wherever the sphere moves. But when the game is played, the cube will go to its global position of two zero two because that's where we programmed it to go. So what if we wanted the cube to be at a local position of two zero two relative to its parent instead? Well, luckily that's a pretty easy fix. Instead of transform dot position, you just say transform dot local position. If you save and run the game now, you will see that wherever the sphere goes, the cube always stays at a local position of two zero two relative to the sphere. This kind of stuff is really useful if you're making something like a Zelda or Mario game where if you pick up an item and it teleports to the top of your head for a few seconds, well that item is basically following a local position relative to your face. Another way to control position is to translate a new location from an old one. So let's say we wanted our cube to move forward on the z axis every frame. Well to do that, we would go back in here, replace transform dot position with transform dot translate. Now all this means is the cube is going to move at a speed of point zero one in the z direction every frame, save, run the game and now you can see that's exactly what the cube is doing. If we went back and changed x to point zero one instead, you will see the cube move along the x axis instead of the z and you can easily combine this with conditions. For example, if you type input dot get key key code w and the position code over here, every time you press the w key on the keyboard, our cube is going to move forward. Likewise, if you write the same statement but for s and make z negative, when you press w the cube will go forward, but if you press s, the cube will move backwards. And if you want to complete the basic WASD controls, you can add move in left and right to A and D. And now if you run the game, you've basically got the fundamentals of control and position. You can change these numbers to affect the movement speed and if you drag the script to the camera object, you will be able to move the camera as if it was a player. So I hope you're starting to get the general idea of how things work here. Again, there's lots of ways that you can improve or optimize moving with WASD, but for people who have never programmed before and don't understand variables yet, I thought this was the easiest system that anyone could understand. In the next video, I'll introduce you to variables and how we can change this code to give us a little more control over the details. Hope that helps and as always, hope you have a fantastic day. Now, see you around.