Description
The PreventGrounding
method in the PlayerController
class is used to prevent the player from being considered grounded for a specified duration. This can be useful in scenarios where you want to ensure the player remains airborne or unaffected by ground-based mechanics for a short period, such as after a jump or during a special ability.
Usage
To use the PreventGrounding
method, call it on an instance of PlayerController
and pass the number of seconds you want the grounding to be prevented as a float
parameter.
Example
// Example usage of PreventGrounding
PlayerController playerController = new PlayerController();
// Prevent grounding for 2.5 seconds
double seconds = 2.5f;
playerController.PreventGrounding(seconds);