scene.input.setDebug() inside Container

Hi,

I was trying to visualize the bounds of a clickable Image the I placed in a Container by using scene.input.setDebug() and couldn’t make it work. After some tweaking I found out the Rectangle was outside of the camera view. It seems like the location of the debug Rectangle is not taking into account the parent Container’s position. Here is an example.

How can I manage to place the Rectangle correctly ?

Thanks

Ok I think I figured it out. I had to add the hitAreaDebug to the Container too.

this.myContainer.add(myImage.input.hitAreaDebug);

Is that the right way of achieving that ? If yes, is this behavior intentional ? Shouldn’t the hitAreaDebug be added automatically to the Container ?

1 Like

That looks fine.

1 Like