Description
The Radius
field represents the radius of a capsule. It is a public, non-static field of type System.Single
(float). The radius defines the distance from the center line of the capsule to its outer surface, effectively determining the thickness of the capsule.
Usage
To use the Radius
field, you can directly access it from an instance of the Capsule
struct. You can read or modify the radius to adjust the size of the capsule.
Example
// Create a new Capsule instance
Capsule myCapsule = new Capsule();
// Set the radius of the capsule
myCapsule.Radius = 5.0f;
// Access the radius of the capsule
float currentRadius = myCapsule.Radius;
// Output the current radius
// Note: Use a logging system or UI element to display the value
// Example: Log.Info($"Current Radius: {currentRadius}");