GetBoundingBox

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
< [[::Category:Functions|Category:Functions]]

A function added by the Oblivion Script Extender.

Syntax:

(StringMap) reference.GetBoundingBox

Returns a stringmap representing the calling objects axis-aligned bounding box. This command only works for mobile objects (projectiles and actors). The stringmap returned contains two stringmaps: "center" has keys "x", "y", and "z" representing the coordinates of the center of the bounding box, and "extent" has the same keys representing the extent of the box along each axis. For example, the height of the box is equal to GetBoundingBox->extent->z * 2. Similarly the bottom of the box is equal to GetBoundingBox->center->z - GetBoundingBox->extent->z.


Note

  • This function does not return the correct bounding box in some instances. If the actor is scaled, multiplying by GetScale is necessary to scale the returned box appropriately. If the actor is sitting or lying down, the box returned is still the box of the standing actor, which will be completely off.