HitBox: recheck computation of bounds
Anything that uses "bounds" is not quite correct since it doesn't account for transforms. Instead, we should use min and max world, which do take transform into account.
Does this explain the problem I have with hitboxes for circles?
I went through the tutorial "Adding Collisions (FXGL 11)" and found that the hitbox automatically generated for the yellow circle when using viewWithBox() is not accurate. It looks like the hitbox has its upper left corner in the center of the circle. Judging from how collisions are triggered I think the hitbox of the circle actually looks like the red square in the image.
I am using FXGL 11.9, and I have experienced the same problem both on Windows and macOS.
No, actually it isn't an issue per se. It's related to how javafx draws circles. If your circle has radius 10, just create your circle new Circle(10, 10, 10) to make javafx draw the circle from top-left, rather than from centre.
And thanks, I updated the tutorial:
new Circle(15, 15, 15, Color.YELLOW)
That worked better! Thanks for answering, and for updating the tutorial!