ive started making a character for a platformer. i have been testing out movement, and now testing building tilemaps.
if i move on flat tilemaps, it jitters a little, but as soon as some tilemaps appear that are not level with the ground the camera goes crazy. i have seen some issues say that character needs to be an even number of pixels in width but this does not help either. please help.
I found the issue. It was because in part of my run cycle no part of my sprite was touching the bottom of the editor, so the camera would jump on that part while i was running. Hope that helps somebody else too
This is happening because one of your animations frames is causing your character to be momentarily not touching the ground, causing them to start falling. Then, when the next frame happens, the character has become clipped into the tilemap floor and so it gets ejected out, causing the glitchy motion. You simply can’t tell this is happening when all the tiles are the same, but as soon as other tiles appear you can tell that the character is getting repeatedly teleported backwards every time the animation loops.
You can fix this by having an invisible hitbox sprite that doesn’t move controlling everything and teleporting another sprite to its location in an On Game Update loop and running the animations on the teleported sprite. You can turn a sprite invisible while keeping its hitbox by turning on the sprite flag “invisible”, and remember to make the animation sprite “ghost through walls” so it doesn’t clip weird on tilemap walls.
thanks guys, I discovered what the issue was just before I went to bed but had to wait for post approval to write it on here cant believe it was so simple, this had me stumped for a whole day