Physics Material 2D

Unity also offers the possibility to create physics materials so as to adjust the friction and bounciness of a physical object when it collides with another one. In the case of 2D, this is enabled by the Physics Material 2D.

You can create a Physics Material 2D by selecting Assets | Create | Physics Material 2D from the top-bar menu as shown in the following screenshot:

Physics Material 2D

Once selected in the project panel, we can tweak its two values in the Inspector, as shown here:

Physics Material 2D

It's worthwhile mentioning that we have seen many variables during ...

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.