why there is no collision made with the ground ? i added two edge collider to bottom and top and the father have a rigid body , i even tried the normal way that just creat any sprite add collision and rigid body and replace it with any sprite i want but still not working…
Hi Belal,
For collision events, the sprite is completely irrelevant because it is just “decoration”. What matters is the Collider2D.
Since the collider of type EdgeCollider2D is just an edge, it does not have an inner part. This can result in unexpected side effects because the physics simulation is optimised for speed, not precision. Also, it is not the real world, so “impossible” behaviours are possible in our game. That’s why we, the game developers, often have to approximate and fake things to get the desired result.
In your case, you could try to set the Collision Detection of the player’s Rigidbody2D component to Continunous. That often fixes certain issues with fast moving objects.
Also double check the ground collider. Are there any gaps in the edge? Or anything else that looks suspicious?
If that didn’t fix it, I would suggest to replace the edge collider of the Boarder_Bottom game object with a CapsuleCollider2D to see is the issue persists.
thank you , the problem was in edge collider as you said
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.