Skip to content

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 logic
from mathutils import Vector
owner = logic.getCurrentController().owner
box = 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

The center of the bounding box. (read only)

Type: mathutils.Vector

The radius of the bounding box. (read only)

Type: float

Allow to update the bounding box if the mesh is modified.

Type: boolean

These items exist in the engine but were not in the Range documentation. The ones marked new in Anastacio were added by Anastacio Engine.

attribute · read-only

Bounding box volume (width × height × depth).