Skip to main content

UNITY TUTORIAL 02

Young person playing with computer illustration from Freepik.

In this week's set of Unity tutorials, I finished creating the driving simulator from last week. I learned how to give the player control of the vehicle so they can steer using the arrow keys on their keyboard.  I also learned how to make the vehicle rotate when turning, rather than sliding left and right. 

Following these tutorials, I completed a challenge where I had to correct bugs within a plane flying game and then add any missing features. This challenge involved making the plane go forwards instead of backwards, slowing the plane down to a manageable speed, making the plane tilt up and down when the player uses the arrow keys, repositioning the camera so that it is beside the plane and making the camera follow the plane as it moves. After I edited the script to allow the camera to follow the plane, I found that the camera did not actually end up doing so. I took another look at the script but everything seemed to be correct. It turns out that I forgot to add the script as a component in the main camera's inspector. After fixing this problem, the camera was able to follow the plane. There was a bonus section where I had to create a new script and apply code to allow the plane's propellor to spin. I found this part a little challenging but referenced the tutorials from the driving simulator to guide me. 

Personal screenshot from Unity3D of the challenge.

I think that this challenge helped me apply the skills that I learned from the driving simulator tutorials. I don't feel as nervous about creating my own game for my project anymore because I was able to complete this challenge. However, more practice would be very beneficial. 

Comments

Popular posts from this blog

FIRST PLAYABLE

Continuing with the creation of my game, I resized the player character to make them even smaller based on a comment that was left on my last project blog. I also repositioned the trees to make the space slightly narrower and added some flowers to bring some colour into the scene. With reference from the animal feeding game tutorial, I was able to get the player moving left and right by clicking the arrow keys. I brought in rocks and a branch for obstacles but I need to apply a SpawnManager script and get them to spawn randomly during gameplay. I also have to figure out how to get some branches falling from the trees and bringing in power-ups and points too. Screenshot from Unity3D of my game production.

PROTOTYPE

I browsed through the Unity asset store to find a package with nature objects that I could use to set up the scene for my infinite runner game. I downloaded the Nature Starter Kit 2  and started building my scene in Unity. This was a little time consuming but I'm satisfied with the way it turned out. I upscaled the trees and bushes, keeping in my mind my initial idea of gaining inspiration from the movie "The Secret World of Arrietty." I got the character from a tutorial I have completed for this module before and positioned the camera behind it. Screenshot of my work in Unity3D. With reference to the lesson 3 Unity tutorial, I started coding by creating the PlayerController script. I used the AddForce method and allowed the player to jump by clicking the spacebar. I declared two public variables to be able to adjust the gravity and player's jump force. Looking into the player's animator controller, I applied a static running animation. I then added a jumping ani...

TECH TASK: CHEEZBURGER

 Meme created using the Cheezburger website. Image from Cheezburger site.