Node now showing when position is off screen with clip children

Godot Version

v4.1.3.stable.official [f06b6836a]

Question

I have a PanelContainer with clip_contents enabled that is hiding its TextureRect child whenever the TextureRect’s position is of screen. Parts of the texture rect are still on screen but as soon as its position leaves the screen it all gets hidden. Minimal reproduction project
To reproduce the problem I’m having open the min rep project and, using the move tool, move the TextureRect so that it’s position is of the screen but part of it is still showing. The TextureRect should hide as soon as its centre is off screen. My question is how to stop this happening.

Thanks in advance.

This sounds like a bug with the editor not matching the running scene. I think you should report it here: Issues · godotengine/godot · GitHub.

Sorry, I forgot to mention, it does the same in the running project. Still a bug?

Weird, when I move the center off screen in the editor, it shows the texturrect. But when I run it, it disappears.

Edit: After testing, it seems that I’ve found a different bug. I will report it.

Edit 2: The issue is because the size of your TextureRect is 0. Make the size of the TexutreRect match the size of the actual image.

Thanks, making the size the same as the image worked. I used the Keep Size Expand mode on the TextureRect.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.