Chapter 4. Interactions

In this chapter, we'll be looking at further interactions and dive into two of the most crucial elements of game development, namely, Collision Detection and Ray Casting.

To detect physical interactions between game objects, the most common method is to use a Collider component an invisible net that surrounds an object's shape and is in charge of detecting collisions with other objects. The act of detecting and retrieving information from these collisions is known as collision detection.

Not only can we detect when two colliders interact, but we can also pre-empt a collision and perform many other useful tasks by utilizing a technique called Ray Casting, which draws a Ray put simply, an invisible (non-rendered) vector line ...

Get Unity Game Development Essentials 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.