float BrakePower { get; set; }

book_4_sparkGenerated
code_blocksInput

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 their desired velocity is lower than their 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 extra friction is applied. This property is useful for controlling how quickly the player slows down when they are on the ground and not accelerating.

Example

// Example of setting the BrakePower property
PlayerController playerController = new PlayerController();
playerController.BrakePower = 0.5f; // Sets the brake power to a moderate level