Tutorial lesson 1.3

 In this lesson I had to be able to adjust the speed of the vehicle as well as adjust the camera so that it was able to follow the vehicle as it travelled down the road. I firstly had to write the code for adjusting the speed in the PlayerController.cs. From here I meade the necessary adjustment to allow for a speed increase while also replacing the 20 metres a sec code with an alternative one to have it work. Next a made a new C# folder called FollowPlayer, this will be the folder that'll have the camera follow the vehicle. I opened up the FollowPlayer.cs and started to write up the code to have  the camera move with the vehicle. Then I added Vector3 which included the coordinates of the main camera (0, 5, -15). I then declared private Vector3 offset and replaced the original code with it. I tested it out and it worked, the camera followed the vehicle. The last thing I did was change playmode tint so that whenever the play button was pushed, the surrounding colour will change to a darker grey giving more focus to the game playing. 

I enjoyed this lesson as now I have a game(sort of) that has a car move when I want it to, interact with objects and has a camera following it.

Picture of unity project


Comments

Popular posts from this blog

Introduction Post

Game Idea Research

Game Brainstorm