Game Development Reference
In-Depth Information
18. Next, we will adjust the vertices to match the sprite by pressing Shift . We will see
the green dot. We can go to each vertex to move it.
Tip
We can also add the vertex by pressing Shift and then clicking on the line.
For more information about Polygon Physics 2D, visit http://docs.unity3d.com/
Documentation/Components/class-PolygonCollider2D.html .
19. We will get the result as shown in the following screenshot (the position of each
vertex shows as the circle):
20. Then, we will create the Edge game object, which is basically to prevent the char-
acter from getting stuck on the platform edge. Let's go to GameObject | Create
Empty , name it Edge , and drag it inside Platform_2 .
21. Then, we will add Box Collider 2D to the Edge object by going to Component |
Physics2D | Box Collider 2D . Go to Inspector and set it as follows:
Search WWH ::




Custom Search