- Home /
2D: Why are my Circle Colliders falling through Edge Colliders ??
Hi, I have a player sprite with a circle collider 2d at his feet. I have him standing on an edge collider 2d. The edge collider is part of a large moving tank that rolls around climbing over rocks and other colliders.
When the tank gets bumped around, the sprite sometimes falls through the edge collider and ends up on the ground next to the tank. there are no holes in the edge collider, its mostly a long flat piece. He isn't standing anywhere near the end of the collider, he is definitely falling straight through.
Is there a setting or something that says never go through, no matter how hard it hits?
Thanks!
How thick(vertically) is your edge collider, if it is too thin then objects can fall through easily.
They're one pixel thin. I didn't know I could make them thicker!
Hi again, I meant like this as you are looking directly at it : 
If your current collider is like in pic A then you may get fall through. If you make it like pic B it should with a bit of luck not fall through anymore. If your tank collider is already like in pic B then this is not the problem. I'm not an expert at 2D by any means, but in 3D this principle is sometimes true.
You cannot make an edge collider wider, lol. You could make a box (or polygon) collider; a particularly wide collider can really cut down on "push through" events, although they don't perform as well as edge colliders. Also, you can try setting your collision detection to Continuous.
Thanks for the info about Edge colliders Pyrian, yes I was thinking in terms of box colliders. Voted you up as you also remembered to say about setting to continuous:)
Answer by RayJr · Oct 20, 2014 at 02:43 PM
Answered in Comments. Thanks Pyrian and MrSoad
Your answer
Follow this Question
Related Questions
How to update EdgeCollider2D with sprite animation? 1 Answer
2D Level Design (programmatically or not) 1 Answer
Platform Effector 2D One Way, not working as expected 0 Answers
Animataion of a Sprite v2 1 Answer
sprite vs texture 1 Answer