GUI - Issue with detectPointerOnOpaqueOnly when using rotation

Hello BJS Community !

First, thanks a lot for all the wonderful work !

I didn’t find anything about my problem in the forum nor in github so I post it.

I use BJS GUI with SVG in my app. detectPointerOnOpaqueOnly = true helps a lot to ensure that the picking zone is set to the svg icon boundaries.
However, after setting the rotation attribute to the control, the displayed icon is well rotated but the interactive zone remains the same as before the rotation.

Here is PGs with buttons:

Or with images

On hover, the green svg should appears.
It works but with the not rotated boundaries (aka the same boundaries than the green svg).

Thanks for all answers !

Hello! I’ll take a look at this :slight_smile:

2 Likes

Thanks for the report, a PR is up to fix this: Fix opaque only picking for rotated controls by carolhmj · Pull Request #14561 · BabylonJS/Babylon.js (github.com)

4 Likes