Install Asset
Install via Godot
To maintain one source of truth, Godot Asset Library is just a mirror of the old asset library so you can download directly on Godot via the integrated asset library browser
Quick Information
Pixel-perfect Camera2D smoothing for Godot 4.x pixel art games.Godot's built-in Camera2D position smoothing rounds to whole pixels after interpolating, discarding the sub-pixel remainder every frame. The result is a jitter artifact: the camera snaps instead of glides, and sprite edges visibly crawl during movement.This script replaces the engine smoothing entirely. It tracks a high-precision float position separately, interpolates it each frame, and only snaps to the nearest pixel grid point at the final render step — preserving smooth motion in logic while keeping crisp pixels on screen.Features:- Configurable follow speed and pixel size via Inspector- Pixel grid snapping (toggle on/off)- Static world-space base offset- World boundary clamping- snap_to_target() and set_follow_target() public API- Zero dependencies — works in a blank projectDrop PixelPerfectSmoother.gd onto your Camera2D. Set follow_target to your player node. Done.Godot 4.x only. GDScript 2.0.Extended version with velocity-based lookahead available at nullstateassets.itch.io.
PixelPerfectSmoother — Lite
Stop fighting your engine. Ship faster.
The Problem
Camera2D smoothing is jittery with pixel art.
Godot's built-in position smoothing rounds to whole pixels after interpolating, discarding the sub-pixel remainder every frame. The result: the camera snaps instead of glides, and sprite edges crawl during movement. There is no clean built-in fix.
The Solution
Drop script.gd onto your Camera2D node. It replaces the engine's smoothing with a high-precision float position that is tracked separately, smoothed independently, and only snapped to the pixel grid at the final render step.
No plugins. No autoloads. One file.
What's in the Lite Version
- Sub-pixel accurate position tracking and smoothing
- Configurable follow speed and pixel size via Inspector
- Pixel grid snapping (toggle on/off)
- Static world-space offset (
base_offset) - World boundary clamping
snap_to_target()andset_follow_target()public API
What's in the Full Version
The full version adds velocity-based lookahead: the camera reads your CharacterBody2D's velocity and shifts ahead of movement direction, giving a cinematic anticipation feel. Two exports control strength and smoothing independently so you can dial in the exact camera personality your game needs.
Full version on itch.io: https://nullstateassets.itch.io
Quick Start
- Copy
script.gdinto your Godot project. - Attach it to your Camera2D node (replaces it — Camera2D is the base class).
- Set
follow_targetto your player node in the Inspector. - Hit Play.
Compatibility
| Engine | Language | Tested On |
|---|---|---|
| Godot 4.x | GDScript | 4.2, 4.3 |
License
MIT License. Free for personal and commercial use. Attribution appreciated but not required.
Pixel-perfect Camera2D smoothing for Godot 4.x pixel art games.
Godot's built-in Camera2D position smoothing rounds to whole pixels after interpolating, discarding the sub-pixel remainder every frame. The result is a jitter artifact: the camera snaps instead of glides, and sprite edges visibly crawl during movement.
This script replaces the engine smoothing entirely. It tracks a high-precision float position separately, interpolates it each frame, and only snaps to the nearest pixel grid point at the final render step — preserving smooth motion in logic while keeping crisp pixels on screen.
Features:
- Configurable follow speed and pixel size via Inspector
- Pixel grid snapping (toggle on/off)
- Static world-space base offset
- World boundary clamping
- snap_to_target() and set_follow_target() public API
- Zero dependencies — works in a blank project
Drop PixelPerfectSmoother.gd onto your Camera2D. Set follow_target to your player node. Done.
Godot 4.x only. GDScript 2.0.
Extended version with velocity-based lookahead available at nullstateassets.itch.io.
Reviews
Quick Information
Pixel-perfect Camera2D smoothing for Godot 4.x pixel art games.Godot's built-in Camera2D position smoothing rounds to whole pixels after interpolating, discarding the sub-pixel remainder every frame. The result is a jitter artifact: the camera snaps instead of glides, and sprite edges visibly crawl during movement.This script replaces the engine smoothing entirely. It tracks a high-precision float position separately, interpolates it each frame, and only snaps to the nearest pixel grid point at the final render step — preserving smooth motion in logic while keeping crisp pixels on screen.Features:- Configurable follow speed and pixel size via Inspector- Pixel grid snapping (toggle on/off)- Static world-space base offset- World boundary clamping- snap_to_target() and set_follow_target() public API- Zero dependencies — works in a blank projectDrop PixelPerfectSmoother.gd onto your Camera2D. Set follow_target to your player node. Done.Godot 4.x only. GDScript 2.0.Extended version with velocity-based lookahead available at nullstateassets.itch.io.