Node2D.clip_children strangely replicating content from elsewhere on the screen

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By AndyAstrand

So I have a 2D+3D scene, with the 2D providing a HUD. Although I have seen this behaviour before on a purely 2D scene.

I have a profile at the top of the screen, avatar face in a round frame. In order to clip the avatar face to the round frame I’m using a extra node which is the parent of the face, with a texture from a PNG in order to mask it’s child, and the have the clip_children option set true.

It does work. The avatars face is clipped to the circle. But instead of seeing the black background behind the face/mask provided by another Node2D behind. I’m instead seeing a chunk of the 3d part of the screen, shrunk and moved and displayed their instead. It even changes and updates as the rest of the screen is animated.

It’s an interesting effect, but not one that I’m after. And I can’t see that I’m doing anything wrong. Example below:

The code adding the nodes is very simple:

var bg =
bg.texture = _frame_bg = "FrameBG"

var m =
m.texture = _avatar_mask = "AvatarMask"
m.clip_children = true

var a =
a.texture = _avatar_image = "AvatarSprite"

var g =
g.texture = _frame_glass = "GlassSprite"

var f =
f.texture = _frame_image = "FrameSprite"

Edited to fix forum code formatting…

jgodfrey | 2023-06-27 19:39

:bust_in_silhouette: Reply From: AndyAstrand

This seems to be a known bug and open as of April 15th.

I shall relax about it for now.