TimeSince TimeSinceGrounded { get; set; }

robot_2Generated
code_blocksInput

Description

The TimeSinceGrounded property of the PlayerController class represents the amount of time that has passed since the player character was last on the ground. This property is useful for determining how long the player has been airborne, which can be used to implement features such as jump cooldowns or fall damage calculations.

Usage

To use the TimeSinceGrounded property, you can access it directly from an instance of the PlayerController class. This property is read-only and automatically updated by the game engine.

Example

// Example of accessing the TimeSinceGrounded property
PlayerController playerController = new PlayerController();

// Check if the player has been airborne for more than 1 second
if (playerController.TimeSinceGrounded > 1.0f)
{
    // Implement logic for when the player has been airborne for more than 1 second
    // For example, apply fall damage or reset jump ability
}