Types/BoundingBox: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
m ("full" example using left_top and right_bottom)
(Removed old prototype docs)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
'''BoundingBox''' is set of two [[Types/Position]]. BoundingBoxes are typically centered around the position of an entity.
<div class="stub"><p>'''The prototype docs have moved to a new website with an improved format.''' This documentation page can now be found here: [https://lua-api.factorio.com/latest/types/BoundingBox.html https://lua-api.factorio.com/latest/types/BoundingBox.html]


In Factorio, the coordinate system is in a "programming" orientation, left-to-right, top-to-bottom. The upper-left point is the ''least'' dimension in x and y, and lower-right is the ''greatest''.
</p><p>This wiki page is no longer updated and '''will be removed at some point in the future''', so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback [https://forums.factorio.com/viewforum.php?f=233 on the forums].</p></div>
 
It is specified like this:
    {{-0.4, -0.4}, {0.4, 0.4}}
 
The first position is assumed to be leftTop, the second position is assumed to be rightBottom. A third member may be added, a [[Types/float]] that represents the orientation, however it does not seem to be used.
 
The less commonly seen, but expanded form:
    {
        left_top = {-0.4, -0.4},
        right_bottom = {0.4, 0.4}
    }

Latest revision as of 14:32, 25 October 2024

The prototype docs have moved to a new website with an improved format. This documentation page can now be found here: https://lua-api.factorio.com/latest/types/BoundingBox.html

This wiki page is no longer updated and will be removed at some point in the future, so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback on the forums.