Challenge 2 - Play Fetch

Tutorial
Beginner
1 Hour
Overview
For Educators
Tutorial Materials
Your progress
Also included in
Summary
Challenge Overview:
Use your array and random number generation skills to program this challenge where balls are randomly falling from the sky and you have to send your dog out to catch them before they hit the ground. To complete this challenge, you will have to make sure your variables are assigned properly, your if-statements are programmed correctly, your collisions are being detected perfectly, and that objects are being generated randomly.
Challenge Outcome:
  • A random ball (of 3) is generated at a random x position above the screen
  • When the user presses spacebar, a dog is spawned and runs to catch the ball
  • If the dog collides with the ball, the ball is destroyed
  • If the ball hits the ground, a “Game Over” debug message is displayed
  • The dogs and balls are removed from the scene when they leave the screen
Recommended Unity versions
2018.4
Topics we'll cover
Language
English
Tutorial
Challenge 2 - Play Fetch
64
Challenge 2 - Play Fetch