Description
The BoundingBox
property of the CharacterController
class represents the bounding box of the character. This bounding box is used to determine the spatial boundaries of the character within the game world, which is essential for collision detection and physics calculations.
Usage
Use the BoundingBox
property to access or modify the bounding box of a character controlled by the CharacterController
. This property is particularly useful when you need to perform custom collision detection or when you want to visualize the character's boundaries for debugging purposes.
Example
// Example of accessing the BoundingBox property
CharacterController characterController = new CharacterController();
BBox characterBoundingBox = characterController.BoundingBox;
// Example of modifying the BoundingBox property
characterController.BoundingBox = new BBox(new Vector3(-1, -1, 0), new Vector3(1, 1, 2));