Open Awfyboy opened 1 week ago
Oh, huh. I just turned off 'Snap 2D Transforms to Pixels' and now the issue is gone.
That helps in identifying what's causing this, it probably forces the grab handles to position themselves like that, and the way the box jumps back and forth
I'd say it shouldn't do that but unsure how to get around it in the editor
Can confirm the bug for Sprite 2D too, and I guess for other CanvasItems where the pivot is not in (0, 0)
Found the suspicious code: https://github.com/godotengine/godot/blob/74de05a01c8716a42d4e3427f607d7bea76b35e5/servers/rendering/renderer_canvas_cull.cpp#L287-L290
If I comment this out, the rendering comes back to normal
Until the bug can get fixed, the way I solve it now is, I turn off 'Snap 2D Transform to pixel' in the project settings, then turn it on when the game starts using an AutoLoad script. That way snapping is turned off in the editor but in-game the pixels get rounded off properly, so in the editor sizing works properly as well. I kind of need that snapping option for pixel art games so for the time being this workaround is fine:
extends Node
func _ready() -> void:
RenderingServer.viewport_set_snap_2d_transforms_to_pixel(get_viewport().get_viewport_rid(), true)
Tested versions
System information
Windows 11 - Godot v4.3 - Forward+ Renderer - Intel UHD Graphics 630
Issue description
When changing the size of a CollisionShape2D, there appears to be some scaling artifacts that glitches the visual of the shape. The size is correct in the inspector but incorrect in the editor so it appears to be a visual bug. Collisions also seem to work fine.
Steps to reproduce