How do I collide my player with a tile in Unity 5?

0

I need to put collisions on some static tiles so that the player can not pass them. I tried to put a Box Collider 2D on the player and the tile but it is not working. How do I solve this in the best way possible, in a way that improves Unity's performance. (There will be many colliders)

Note: I do not want scripts for this.

    
asked by anonymous 06.09.2016 / 07:41

1 answer

0

In order to have a collision in your case, you must assign a Collider in the Tile and in the player to add a RigiBody and also a Collider. Note that both components must be 2D type, otherwise it will not work. It is worth remembering that you should pay attention to how big the Collider is, because you may not be circling the object correctly.

    
06.09.2016 / 16:07