- Edited
Hi.
I'm using KB2D for the player, and move_and_slide_with_snap
inside _physics_process
to move it. It's a pixel perfect demo with GPU pixel snap
on.
The moving platform is another KB2D animated by an AnimationPlayer node. It has Sync to physics
on and Process Mode
set to physics in AnimationPlayer.
Most of the time, when the player lands on the platform it jitters, as if the player is moving ahead of the platform by one pixel from time to time. Sometimes, readjusting the player position by making a tiny movement can make the jitter disappear. I suspect that the use of floats for the position of the player and platform is causing the problem. When rounding to pixel positions on the screen they might be offset by up to 1 pixel depending on the result of the roundings in the player and platform.
Might i be right in this assumption? Any way to fix it?
Thanks.
EDIT: Improved the explanation a bit in hopes it gets me some answer.