- Home /
2D Colliders are colliding but not touching
I've been trying to switch from a custom raycast physics system to one driven by Box2D and I'm stumped by this problem:
They seemingly collide, but leave a rather huge gap between each other. The sprite is using a Box Collider. In the first image the "floor" is using an Edge Collider 2D (as proposed here) and the second one is using a Box Collider 2D.
I played with a bunch of different settings and colliders and can't seem to resolve the issue!
Thanks!
Also, what scale are you using? If you're using a small enough scale, this will happen. Based on the size of that gap, I'm guessing your box collider's scale is about 0.25. You may need to just scale up the size of your scene.
I have almost same problem. I just wanna to ask about it and find your post) http://i.imgur.com/zJ0C8it.png http://i.imgur.com/fgUlG$$anonymous$$d.png 1 - box collider http://i.imgur.com/k07eJNc.png 4 - character http://i.imgur.com/WrHWdOw.png
https://github.com/rincew1nd/Sleepy-mole/blob/master/Assets/Scripts/character_controller.cs
EDIT: Sure enough, changing the scale worked. Can you post your comment as an answer so I can accept it? Thanks :D
Only the player has a Rigidbody2D attached. The collider size of the player is indeed around 0.25 but when I bump it up (to 1) it has see$$anonymous$$gly no effect...
I will try to scale up the whole thing and report back.
Also it's happening to polygon collider which does not have scale.
Answer by nospoone · Aug 17, 2014 at 04:16 AM
Reposting Steel_Arm's answer as he isn't:
Also, what scale are you using? If you're using a small enough scale, this will happen. Based on the size of that gap, I'm guessing your box collider's scale is about 0.25. You may need to just scale up the size of your scene.