Hey Unity’ers!
I’ve noticed that in making a platformer, the player character (written up by myself) greatly dislikes it when platforms are made from several different blocks. Example;
As you can see, this is a 5-block platform, with the pink quads on top being the walkable areas. The rest has a zero friction physics material attached, to allow the player to fall/slide down the side of it on contact. However, when the 5 quads are stuck together in that fashion (tested with no gaps, small gaps, and overlapping), the player character tends to get stuck/stutter between them.
As a quick fix, when blocks are tied together in this fashion, I disabled their separate walkable areas, and replaced it with one large quad that covers over all of them, as seen below;
This behaves perfectly as far as the character walking across them goes.
Now, the problem is that I’ve written in a new script, where the player can “smash” these blocks (mario style), which also kills the walking area above it. However, with 5 blocks sharing one large walking zone… this becomes a problem. Leave the walking area there, and the player can walk on air. Kill it entirely, and we’re back to the old stutter problem.
Right now, the only solution I have in mind is in the event of one block being smashed, I could instantiate new “walking areas” across the blocks that are still active. But this seems like a very far-flung solution to what’s likely a very easily solved problem.
Would anyone on here have any decent recommendations on how I can go about getting this working?