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 the player has been airborne or in a state where they are not grounded.
Usage
Use the TimeSinceUngrounded
property to track the duration of time the player has been ungrounded. This can be useful for implementing features such as jump cooldowns, fall damage calculations, or other mechanics that depend on the player being airborne.
Example
// Example of using TimeSinceUngrounded in a PlayerController
public class MyPlayerController : PlayerController
{
public void CheckAirborneTime()
{
if (TimeSinceUngrounded > 1.0f)
{
// Player has been airborne for more than 1 second
// Implement logic here, e.g., apply fall damage
}
}
}