Camera size in a pixel game

How do I properly set up the camera for a pixel art-style game? My base resolution is 640x360. I used a 32x32-pixel character. I added a Camera2D to it with Zoom = 1.0. Everything ended up being too small, and with Zoom = 2.0, everything was too large.
If I set it to something like Zoom = 1.5, the pixels become distorted.
What should I do in this case?

Have you set your project properties correctly ?

In General → Display → Window → Stretch:

Mode on canvas_item
Aspect on Keep
Scale Mode on integer

And in General → Rendering → Textures

Default texture filter on Nearest.

And also put back the camera zoom to default value

In Project Settings->Display you want viewport to be your base resolution, but then window override to make the actual game bigger.

image

You can’t have a zoom of 1.5 and still have pixel art without distortion. Either change the size of your viewport or change the size of your art.