Description
The IsDucking
property of the PlayerController
class indicates whether the player is currently in a ducking position. This property returns true
if the player is ducking, and false
otherwise. Ducking typically involves the player lowering their body to reduce their height, which can be useful for moving through low spaces or avoiding detection.
Usage
To check if a player is ducking, you can access the IsDucking
property on an instance of PlayerController
. This property is synchronized across the network, meaning its value is consistent for all clients in a multiplayer game.
Example
// Example of checking if the player is ducking
PlayerController playerController = new PlayerController();
if (playerController.IsDucking)
{
// Perform actions when the player is ducking
// For example, reduce movement speed or change camera angle
}