- Home /
PolygonCollider2d oversized resulting in no-touch collisions
Hi!
I'm having problems with using the PolygonCollider2D to detect collisions. The main problem is that the auto generated shapes are larger than the sprites, always seemingly heaving a sort of 'buffer' around them. A second, minor issue is that the colliders don't actually touch when detecting collisions. The result is that my objects seem to float above the ground, rather than touch it (or each other).
What I would like to do is simply have a way to tell unity to 'shrink' the colliders a bit to fit the actual sprite. I don't mind if the objects overlap a tiny bit before collision is detected, but this hovering looks just weird. I know I can manually edit the colliders, but once my game gets larger that sounds like a tedious way of doing things, and it feels like there should be a much easier way to solve this.
I've been trying to find a solution for this problem, but had no luck - possibly because I don't know the correct terms for what I'm looking for.
Thanks in advance for any suggestions.
Images:
Is this a stupid question? Is this working as intended? Does nobody have an answer? Is this the wrong place for this kind of question? Is this a derelict section of the website and I'm asking my question into the void of space...?