0 votes

Hi everyone,

my ScrollContainer has a VboxContainer (filled with all kinds of stuff) as a child. Now I would like to place an invisible shape on top (a small circle or square) that hides everything scrolling by underneath.
Is there any simple way to achive this, maybe by using a shader or rather a light- or cull-mask?

EDIT:
It appears not to be a trivial issue at all...
I tried this:

func _draw():

     VisualServer.canvas_item_set_clip(get_canvas_item(),true)

which works even with sprites, but only with the rectangular bounding box and not with any shape the sprite might offer.
I hear the issue will be addressed in version 4 though.

Godot version 3.3
in Engine by (464 points)
edited by

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected]ine.org with your username.