Time for action – applying headlights

By giving our tank headlights, we give the player the ability to control the light in their world. Using cookies, we can make them look more interesting than just circles of light.

  1. Start by creating a Spotlight.
  2. Position the light in front of the tank and pointing away.
  3. In the Inspector window, increase the value of the Intensity attribute to three. This will make our headlights bright like real headlights.
  4. Now we need some cookie textures. At the top of the Unity Editor, select Assets, followed by Import Package, and lastly Light Cookies.
  5. On the new window, select Import and wait for the loading bar to finish.
  6. We now have a few options to choose from. Inside the Standard Assets folder, a new folder was created, ...

Get Unity Android Game Development by Example Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.