KX_BoundingBox
Base class: EXP_PyObjectPlus
A bounding volume box of a game object. Used to get and alterate the volume box or AABB.
from Range import logicfrom mathutils import Vector
owner = logic.getCurrentController().ownerbox = owner.cullingBox
# Disable auto update to allow modify the box.box.autoUpdate = False
print(box)# Increase the height of the box of 1.box.max = box.max + Vector((0, 0, 1))
print(box)The minimal point in x, y and z axis of the bounding box.
Type: mathutils.Vector
The maximal point in x, y and z axis of the bounding box.
Type: mathutils.Vector
center
Section titled “center”The center of the bounding box. (read only)
Type: mathutils.Vector
radius
Section titled “radius”The radius of the bounding box. (read only)
Type: float
autoUpdate
Section titled “autoUpdate”Allow to update the bounding box if the mesh is modified.
Type: boolean
Not in the Range documentation
Section titled “Not in the Range documentation”These items exist in the engine but were not in the Range documentation. The ones marked new in Anastacio were added by Anastacio Engine.
volume
Section titled “volume”attribute · read-only
Bounding box volume (width × height × depth).
