Don't draw empty red "colliding" selection boxes
Posted: Fri Oct 27, 2023 9:59 am
Selection boxes have a few ways they can be influenced. The default for selection_box is documented as {{0, 0}, {0, 0}}, which has zero area and is described as "empty". Empty selection boxes can't be moused-over and therefore the entity is unselectable. Furthermore, if selectable_in_game is set to false, no (yellow) selection box is drawn at all, whether empty or not.
However the red "colliding selection box" (I don't know how if it has a proper name), the one you get when you can't place an entity because it collides with something, is still drawn even if selectable_in_game is false. If the entity has an empty selection_box, the corners of the box collapse to the entity's centre and it resembles a red cross-hair. I've tried a few other flags and properties but none of them seem to affect this (please let me know if I am missing something).
My expectation was that selectable_in_game = false would also stop the red collision warning selection box from being drawn.
However the red "colliding selection box" (I don't know how if it has a proper name), the one you get when you can't place an entity because it collides with something, is still drawn even if selectable_in_game is false. If the entity has an empty selection_box, the corners of the box collapse to the entity's centre and it resembles a red cross-hair. I've tried a few other flags and properties but none of them seem to affect this (please let me know if I am missing something).
My expectation was that selectable_in_game = false would also stop the red collision warning selection box from being drawn.