How do I bump my player with a Tile on Unity 5?

Asked

Viewed 244 times

0

I need to put bumps on some static tiles so the player can’t get past them. I tried to put a Box Collider 2D on player and Tile but it’s not working. How I solve this in the best way possible, in a way that improves the performance of Unity. (There will be many Colliders)

Note: I don’t want scripts for this.

inserir a descrição da imagem aqui

  • 1

    Try to put Box Collider only on Tile, and on player vc uses a Rigidbody 2d, this should work.

  • @Jules It didn’t work!

1 answer

0

In order for there to be a collision in your case, you must assign a Collider in the Tile and in the player add a Rigibody and also a Collider. Emphasizing that both components must be 2D type, otherwise it will not work. It is worth remembering that you should pay attention to the size of the Collider, because maybe it is not surrounding the object correctly.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.