RealDocs

UCharacterMovementComponent::IsFlying

function Engine Since 4.0
#include "GameFramework/CharacterMovementComponent.h"
Access: public Specifiers: virtualconstoverride

Description

Returns true when the current MovementMode is MOVE_Flying and the component has a valid UpdatedComponent.

Caveats & Gotchas

  • Only reflects the built-in MOVE_Flying mode — a custom MOVE_Custom mode that behaves like flying will not make this return true.
  • Like the other Is*() movement queries, requires UpdatedComponent to be valid, so it returns false before the component has finished initializing.

Signature

virtual bool IsFlying() const override

Return Type

bool

Example

Checking fly state C++
if (GetCharacterMovement()->IsFlying())
{
    DisableGroundFriction();
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.