godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.68k stars 20.11k forks source link

Drawing multiple circles lets weirdly hide other nodes #39052

Closed MaaaxiKing closed 1 year ago

MaaaxiKing commented 4 years ago

Godot version:

3.2.1

OS/device including version:

Windows 10 Home 1909 GLES3 Intel(R) UHD Graphics 620

Issue description:

My ColorPicker disappears after when drawing a circle. Same problem with Sprites. (old)

If I draw more than one circle, other nodes will be being hidden; I could't find out when which node is being hidden.

Steps to reproduce: _Create a Scene with root Node Control. Add a ColorPicker/Sprite with texture as a child. Attach a script to the root node. Type in this script:

func _draw(): draw_circle(Vector2(50,50),50,ColorN("orange"))

Start the scene. (old)_

Create a scene with root node Node and attach a script to it. Add a sprite as a child to it. Go into the script and in the _draw() function draw a circle in any line and another circle in another line. Create a ShaderMaterial and then a new shader like it is in the file and attach it to the sprite. Run the game. Minimal reproduction project:

_https://www.youtube.com/watch?v=J5hABWg_isY_ (old)

bug test.zip

Calinou commented 4 years ago

@MaaaxiKing Can you upload a minimal reproduction project here, please? (In other words, a Git repository or ZIP archive of the project.)

MaaaxiKing commented 4 years ago

bug test.zip

MaaaxiKing commented 4 years ago

Maybe, I just don't understand how drawing works. Also I can't comprehend why drawing isn't allowed in every function.

KoBeWi commented 4 years ago

This is a ColorPicker bug: #33367 Your ColorPicker drifts out of screen on start (you can check in remote tree). As a workaround you can put it into a container.

MaaaxiKing commented 4 years ago

What I expected to submit is: Drawing multiple circles let weirdly hide other nodes. If I drew more than one circle, other nodes are being hidden; I could't find out when which node is being hidden. Create a scene with root node Node and attach a script to it. Add any visual node as a child to it. Go into the script and in the _draw() function draw a circle in any line and another circle in another line. Run the game. SO PLEASE REOPEN THIS ISSUE!

MaaaxiKing commented 4 years ago

Could this have bug and maybe topic:gdscript label?

Calinou commented 4 years ago

@MaaaxiKing I'm not 100% convinced this is a bug yet, this needs further testing and reproduction from other people.

This issue is also not related to GDScript, as you'd run into the same issue when using C# or GDNative.

KoBeWi commented 4 years ago

But I can't reproduce it, not sure why was this reopened. Attach a new project, the previous one shows an unrelated bug. The ColorPicker will be visible when you change its anchors to centered. Also your steps in https://github.com/godotengine/godot/issues/39052#issuecomment-636191388 are too vague.

MaaaxiKing commented 4 years ago

What I've written at the top is something different which I unintentionally found but this comment is the real bug. Should I better submit it as a new issue and this will be closed after I'll have referred to this new one?

KoBeWi commented 4 years ago

You can edit the original post with new details, there's no need for another issue.

MaaaxiKing commented 4 years ago

I now noticed it has to do something with my shader. It is made by GDQuest. https://www.youtube.com/watch?v=LAa8UE3ItM8 But how to fix this?

KoBeWi commented 4 years ago

I opened the project and it looks fine. image Which part is supposed to disappear? If the above screenshot looks differently than on your side, it's probably hardware-specific issue.

MaaaxiKing commented 4 years ago

Add a button or no matter what visual node. Nevertheless, I don't see the heart when the game is running.

KoBeWi commented 4 years ago

Eh, so someone else with the same GPU should test it.

MaaaxiKing commented 4 years ago

I've had problems again using this shader. I used it for a Stone scene and I instanced multiple of them in another scene. In the Editor, just one stone was visible and if I changed its visibilty, another became visible. In the game it worked.

Calinou commented 1 year ago

@MaaaxiKing Can you (or anyone else) still reproduce this bug in Godot 3.5.1 or any later release?

If yes, please ensure that an up-to-date Minimal Reproduction Project (MRP) is included in this report (a MRP is a zipped Godot project with the minimal elements necessary to reliably trigger the bug). You can upload ZIP files in an issue comment with a drag and drop.

Calinou commented 1 year ago

Closing due to lack of response. Please comment if you can still reproduce this bug on the latest Godot version.