How to set up smooth sub-pixel camera movement for pixel art games?

Question

I have a pixel art game that I want to render with viewport mode, however I’d like the camera to be able to move at subpixel values to prevent jitter from pixel snapping.

This tutorial was perfect but it isn’t working as-is for Godot 4. I’m wondering if anyone has figured out a good solution yet?

1 Like

I used this video and it solved my own smoothing issues for my 2D pixel game:

1 Like

It’s a very long-standing issue: Simplify smooth camera movement in pixel perfect games · Issue #6389 · godotengine/godot-proposals · GitHub

There are some workarounds in the discussion, but no solution so far.

1 Like

I just started looking into this project and in godot 4.2.2 the smothing on the camera2d is still a problem for pixelart games. I am using the solution defined here: How to set up smooth sub-pixel camera movement for pixel art games? - #2 by FalseCognate and it works perfectly. In my case I had to remove the .floor() call at the end.

1 Like