Description
The TimeSinceUngrounded
property of the PlayerController
class represents the amount of time that has passed since the player character was last not on the ground. This property is useful for determining how long a player has been airborne or in a state where they are not in contact with the ground.
Usage
Use the TimeSinceUngrounded
property to track the duration of time a player has been in the air. This can be useful for implementing features such as jump timing, fall damage calculations, or triggering events when a player has been airborne for a certain period.
Example
// Example of using TimeSinceUngrounded
public void CheckAirborneTime(PlayerController playerController)
{
if (playerController.TimeSinceUngrounded > 1.0f)
{
// Player has been airborne for more than 1 second
// Implement logic here, such as applying fall damage
}
}