OnCollision2d function

Shouldn’t the onCollision2d function be placed within the Update function so it could be run by the program at every frame? I don’t get it.

Just like Update it’s automatically invoked by Unity, you never actually have to call Update, in the background Unity is looking for collisions, when one is detected Unity sends out a message and you get to decide what happens with that collision.

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms