14

Racing Game

In this chapter, we will be building out a racing game (Figure 14.1) and it will have almost everything a no-nonsense racer might need – AI opponents, a respawning system, wrong way detection, and modern video game car physics using Unity’s Wheel Colliders for suspension and car control.

The focus for this chapter is on the scripts, which means it will not be the same step by step tutorial format used in Chapter 2 for the RunMan example. There may be some work on the Unity side that will not be covered. You are expected to open up the example project and use this chapter as a guide to find out how it all works, but there will be full script breakdowns and enough information for you to be able to make your own game – this is ...

Get C# Game Programming Cookbook for Unity 3D, 2nd Edition 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.