godotengine / godotengine/godot-docs

Document Camera2D avoid Jitter in pixel perfect games

Open
#7,774 5 comments 4 reactions 0 assignees View on GitHub
area:manual enhancement
Dominant language
reStructuredText
Stars
5.7k
Forks
3.8k
Avg merge
1d 20h
Merged PRs (30d)
25

Description

### Godot version

3.x and 4.x

### System information

Windows 10

### Issue description

I have found many opened issues about camera 2D jitter in pixel perfect games when enabling smoothing so I'm opening this to link all of them to get closed when this is fixed.

Fixing this may close:
https://github.com/godotengine/godot/issues/73347
https://github.com/godotengine/godot/issues/71074
https://github.com/godotengine/godot/issues/54974
https://github.com/godotengine/godot/issues/48200
https://github.com/godotengine/godot/issues/46681
https://github.com/godotengine/godot/issues/26291
https://github.com/godotengine/godot/issues/64747
https://github.com/godotengine/godot/issues/48130

ways to fix this issue:

1- enable snapping options in project settings rendering/2d/snap/snap_2d_transforms_to_pixel later enables rendering/2d/snap/snap_2d_vertices_to_pixel if the first option doesn't solve the issue.

2- set a small drag margin in Camera2D to avoid jitter, it happens only when the Camera2d is about to reach it's desired location, for example moving from Vector2(0, 0) to Vector2(1, 0) with smoothing enabled will result in a jitter because the camera's x position will be a float between 0 and 1 while having a small drag margin will make you avoid this issue.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.