Challenge 1 - Programming a Plane

Tutorial

·

Beginner

·

+10XP

·

30 mins

·

(57)

Unity Technologies

Challenge 1 - Programming a Plane

Challenge Overview:

Use the skills you learned in the driving simulation to fly a plane around obstacles in the sky. You will have to get the user’s input from the up and down arrows in order to control the plane’s pitch up and down. You will also have to make the camera follow alongside the plane so you can keep it in view. Finally you will a bug report for this challenge practicing how to tag them, and prioritize them appropriately.

Challenge Outcome:

  • The plane moves forward at a constant rate
  • The up/down arrows tilt the nose of the plane up and down
  • The camera follows along beside the plane as it flies
  • Bug report logging issues found

Languages available:

1. Introduction to Challenges

U1.Challenge1.Intro

2. Challenge 1 Overview

CWC_U1.C1

  • Open your Prototype 1 project
  • Download the "Challenge 1 Starter Files" from the Tutorial Materials section, then double-click on it to Import
  • In the Project Window > Assets > Challenge 1 > Instructions folder, use the "Challenge 1 - Instructions" and Outcome video as a guide to complete the challenge

3. The plane is going backward

  • Make the plane go forward

Hint: Vector3.back makes an object move backwards, Vector3.forward makes it go forwards

4. The plane is going too fast

  • Slow the plane down to a manageable speed

Hint: If you multiply a value by Time.deltaTime, it will change it from 1x/frame to 1x/second

5. The plane is tilting automatically

  • Make the plane tilt only if the user presses the up/down arrows

Hint: In PlaneController.cs, in Update(), the verticalInput value is assigned, but it’s never actually used in the Rotate() call

6. The camera is in front of the plane

  • Reposition it so it’s beside the plane

Hint: For the camera’s position, try X=30, Y=0, Z=10 and for the camera’s rotation, try X=0, Y=-90, Z=0

7. The camera is not following the plane

  • Make the camera follow the plane

Hint: In FollowPlane.cs, neither the plane nor offset variables are assigned a value - assign the plane variable in the camera’s inspector and assign the offset = new Vector3(30, 0, 10) in the code

8. Bonus: The plane’s propeller does not spin

  • Create a script that spins the plane’s propeller

Hint: There is a “Propeller” child object of the plane - you should create a new “SpinPropellerX.cs” script and make it rotate every frame around the Z axis.

9. Bug Reports

Bug Reports vary from company to company, but this is what will typically be expected:

  • Summary of the bug
  • Identified frequency: How often does this bug occur? (Every time, most times, randomly, rarely)
  • How to recreate the bug: Precise steps on how to see the bug. Should be detailed enough that a developer can recreate the bug themselves without any information other than what’s contained here
  • Detailed description of the bug
  • Any other observations: Why it might be happening, other details (i.e. “Happens more frequently at night then during the day”)

Learn more about Bug reports from the Ministry of Testing: The Art of the Bug Report.

10. Create a Bug Report

Using a spreadsheet tool, like Google Sheets, or a website like GitHub or Jira, create a bug report for this challenge. Be sure to outline each bug outlined in the challenge and bonus challenges, tag them, and prioritize them appropriately. Try and find additional bugs that are not outlined in the challenge instructions and log those as well.

Complete this tutorial