When it comes to creating flying actors in Unreal Engine — from drones to hovercrafts — one of the most versatile components is the FloatingPawnMovement component.
In this blog post, I’ll break down what FloatingPawnMovement is, how it works, when to use it, and how I used it in my drone simulation game Dronewood to build a smooth, physics-aware flying experience.
🧭 What is FloatingPawnMovement?
UFloatingPawnMovement
is a lightweight movement component provided by Unreal Engine that allows basic movement of Pawns in 3D space. Unlike CharacterMovementComponent
, it doesn’t rely on a capsule or gravity by default, making it ideal for:
- Drones
- Spaceships
- Hover vehicles
- Zero-gravity entities
It supports movement input (AddMovementInput), simulates acceleration/deceleration, and integrates cleanly with both Blueprints and C++.
🧱 Setting It Up
Whether you're working in Blueprints or C++, adding FloatingPawnMovement
is straightforward.
🔧 Blueprint Setup:
- Create a new Pawn blueprint (not Character).
- Add a
FloatingPawnMovement
component. - Add input bindings like "MoveForward", "MoveRight", and "MoveUp".
- Use
AddMovementInput(GetActorForwardVector(), AxisValue)
to move.
🧠 C++ Setup:
Here’s how to wire it up in your Pawn class:
AFlyingPawn::AFlyingPawn()
{
RootComponent = CreateDefaultSubobject<USceneComponent>(TEXT("RootComponent"));
MeshComponent = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh"));
MeshComponent->SetupAttachment(RootComponent);
FloatingMovement = CreateDefaultSubobject<UFloatingPawnMovement>(TEXT("FloatingPawnMovement"));
}
void AFlyingPawn::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
PlayerInputComponent->BindAxis("MoveForward", this, &AFlyingPawn::MoveForward);
PlayerInputComponent->BindAxis("MoveRight", this, &AFlyingPawn::MoveRight);
PlayerInputComponent->BindAxis("Ascend", this, &AFlyingPawn::MoveUp);
}
void AFlyingPawn::MoveForward(float Value)
{
AddMovementInput(GetActorForwardVector(), Value);
}
void AFlyingPawn::MoveRight(float Value)
{
AddMovementInput(GetActorRightVector(), Value);
}
void AFlyingPawn::MoveUp(float Value)
{
AddMovementInput(GetActorUpVector(), Value);
}
🚁 Real-World Use Case: Dronewood
In Dronewood, I built a fully functional drone simulation where the player controls a drone through tight obstacle-filled environments using:
- Ascend/descend
- Tilt forward/backward
- Rotate (yaw) left/right
- Speed boost for time trials
Why FloatingPawnMovement?
While physics-based movement can feel sluggish and unpredictable for this kind of gameplay, FloatingPawnMovement
offered:
- Smooth, responsive input handling
- Built-in acceleration and deceleration
- Easy integration with custom rotation and tilt systems
Dronewood’s Drone Control Breakdown:
-
Ascend/Descend:
AddMovementInput(GetActorUpVector(), Value)
-
Forward Movement:
AddMovementInput(GetActorForwardVector(), Value)
-
Speed Boost: Modified
MaxSpeed
dynamically - Tilt Control: Adjusted the mesh's relative rotation for visual realism
// Speed boost toggle
FloatingMovement->MaxSpeed = bBoosting ? 1600.f : 800.f;
I also added a custom camera controller and collision handling logic to avoid unintended flips or drift when bouncing off obstacles.
🧠 When Not to Use It?
- If you need full physics simulation (e.g. quadcopter thrust physics)
- If you want full character animation support
- If you need complex floor detection, jumping, or crouching (use
CharacterMovementComponent
instead)
🧰 Pro Tips
- Combine with
SpringArm + Camera
for 3rd-person view. - Clamp pitch/roll to avoid disorienting the player.
- Customize
Acceleration
,Deceleration
, andMaxSpeed
for arcade or sim feel. - Use
OnComponentHit
events for obstacle reaction or bounce-back effects.
📦 Final Thoughts
FloatingPawnMovement
might not be as flashy as CharacterMovementComponent
, but it's one of Unreal's most underappreciated tools for flying mechanics. Whether you're building a drone game like Dronewood, a sci-fi spaceship, or a magic carpet — this component gives you speed, control, and simplicity.
If you're exploring flying movement in Unreal and want tips on tilt mechanics, multiplayer sync, or custom input systems — I’d love to connect. Happy flying!
Top comments (0)