Types/BoundingBox

From Official Factorio Wiki
Revision as of 10:19, 2 May 2023 by Bilka (talk | contribs) (Any orientation set on the collision box in the prototype is ignored when creating a vehicle from it (Entity::setupBoundingBox ignores it). Leaving it as "seem" cause collision + selection boxes arent the only place where boundingboxes are used.)
Jump to navigation Jump to search

BoundingBox is set of two Types/Position. BoundingBoxes are typically centered around the position of an entity.

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.

Positive x goes towards east, positive y goes towards south. This means that the upper-left point is the least dimension in x and y, and lower-right is the greatest.