- Home /
My 2D objects won't collide at all. Help?
I have a 2D Project
added 2 Sprites via GameObject -> Create other -> Sprite
added Rigidbody 2D & Box Collider 2D to the moving one
added Box Collider 2D to the static one
did not change any parameters of the components
Test it: Box won't stay on platform
added Script Component with OnCollisionEnter(Collision2D coll) with Debug.Log("WTF?");
Test it: no collision, no "WTF?"
...WTF? It supposed to be a box falling onto a static platform
Have you checked 2d physics layers? Edit -> Project Settings -> Physics 2d. And your objects have different Z value, I don't know if that affects anything in 2d.
Not sure if this is right but I think the Z position should be the same for both objects.
Z position should not matter, however I think the issue with this is that the colliders are too small. 0.04 is a very small collider. I suggest try making it bigger and see if it has the same behaviour. Small colliders I have had trouble with in the past.
Answer by Voarix · Jun 21, 2014 at 07:47 PM
Due to the small size of the colliders the physics engine skips the position just over it, making the colliders bigger solves this issue.