So is there any way to fix this camera stuttering / character movement stuttering glitch? I just can’t seem to figure out why it’s doing this & it’s driving me crazy.
What is going on & how to fix?
When moving my character / jumping, the camera & / or player somewhat stutters for some reason.
I couldn’t find anything out of the ordinary in the code.
I did use chrome dev-tool performance tab and recorded a little bit to see.
Every now and then one task takes 100ms to execute, creating the stutter.
Upon further inspection I saw that your level1.json is 176kb, I think the slowdown might have something to do with that. Your tilemap json files shouldn’t be that big, there’s some assets encoded in it and it bloat it :0
Hmmm…seems the lerp values in the camera are causing the stuttering. Anything beside 1 will make it shake occasionaly. Try this.cameras.main.startFollow(this.player, false, 1, 1, -80, 0 );
You can fine tune the offset (-80) to have the same placement you wanted :0