
It’s a component that allows the physics engine to control the object, it means it will be affected by gravity, forces and collisions too! So the object with this behavior stops being a solid object and allows other colliders to pass through. It’s a particular behavior of a Collider 2D, when we simply want to detect when one collider overlaps another one without creating a collision. The sprite is what the user sees, the collider is what the engine considers for collisions. So the sprite is the drawing, the collider is the shape, what does it mean? If the Gameobject sprite is a complex drawing, just an approximation of its shape will be necessary to work, because the Collider 2D is invisible and not distinguishable during the gameplay! It’s a component to define the shape of a Gameobject for physical purposes. Please have a look at wikipedia for a large definition about collision detections in video games. The detection means that in some way we need to be warned when a collision happens! One object (or multiple objects) overlaps another object (or multiple objects).


One object (or multiple objects) touches or hits another object (or multiple objects).Let me list for you some detections we would like to handle: Often it’s related to simulate the physical world in our game. It’s the detection of an intersection between two or multiple objects. To detect collisions and simulate the real world physics system Unity provides a built-in physics engine, so all the maths behind acceleration, forces, gravity, collision detection etc… it’s already there.įewww! It seems other brave detectives already solved the case of physics! Thank you whoever you are! Collision Detection Hey partner, here is what I already discovered, there are some important notions to know before proceeding and understanding Unity collision detection 2D: Physics Engine 2D Step by step we will understand how to manage the collisions in our game and this monstrous case will become a lovely little kitten. Yes, Unity will help us, then we just need to start analyzing the clues. It’s a big case, I know, but if we want to create video games we need to face the truth:ĭon’t worry we will find all the necessary information and this time we will have another partner to help for our investigation: Unity.

Here we are, I can feel another mystery, Unity collision detection 2D.
