Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: tenpoundpixel on November 20, 2014, 02:32:59 PM

Title: Problem with tiled Box Colliders
Post by: tenpoundpixel on November 20, 2014, 02:32:59 PM
I'm trying to create a 2D tile-based level where each 20x20 block has a box collider of its own. The problem I'm facing is that if my player character has a box collider also, she sometimes gets stuck in between two blocks and won't be able to move.

I tried switching to circle colliders on my player character but then I end up with a slight jitter with my camera following me, it's like the circle collider considers the blocks as "bumpy". What's worse is that since I made the player character register if there isn't any ground below her so she could switch to a Falling state, she ends up switching back and forth between Grounded and Falling.

Is my setup wrong or is it just not ideal to have tile-based 2D stages with Physics 2D or Unity? It works fine if I have just one long rectangle box collider on the ground but once I walk over the seam between two colliders, the player character gets stuck.

I marked the problem areas with red arrows in my attached image. I'd really like to make this setup work so I can maybe implement a tile-based level creator later on, otherwise I'll just have to rely on building the stage and use a single Edge Collider for the whole area.
Title: Re: Problem with tiled Box Colliders
Post by: Lane on November 20, 2014, 04:45:34 PM
I've had the same trouble and haven't found a workaround yet. On the unity forums I've seen other people having this issue as well, but no clear solution.

Only thing I can think of is create custom colliders end to end so there aren't any gaps, but that seems like a cheap hack to me.