Types/BoundingBox: Difference between revisions
Jump to navigation
Jump to search
m (moved coordinate info down, reworded) |
(Add note on orientation) Tag: Reverted |
||
Line 4: | Line 4: | ||
{{-0.4, -0.4}, {0.4, 0.4}} | {{-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 | 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. The orientation is only used for entities that can rotate at non-90 degree angles like [[Vehicle|vehicles]]. | ||
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. | 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. |
Revision as of 02:44, 29 April 2023
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. The orientation is only used for entities that can rotate at non-90 degree angles like vehicles.
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.