Unity Tutorial 03

In the first part of this week's Unity tutorial, we go more in depth with C# coding. And by that, I mean that we actually give the player control of the vehicle. To do that, we add some magical code that works, somehow. At first, we use a line of code that allows us to go forward and backward at will using the arrow keys. Next we add a line of code that lets the player turn, but to do that they have to manually change the speed in Unity's inspector. That's no good to us so we change it so that we can use left and right arrows. But what's this? The vehicle only slides left and right without actually rotating! We change it once more and lo and behold, the van now acts like a normal van would.



The next part of this week's Unity tutorial is a Big Test™. We take everything we have learned so far and put it to practice by ourselves, without a tutorial.


We get a simple scene with a plane and some obstacles and we have to manipulate the code in such a way that allows us to move around the obstacles.
First, I had to align the camera in the camera's script. A bit of trial and error and I had the correct distance and angle to the airplane.
Then, I had to assign keybinds for the pitch of the plane to move up/down with the arrow keys. That was pretty simple and I got it working quite quickly.
Looking forward to the next stage :)

Comments

Popular posts from this blog

Introduction to a Future Revolutionary

Game Vision Statement

Prototype for my space game