Description
The Radius
property of the CharacterController
class defines the radius of the character's collision boundary. This property is crucial for determining how the character interacts with the environment, particularly in terms of collision detection and response.
Usage
To set the Radius
property, simply assign a float
value within the specified range. The range is defined by the RangeAttribute
as 0 to 200, with a step of 0.01. This ensures that the radius is always a positive value and allows for fine adjustments.
Example
// Example of setting the Radius property
CharacterController characterController = new CharacterController();
characterController.Radius = 50.0f; // Sets the radius to 50 units