Download

Tilemap Collision Jitter

Hey all,

I’m just getting started with Unreal and Paper2D and noticed this problem

I am using a tilemap for a 2D topdown level with collisions set for walls and floors and a paper2D character to walk around it.

I’m noticing some jitter in the rendered tilemap when the player walks around, and particularly when colliding and moving along a wall. I’m uploading a GIF of this below, and a couple images showing the tilemap collisions and the movement I have set on the character blueprint.

Has anyone come across this issue before?

unreal-collision-jitter

Try doubling the amount moved 1 to 2 and -1 to -2. I don’t use paper2d on account of it being terrible in every way shape and form because the devs don’t care about it, but I could at least try to help you with my limited knowledge

1 Like

Hi thanks for the suggestion

I managed to get some great advice and a fix for this from Daniel Clute (see upwork)

Paraphrasing (hopefully correctly) the distortion is due to sub-pixel movement of the character and the camera not aligning to the pixel grid. This was more evident when the character was moving slowly.

The fix that greatly reduces this effect was to remove the car-like slow acceleration and deceleration of the character. That’s achieved by setting the Max Acceleration and Ground Friction to very high values on the Character Movement Component (5000)

This doesn’t remove the distortion completely, but there’s a blog here by Ludicrous Games which goes into more advanced techniques for addressing this

fixed-movement

char-movement-fix

Interesting.

i had similar problems, and it got worse the moment, jumping and falling was implemented (it was impossible to get exact and repeatable jumping results). So after a way to long time trying to fix it (f.e. with way over the top accelleration etc.) i have completely thrown out those character movement components and replaced them with my own version of a grid movement system. This way its way more stable and jitterfree, it´s using the “move actor/component to node”.
Fair word of warning, that movement node ignores collisions, thats why i have some booleans, that are set to true or false, if the path is blocked or not (right now i am using a boxtrace for this, but i recently found out how to read the tiles fom the tilemap itself, so maybe i use this data in the future to save the boxtraces).

Here is the core part of my Grid movement, this one is for the X axis movement, an identical setup exists for the Y axis too. Speed is set by the X and Y Step size (thats how far it will move in one go) and the Grid Tile travel time (how long it shall take to travel this one step).

1 Like