Unity Tutorial 01

 Week 03

Unity Tutorial 01

In this weeks list of tasks we were asked to complete the beginner lessons on unity, this was to make a car go forward and crash over obstacles on the roadway. It was called the high speed chase
It was a bit overwhelming to see all the action in unity but as I watched the tutorials it helped me realize that its isn't too complicated.
We started off by downloading the assets


It was as simple as clicking and dragging them onto the screen. We also had to drag a car onto the road. So that we would have one obstacle one car and one road.
This is where we started messing around with the x, y and z axis to see where we would like to position our vehicle and obstacles etc.
So now we wanted to make the car drive forward, so we made a scripts folder inside the assets folder, from there we created a C# script.


I downloaded Visual studio to code the C# for the car. We also need script for the camera to follow the car when it was moving the problem I had was that the every time i did the code for the camera following the car, the car would just fall through the world. I was constantly checking my code and there and I couldn't find the problem anywhere, but it was a problem with my assets in the project and the save files, I got it working in the end with the help of Irene.


Once the camera was following the car, the camera was underneath it, to fix this i needed to code the camera with vector3, so I wrote "transform.position = player.transform.position + new Vector3(0, 8, -8);" those last three values were the cameras position on the x, y and z axis. 



Now I added rigid bodies to both the car and the obstacles so that when the car stared driving forward it would crash and knock over the obstacles.
I made it so my car was a lot heavier than the hurdles that I placed on the road, this would mean that the car would send them flying on contact.


Here is the final piece of the car moving and the camera following behind while the car is driving through the obstacles.
I had a lot of fun doing this tutorial and I learned a lot about the basics of unity, I cant wait to learn more about this and eventually make my own game!!!




  

Comments

Popular posts from this blog

Introduction Blog

Alpha

Game Brainstorm