Any game developer beginner has asked himself at some point... how do I know if my character collided with the enemy? or reached the end of the level? or a little bit more specific, what part of the body of the character was hit with the enemy bullet? The answer to all this questions is in the Unity Physics Engine. Thanks to it you will have the most ridiculously easy way to integrate physics into your game (like a line of code? :D)
As I said in my previous post about Delegates and Lerp, this is the next in the family of "Like a BOSS" tutorials. They are simple and straight to the point. I focus on the best utilities I find for each of the components and my best practises with them. In the post you will find an example about Collisions in 2D and at the end you can enjoy the full git project :)
Collisions are of the first things you probably learnt while doing the unity official tutorials. Using collisions is probably one of the simplest things in Unity. Then why am I writing a post about it? Surprisingly, many people find problems while working with them, silly errors due to how they work most of the time. I will try to show you the way of efficiently working with them, avoid this errors and give a little bit more indepth utility like detecting the exact point of the collisions.
(Almost) All kind of colliders in Unity. Some of them I didn't even knew xD |