Description
The BodyRadius
property of the PlayerController
class represents the radius of the player's body. This property is used to define the size of the player's collision body, which is typically a capsule shape. The radius is a floating-point value that determines how wide the player's body is.
Usage
You can get or set the BodyRadius
property to adjust the player's body size. This can be useful for customizing the player's collision detection or for creating different player sizes in a game.
The value of BodyRadius
should be within the range specified by the RangeAttribute
, which is from 1 to 64, with a step of 0.01. This ensures that the radius is set to a realistic and manageable size for gameplay.
Example
// Example of setting the BodyRadius property
PlayerController playerController = new PlayerController();
playerController.BodyRadius = 10.0f; // Set the body radius to 10 units
// Example of getting the BodyRadius property
float currentRadius = playerController.BodyRadius;
Console.WriteLine($"Current Body Radius: {currentRadius}");