The reason is that we currently treat the aabb as a 3d box (-1 -1 -1)-(1 1 1) so for instance rotating a box around Y (up to 45) will of course make it grow in X. We always render the box as a flat (2d) rectangle.
TODO:
Respect the physics type (2d/3d) when drawing and for aabb
Mimic the engine support for collision objects. For instance, when using 2d physics the engine only respects rotations around Z.
Expected behaviour
The rotated object shouldn’t be selected when I clicked on it outside of the visible bounding box.
Actual behaviour
Steps to reproduce
Copy from https://github.com/defold/defold/issues/3862 :