Unity Tutorial 02

 Week 04

Unity Tutorial 02


This week's task was to make the car drive around the obstacles in lesson 1.4. I found this to be the most fun in the car tutorial series. This lesson was all about making the car rotate and look like an actual car moving. 
This started my making the vehicle move left and right to start with. This was done by adding "public float turnSpeed;" variable and in the void update "transform.Translate(Vector3.right * Time.deltaTime * turnSpeed);
Then we went and put a new public float horizontalInput and then assign that to the get axis and see it in the inspector, this will allow you to move the car in all directions.

We were now going to make it so we could control the speed by going forward and backward motion by applying the same principal but for the forwardInput and then put in the get axis in too.
Although this made the car drive in all directions, the only problem we had was that the car was looking forward the whole time, so I added the rotate code to 
the player controller script and then every time we turned the car would turn with it. After all that was sorted, I was able to toy around with the turn speed and the drive speed.
I actually really enjoyed this tutorial and am looking forward to the weeks to come.


Comments

Popular posts from this blog

Introduction Blog

Alpha

Game Brainstorm