Colliders

Imagine that you have the heroine of your game moving in a complex environment; by complex, I mean detailed, for instance, the kitchen of the king's castle. If the Physics engine is super realistic, it should take in consideration that the hand of the heroine can go over the table, as far as the body stays on its side. However, this is impossible (or at least out of reach for the current hardware of your players) to run in real time. So colliders provide an approximate shape for objects and characters that need to have some kind of physical interaction, such as a collision. For instance, characters are often approximated as a capsule-shaped collider and objects with a sphere-shaped or box-shaped collider. Of course, if a deeper level ...

Get Getting Started with Unity 5.x 2D Game Development 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.