Hello, I want an object to be invisible when touching it. How can I do this, please tell? Thank You :blush:
There's an Disabled/Visible property, you can change by hand or script by having a variable connected to the node then use the variable to edit the Disabled/Visible property.
If you want to do it permanently, Use free() | queue_ free()
free() | queue_ free()
I want to do it over a script, can you explain with an example?
Something like this should work:
# make it invisible (Node2D-based and Control-based nodes) $Sprite.visible = false # make it visible $Sprite.visible = true # This does the same thing as clicking the little eye icon in the # Godot editor. # To delete a node: $Sprite.queue_free() # You can also use the free() function, but in general its better # to use queue_free when possible to let Godot handle the timing.