- Home /
My rigidbody2d is passing through the side of a collider2d but it's working on the top
Hello,
I'm starting to learn "Unity" by recreating the "Flappy Bird" game, but with others sprites and scale 1x1 (1080 x 1920).
The player is inside an GameObject. Player have a Polygon Collider 2D and the GameObject have a Rigidbody 2D (This is the only way to make physics work here for me, i tried to add all components on the player but it didn't work i think is because of the animation but that's not the problem now, i think.)
And then i made a Prefab that are 2 pipes and each one have a Box Collider 2D. (both are the same sprite but one is rotated 180 to be upside down)
Player only jumps and the pipes are moving from right to left side of the screen.
Here's the problem:
When the pipe comes to the player, it passes through on the side of the pipe (even though is detecting the collision)
But it collides fine on the top of the pipes. And the floor. (Just like the original game.)
I did something wrong or was supposed to work like this but is not?
Thanks.