In this example: Phaser 3 camera example
there is a slight random jitter when moving the sprite. By “jitter” i mean a mini quick teleportation, the sprite stops and teleports quickly, randomly.
It seems to happen more often when you:
open the dev tools.
click on it to lose the window focus.
click back on the game.
then move the sprite for a few seconds in only one direction.
But it happens also without doing that (less often, i guess it’s due to panic or deltaHistory)
It occurs when the camera is set to follow a sprite and lerp is not (1,1).
roundPixels true or false doesn’t fix it.
Tested on two computers, chrome and firefox.
It bothers me because in my new game, the player can fall for a long time and it does the same jitter.
I am creating a top down shooting game like asteroid, all the enemies are jittering like you said when they are coming down . I am using arcade physics in my project and the enemy objects are moved by setting a velocity for Y axis.
in Phaser 3.5 this.physics.world.fixedStep = false fixes the jitter,
but it completely ruins the physics consistency in different screen refresh rates. For example, the same jump at the exact same time will produce slightly different trajectories on 60hz screen and 75hz.
Needless to say it’s not an acceptable solution for precise platformer gameplay or precise speed run timed games.
Is there another solution ?
This is still an issue with the basic camera follow example on the site, kind of a basic feature…
fixedStep, setting physics fps to 120, camera rounding, none of these has any effect.
I’ve had to park my project on v3.24 because this was the last time camera follow worked properly