O'Reilly logo

Creating E-Learning Games with Unity by David Horachek

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating the start and finish line flags

To mark the starting and ending location of the race, we will create a giant flag Prefab and instance it in both places. The banner of the flag will have cloth physics to give it an interesting motion. If you are targeting a lightweight device such as a phone, feel free to simply replace the cloth object with a flat plane if performance is an issue in your application. In order to create the start and finish line flags, we need to perform the following steps:

  1. Create two cylindrical game objects. Set them three units apart from one another, and scale them up to a y value of 6. Name these as pole1 and pole2. In the scene view, you should see something like the following figure:
  2. Create a cloth GameObject. It ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required