GUI: delegatePickingToChildren & detectPointerOnOpaqueOnly / Does it work from containers?

I have a question. Using the GUI Editor I’m making a wheel interface from svgs.
I thought I would create a rectangle container with a child image and pile them up. Next use a combination of delegatePickingToChildren & detectPointerOnOpaqueOnly to pick from the image inside the container. Either I’m doing something wrong or my svg is not correct or QUESTION: Does ‘delegatePickingToChildren’ work for containers? Thanks,

Edit: Meanwhile, I guess I got my answer. It’s always easier to ask then to try, isn’t it? :grin:
But meanwhile, replaced all of my assemblies of rectangle+image with button+image and it appears the button version works as expected whereas the rectangle+child image doesn’t. So I guess the answer is that the child is the child of a control (or better said, the part of a control), not of a container.

So now I guess my next question is:
Any way to make it so that this would also work with the child of a container or anything I’m doing wrong?

Here are my two GUI Editor versions for trial:

Rectangle + child image version:

Image button version:

Testing PG:

Hello mawa! :smiley:

I looked at the code and it turns out delegatePickingToChildren is part of Button only, not Containers in general: Babylon.js/button.ts at master · BabylonJS/Babylon.js (

1 Like

Acknowledged. Do you believe it would make sense and would be possible to extend this to all children?

I’d say there shouldn’t be any problem with that, we can add it after the 6.0 release :slight_smile:

EDIT: Added an issue so we can keep track :smiley: Extend delegatePickingToChildren to all Container controls · Issue #13692 · BabylonJS/Babylon.js (

sure looking forward to that release :child: :smile:
Thanks and have a great day :sunglasses: