bool IsSwimming { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The IsSwimming property of the PlayerController class is a boolean value that indicates whether the player is currently in a swimming state. This property is set to true when the player enters a swimming MoveMode.

Usage

Use the IsSwimming property to check if the player is swimming. This can be useful for triggering specific behaviors or animations when the player is in water.

Example

// Example of checking if the player is swimming
if (playerController.IsSwimming)
{
    // Execute swimming-related logic
    playerController.Swim();
}