tags: model
title: AABB
brief: This example demonstrates how to use the model.get_aabb() function in a 3D scene.
scripts: aabb.script
This example shows how to work with Axis-Aligned Bounding Boxes (AABB) in a 3D scene. The setup consists of falling cubes that are dynamically tracked by a camera using their combined bounding box. The example demonstrates:
model.get_aabb() to get object boundsPress SPACE or click to spawn new cubes. The camera will automatically adjust to keep all objects in view based on their combined bounding box.
The models used in this example are from Kenney's Prototype Kit, licensed under CC0.