Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CanvasGroup culls (disappears) too early #91922

Open
Atlinx opened this issue May 13, 2024 · 1 comment
Open

CanvasGroup culls (disappears) too early #91922

Atlinx opened this issue May 13, 2024 · 1 comment

Comments

@Atlinx
Copy link
Contributor

Atlinx commented May 13, 2024

Tested versions

v4.2.2.stable.official [15073af]

System information

Windows 10 - v4.2.2.stable.official [15073af]

Issue description

A CanvasGroup node that overlaps a _draw call culls itself (disappears) early when a Camera2D zooms out.

canvas_group_culling_bug.mp4

Steps to reproduce

  1. 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
  2. Zoom out with camera
  3. Notice how the sprite under the CanvasGroup node disappears when you zoom too far out

Minimal reproduction project (MRP)

CanvasGroupBug.zip

@Atlinx
Copy link
Contributor Author

Atlinx commented May 13, 2024

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.

@clayjohn clayjohn added this to the 4.x milestone May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants