godot
godot copied to clipboard
CanvasGroup culls (disappears) too early
Tested versions
v4.2.2.stable.official [15073afe3]
System information
Windows 10 - v4.2.2.stable.official [15073afe3]
Issue description
A CanvasGroup node that overlaps a _draw
call culls itself (disappears) early when a Camera2D zooms out.
https://github.com/godotengine/godot/assets/25368491/0270e220-0312-4289-b47a-712ae12512c7
Steps to reproduce
- Open MRP project
- There are two sprites in a 2D scene
- The sprite on the left is a normal sprite
- The sprite on the right is red, and is a child of a CanvasGroup node
- A 2D grid covering the entire screen is made using a
_draw
call
- Zoom out with camera
- Notice how the sprite under the CanvasGroup node disappears when you zoom too far out
Minimal reproduction project (MRP)
Oddly enough, setting Y Sort Enabled = true on the canvas group fixes this issue.
EDIT: Ah, but enabling Y-sort disables the canvas group behavior altogether, therefore there's no workaround.