Description
Returns the Axis-Aligned Bounding Box (AABB) of this physics body. The bounding box is a rectangular box that completely contains the physics body, aligned with the coordinate axes. This is useful for quickly determining the spatial extent of the body in the world.
Usage
To retrieve the bounding box of a PhysicsBody
, call the GetBounds
method on an instance of PhysicsBody
. This method does not take any parameters and returns a BBox
object representing the bounding box.
Example
// Example of using GetBounds method
PhysicsBody physicsBody = new PhysicsBody();
BBox boundingBox = physicsBody.GetBounds();
// Use the bounding box for further calculations or checks
Vector3 min = boundingBox.Mins;
Vector3 max = boundingBox.Maxs;