Z-Depth

Since we lose the ability to move in Z-depth (front to back), our 2D collision does not have depth either. This is good to remember. Even if the sprite’s priority setting puts it in front of or behind an object, it will still behave as though they are on equal planes when it comes to collisions.

Get Learning 2D Game Development with Unity®: A Hands-On Guide to Game Creation 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.