Description
The BrakePower
property of the PlayerController
class is a float
value that determines the amount of extra friction applied when the player is on the ground and the desired velocity is lower than the current velocity. This property helps in slowing down the player by applying additional friction.
Usage
To use the BrakePower
property, you can set it to a value between 0 and 1, where 0 means no extra friction is applied, and 1 means maximum friction is applied. This property is useful for controlling how quickly the player slows down when they stop moving or when their desired speed is less than their current speed.
Example
// Example of setting the BrakePower property
PlayerController playerController = new PlayerController();
playerController.BrakePower = 0.5f; // Sets the brake power to a moderate level