M
M
MaksOnChek2020-11-16 22:49:01
Unity
MaksOnChek, 2020-11-16 22:49:01

Unity 2D. OnCollisionEnter. How to implement my chip?

Hello. I'm new to this area, but I want to make a game. The problem is this... In the game, when the player falls out of the map, I made the borders of the map. If the player collides with one of the borders, then all his HP should be removed, I wrote OnCollisionEnter() , set BoxCollider2D at the borders, IsTrigger was not enabled, but still ... Nothing works. The player has a Rigidbody and a BoxCollider. Tell me what to do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GavriKos, 2020-11-16
@MaksOnChek

1. March to learn units from tutorials. And then the sisharp at first, if at all a beginner.
2. So 2d or not 2d? If the collider is 2d, then OnCollisionEnter2D is needed. And the player's collider should then also be 2d. Mix 2d and 3d PHYSICS no way

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question