© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
V. G. BruscaAdvanced Unity Game Developmenthttps://doi.org/10.1007/978-1-4842-7851-2_5

5. Advanced Interaction Classes

Victor G Brusca1  
(1)
Edison, NJ, USA
 

In this chapter, we’ll take a look at two important centralized interaction handlers: the CollideScript and the CarSensorScript classes. These two scripts round out the game’s interaction handlers and their associated game mechanics. The CollideScript handles a number of different interactions that occur when differing game objects collide with a hover racer.

The CarSensorScript is similar but is designed to work with hover racers only. Its main responsibility is to handle car-to-car interactions of varying ...

Get Advanced Unity Game Development: Build Professional Games with Unity, C#, and Visual Studio 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.