Polarith AI
1.8

◆ BoundsType

Determines which bounding box model is used for this behaviour.

Each model has got different properties, and thus, a distinct impact on the performance.

The default BoundsType.ColliderAABB uses the axis-aligned bounding box which has the lowest impact on performance. However, if objects are rotated (not aligned with the world axes), the resulting AABB differs from the actual object specific collider bounds.

BoundsType.ColliderOBB uses the object-oriented bounding box for a more precise result. Hence, it is more expensive. So it is advised to use this option only for dynamic or non-axis-aligned objects.

BoundsType.Visual is similar to BoundsType.ColliderOBB, so it uses the object-oriented bounding box. The difference is that the bounds are given by the visual representation of the object, either by the SpriteRenderer or the MeshRenderer. For this to work with meshes, a received object must not be static, or otherwise, no visual bounds can be received. Concerning performance, the same advice is given as for BoundsType.ColliderOBB.

Imprint