BBox LocalBounds { get; set; }

robot_2Generated
code_blocksInput

Description

The LocalBounds property of the Collider class provides the calculated local bounds of all physics shapes within the collider. This property is useful for understanding the spatial extent of the collider in local space, which can be critical for collision detection and physics calculations.

Usage

To access the LocalBounds property, you need to have an instance of a class that inherits from Collider. This property is read-only and provides a BBox object representing the bounds.

Example

// Assuming 'collider' is an instance of a class derived from Collider
BBox bounds = collider.LocalBounds;

// Use the bounds for further calculations or logic
Vector3 size = bounds.Size;
Vector3 center = bounds.Center;