godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.54k stars 20.27k forks source link

Camera2d smoothing sprite position jittering #48130

Open Kacper-Kondracki opened 3 years ago

Kacper-Kondracki commented 3 years ago

Godot version: 3.3

OS/device including version: Windows 10 20H2

Issue description: When the camera2d with the smoothing option enabled is the child of player, the player sprite jitters despite I enabled pixel snap. This bug occurs in both 2d and viewport rendering mode

Animation

The player sprite should be perfectly aligned with the wall

Steps to reproduce:

  1. Use pixel sprites
  2. Add camera2d as child to player
  3. Enable smoothing
  4. Collide the player with wall and observe

Minimal reproduction project:

Nowy projekt gry2.zip

Calinou commented 3 years ago

See https://github.com/godotengine/godot/issues/43800. As you can see with the reverted pull requests, solving this is a difficult problem and has been postponed to 3.4 or later. It may be possible to provide a solution on an add-on level until this is fixed in core.

Wladastic commented 8 months ago

I was told in another issue that this can be fixed by just setting the renderer to physical instead of idle. Works for me. The framerate just doesn't match the updating process which makes it jump like that.