float AirFriction { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The AirFriction property of the PlayerController class determines the amount of friction applied to the player when they are airborne. This friction will slow down the player unless a wish velocity is specified. The value is a float and can be adjusted to control how much the player is affected by air resistance.

Usage

To modify the air friction for a player, set the AirFriction property to a value between 0 and 1. A value of 0 means no air friction is applied, while a value of 1 applies maximum friction.

Example

PlayerController playerController = new PlayerController();
playerController.AirFriction = 0.5f; // Sets the air friction to a moderate level.