-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
The Clip Children option in Sprite2D does not work correctly #79885
Comments
@Aidaxo Please upload a minimal reproduction project to make this easier to troubleshoot. |
Minimal reproduction project is attached |
Most likely related: unknown_2023.08.06-03.01.mp4This does not seem like intended behaviour. |
Can confirm this is an issue. Sprite2D parent simply cannot clip children (also Sprite2D) at all. Still an issue for latest Godot 4.2 |
The problem here is that you are trying to enable clip_children on a node that is a child of a CanvasGroup. The docs explicitly say that you cannot do that:
That being said, there is already a PR to change the behaviour of clip_children so that it will support nesting. See #74859 |
Godot version
4.1.1.stable
System information
Godot v4.1.1.stable - Windows 10.0.20348 - Vulkan (Forward+) - dedicated NVIDIA RTX A2000 12GB (NVIDIA; 31.0.15.3625) - Intel(R) Xeon(R) Gold 6342 CPU @ 2.80GHz (48 Threads)
Issue description
The 2D Masking / Clipping feature was introduced in version 4.0.
https://godotengine.org/article/godots-2d-engine-gets-several-improvements-upcoming-40/
It was a really handy feature, but when updating 4.0->4.1.1 it suddenly stopped working.
The test project opened in Godot 4.0 is displayed correctly.
The same project opened in 4.1.1 looks bad.
Experimentally, we were able to establish that the changes in the behaviour of the function occurred in 4.0.1.
Steps to reproduce
When Clip Children=Clip Only is enabled in the properties of the masking Sprite2D, its texture continues to be displayed and no masking occurs.
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: