You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently upgraded to 4 and found out about the option "Snap 2D Transforms to Pixel" that replaced GPU pixel snap and how it should fix the known camera jitter when applying smoothing to a Camera2D. Enabling it does fix that but introduces sprite jittering that makes it look blurry and vibrating, reminds me of when you put move_and_slide() in _physics_process but not as violent.
I found an issue #63185 that seems to showcase this exact issue with video but for me, all the other sprites aren't jittering, it's only my player that the camera is following. My sprite's jitter is more intense that that of this person experiences but I think that's either because I have a faster move speed or due to camera smoothing they don't to use. Disabling smoothing however removes the issue completely but of course, I'd like to use it.
Steps to reproduce
In the minimal reprod steps below, you can find a demo project with these steps already done for you, make sure the snap setting is enabled though.
Create a small 16x16 sprite, preferably fill it with a bright color and a black outline.
New project
Project Settings
Enable advanced settings
Under rendering / 2D, enable Snap 2D Transform to Pixel(can also enable snap vertices but it doesn't change anything for me)
Create a 2D scene, change type to CharacterBody2D
Attach a new script and add the code at the bottom. Add a sprite node set the sprite as the one created in step 1. Add a Camera2D too and enable "Current". Enable "Position Smoothing" and set its value to 15, then save the scene as "Player".
Make a new 2D scene and optionally add a tilemap if you want
I know this issue is annoying but you can avoid it in pixel perfect games by setting a small drag margin to your Camera2D and also by increasing the smooth speed of the camera if it still jitters. please confirm if this fixes the issue so i can open an issue to note this in docs.
Godot version
4.0 beta8
System information
W10, GTX 1070, driver 527.56, Vulkan
Issue description
Recently upgraded to 4 and found out about the option "Snap 2D Transforms to Pixel" that replaced GPU pixel snap and how it should fix the known camera jitter when applying smoothing to a Camera2D. Enabling it does fix that but introduces sprite jittering that makes it look blurry and vibrating, reminds me of when you put move_and_slide() in _physics_process but not as violent.
I found an issue #63185 that seems to showcase this exact issue with video but for me, all the other sprites aren't jittering, it's only my player that the camera is following. My sprite's jitter is more intense that that of this person experiences but I think that's either because I have a faster move speed or due to camera smoothing they don't to use. Disabling smoothing however removes the issue completely but of course, I'd like to use it.
Steps to reproduce
In the minimal reprod steps below, you can find a demo project with these steps already done for you, make sure the snap setting is enabled though.
Player.gd
Minimal reproduction project
New Game Project.zip
The text was updated successfully, but these errors were encountered: