Help!im stuck....Godot 4.3

In our project, I used 1920×1080 backgrounds, and for enemies and obstacles, I used 256×256 sizes. I have tried enabling “Snap to Pixel” and rounding the position, and the filter is already set to “Nearest.” The issue only occurs when I’m moving (jittering)…this is the exact problem im facing https://www.youtube.com/watch?v=DsiDPJ_dl0Y

Can you post the code in the script attached to the movement script?

extends Node2D

func _ready():
pass
#Engine.max_fps = 60

func _process(delta: float) → void:
if global_position.x > 500: #when idle its crisp
return

var target_x = global_position.x + 500 * delta
global_position.x = round(lerp(global_position.x, target_x, 0.9)).....i have tried everything on code wise, nothing changes :(....the video issue is the exact one im facing(tested on more than 3 devices)

Maybe this could help?

Or this one?

Because these videos have these weird pixel looking movement to them, so i thought this could work.

I don’t know exactly what is the reason for the jittering (the post by @isabelle_alejar seems helpful), but there are two things I’d like to point out:

Posting code

To post multiline code, put it between a pair of three grave accents (3.3. ```). This way it’s more readable.

Usage of lerp()

This

var target_x = global_position.x + 500 * delta
global_position.x = lerp(global_position.x, target_x, 0.9)

has the same effect as

var target_x = global_position.x + 450 * delta # 500 * 0.9 = 450
global_position.x = target_x

lerp() doesn’t make anything smoother, it just outputs a number somewhere between two other numbers

2 Likes