Skip to content

Starship features

  • 6DOF anti-gravity flight. The ship flies in full six degrees of freedom. Gravity only sets which way is “up” and never pulls the ship down, so releasing the controls leaves it hovering in place.
  • Footprint ground detection. Elevation above the ground is measured with a box sweep along gravity (LandDetectBounds), so landing reads slopes correctly.
  • Hover, land and take-off sequences. Hold descend at the hover floor for a timed landing to gear height, and hold ascend to lift off after a spool delay. Ships spawned below the hover floor land automatically.
  • Flight assist. With bStabilize on (the default), thrust in Flying and SpaceFlight works as a throttle-cruise. Turn it off for raw Newtonian flight: thrust is an impulse, velocity drifts, and turning does not redirect it.

The ship picks one of six states each tick from its elevation above the ground, whether there is gravity, and whether the engines are online. A hysteresis band keeps the Hovering/Flying boundary from flickering.

State When Behaviour
Landed Resting on a surface, after a landing Sits still. Hold ascend to take off.
Hovering In gravity, below FlyingElevation Holds altitude, stays level (no tilt or roll) and moves relative to the camera. Won’t sink below MinHoverElevation.
Flying In gravity, at or above FlyingElevation Turns to fly where you look, with full tilt and bank. With flight assist on, thrust is a throttle-cruise.
Floating In space, engines cold (parked) Holds orientation and drifts without friction. Input is ignored until you bring the engines online.
SpaceFlight In space, engines online A fast zero-g throttle-cruise. Steers like Flying, but far faster.
Anchored After landing over deep water or ground too steep for the gear Holds AnchorElevation over the surface with the gear up, the door open and the engines hovering. Takes off like Landed.
  • Space-Flight cruise. Engines online in space put the ship in SpaceFlight. Push thrust to wind the cruise speed up, pull to wind it down, and release to hold the current speed. The held speed travels along the nose, so steering carries the velocity with it: point where you want to go.
  • Built for distance. MaxSpaceFlightSpeed (100000 cm/s by default) is deliberately far above the atmospheric MaxFlightSpeed (6000 cm/s).
  • Leaving gravity. Climb until gravity falls away and the ship enters space. A ship that arrives in space still moving keeps flying.
  • Starting in space. A ship that begins in space (spawned or parked) is Floating. Hold climb up to run the engine-start sequence, the space counterpart of a ground take-off: the door closes, On Takeoff Started fires and the engines spool, with no ascent. The ship then enters SpaceFlight. AreEnginesOnline() reports whether the engines are online.
  • Approach auto-brake. With bApproachAutoBrake on, the ship looks ahead down its nose and sheds speed for you. In SpaceFlight it probes for gravity fields and arrives at MaxFlightSpeed instead of slamming in at cruise speed. While Flying it sweeps for collisions and eases down to hover speed before terrain. Manual braking still works, and positive throttle is ignored only while the brake is actively shedding speed. The On Approach Braking Changed event on the ShipMovement component can drive a HUD light.
  • Gravity-entry braking. GravityEntryBraking is the retro deceleration that bleeds off overspeed when the ship enters gravity or goes over its speed cap.

When you land, the ship checks what is below it:

  • Deep water (deeper than MinLandableWaterDepth) or ground steeper than MaxLandingSlopeDeg: the ship anchors. It holds AnchorElevation over the surface with the gear up, the door open and the engines hovering, so it won’t tip over on a slope or sink into the sea.
  • Shallow water: the ship lands on the seabed through it, like wet sand.
  • Flat enough ground: a normal gear-down touchdown into Landed.

Take off from an anchor with climb up, exactly as from Landed. By default MinLandableWaterDepth and AnchorElevation are 300, and MaxLandingSlopeDeg is 20.

UStarshipEngineComponent is a self-contained engine: a static mesh, a Niagara exhaust, optional flame shells and an optional looping sound. It can drive and aim itself from the ship.

  • Self-driving power. With bAutoPowerFromShip on (the default), the engine reads the ship’s engine power demand each tick and drives its own SetPower: input effort, a steady carry burn in gravity, strong through landing and take-off, and off when parked. Turn it off to call SetPower yourself.
  • Per-engine roles. ActiveInStates lists the flight states an engine burns in; empty means all states. Use it to give engine banks roles, such as cruise mains that only light in Flying and SpaceFlight and hover thrusters that burn everywhere else. ShutdownDelay keeps an engine burning briefly after cut-off, as a spool-down.
  • Thrust vectoring. With bAlignToFlightIntent on and a deflection limit raised, the whole engine physically swivels (mesh, FX and flames) to vector its thrust. It leans into turns, tilts against gravity for a VTOL hover look (HoverSupportWeight) and cants with roll. MaxPitchDeflection and MaxYawDeflection bound the swing; both default to 0, which locks the engine. AlignSpeed and AlignSmoothingTime give critically damped nozzle motion with no overshoot.
  • Differential power. With bDifferentialPower on, a canted thruster modulates its own power by strafe, fore/aft and turn input (skid-steer) based on its mounting side, and flares to BrakeFlarePower while the ship brakes. Canted pods then work as strafe and retro thrusters, not just decoration.
  • Flame shells. Each Flames entry is a code-created flame mesh at a nozzle transform you author. With bScaleFlamesWithPower on (the default), the flame length grows with throttle.
  • Custom FX. All of this is presentation only. Override SetPower or SetEngineActive in a Blueprint subclass for your own FX, and call Parent to keep the default behaviour.
  • Presets. The included BP_HoverEngine (hover thruster) and BP_HyperEngine (main/cruise engine) show both roles set up.

UStarshipLandingGearComponent is one telescoping strut. Add several to your ship Blueprint and place each on the hull; the component’s transform is the mount point.

  • Built from your meshes. Each strut builds two parts: a sleeve at the hull (EncloseMeshAsset) and a foot, the leg plus pad (FootMeshAsset). The sleeve is scaled to fill SleeveDimensions. The foot hides inside the collapsed sleeve and slides down to floor contact on deploy, and the sleeve stretches to cover the gap.
  • Any pivot. Meshes only need to be upright, with height along Z. Placement is computed from each mesh’s bounds.
  • Follows the ship. With bFollowShipGear on (the default), the strut polls the ship’s replicated gear state, deploys on landing and retracts on take-off. Because it reads state rather than events, it is correct on every machine and for late joiners. On any other actor, or with follow off, drive it with SetDeployed.
  • Per-strut floor trace. With bTraceForFloor on (the default), each strut line-traces its own floor, so on uneven ground the legs settle at different lengths.
  • No collision. The gear is the look only. Landing contact stays with the ship’s own ground detection.
  • Tuning. MaxFootTravel, EncloseCoverFraction, DeployDuration (match it to your LandingDuration) and FootOffset. The included BP_LandingGear is a ready-made strut.
  • On-foot boarding. The pawn carries a movable InteractionVolume that detects an on-foot player character. Overlap an unpiloted ship and a “Press [key] to Pilot” prompt appears, with the key text read live from the bound Interact action. Interact takes control of the ship and attaches the character, with its movement disabled while stowed.
  • Disembarking. Landing while piloting shows “Press [key] to Disembark”. Interact detaches the character at the volume and hands control back.
  • No character changes. The interact binding is injected onto the character’s Enhanced Input, so your character Blueprint needs no changes.
  • Passengers. A piloted ship seats up to MaxPassengers riders (4 by default), welded to the hull and mirrored on every machine. Players board and leave through the same prompt, and BoardPassenger / UnboardPassenger seat or release players and NPCs on the server. Anyone on or beside the ship is seated automatically at take-off.
  • Exit rule. bPassengerExitRequiresLanded (on by default) keeps passengers aboard until the ship lands. Turn it off to allow mid-flight disembarking.
  • Door interaction. A separate DoorInteractionVolume sits at the door. A character standing there while the ship is in space with the door shut gets an “Open Door” prompt. SetMainDoorOpen gives Blueprint manual control of the door; it runs on the server, is mirrored on every machine and fires On Main Door Changed.

The whole pawn is network-replicated for listen and dedicated servers. Single-player works unchanged.

  • Client-authoritative flight. The piloting machine runs the flight sim and each frame relays its transform, velocity and cosmetic state (flight state, gear, door) to the server through an unreliable Server RPC. The server applies it, and SetReplicateMovement fans the transform out to every other machine.
  • Server-authoritative possession and passengers. Boarding, disembarking and seating are validated and executed on the server. Occupancy (GetPilot and the passenger list) is replicated.
  • Smooth proxy interpolation. Machines that are not simulating the ship chase the replicated transform at ProxySmoothingSpeed instead of snapping, which keeps attached riders’ cameras steady.
  • Cosmetic state for everyone. Gear, door and flight state replicate, so the landing gear, door and HUD are correct on every machine and for late joiners.
  • No character or controller changes. Board, ride and door requests route through the injected input and a runtime UStarshipRiderComponent on the character’s own channel.
  • Local HUD events. On Local Pilot Begin/End and On Local Passenger Begin/End fire on the owning machine, because the engine’s Possessed event only fires on the server.
  • Gravity-agnostic. Starship never links against a gravity plugin. It reads gravity through IStarshipGravitySource, resolved once at BeginPlay. By default, FDefaultStarshipGravitySource returns the engine’s world gravity, so the ship flies and levels in normal gravity and goes weightless in zero-g.
  • Optional directional gravity. FGravityCoreAdapter looks up an external gravity subsystem by reflection (class and function name, called through ProcessEvent). If it is present, the ship aligns to that directional gravity, such as a planet’s surface. If it is absent or cannot be reflected, the ship falls back to world gravity. No recompile is needed.
  • Gravity-aligned free-orbit camera. An independent third-person orbit camera with absolute rotation, kept level to gravity. Look anywhere; the ship turns to follow while Flying or in SpaceFlight.

Thrust, speeds, elevations, landing rules, water depth, slope limits, engine vectoring and differential power, landing gear, camera and passengers are all exposed to Blueprint and C++.

  • Events: On Flight State Changed, On Landing Started, On Takeoff Started, On Landing Gear Changed, On Main Door Changed, On Local Pilot Begin/End, On Passenger Boarded/Left, On Local Passenger Begin/End, and Show/Clear Prompt on the ship. On Approach Braking Changed is on the ship’s ShipMovement component: select ShipMovement in the Components panel and add the event from the Details panel.
  • Queries: GetFlightState, GetElevation, IsLanding, IsTakingOff, AreEnginesOnline, IsLandingGearDeployed, IsApproachBraking, GetPilot, GetPassengerCount and HasFreeSeat, plus the values the engine component reads for auto-power and vectoring (GetEnginePowerDemand, GetThrustState, GetTurnIntent, GetRollInput). GetElevation, IsLanding, IsTakingOff and IsApproachBraking are called on the ShipMovement component.
  • Actions: EnterShip / ExitShip for the pilot; BoardPassenger, UnboardPassenger and SetMainDoorOpen on the server; SetDeployed / GetDeployAlpha to drive or read a landing-gear strut; and SetPower, SetEngineActive and UpdateFlightAlignment on an engine.
  • Full C++ source (one runtime module, Starship)
  • AStarshipPawn and BP_Starship, a drop-in, ready-to-fly, network-replicated spacecraft
  • UStarshipEngineComponent, with the BP_HoverEngine and BP_HyperEngine presets
  • UStarshipLandingGearComponent, with the BP_LandingGear strut
  • A complete lander mesh with materials and textures (body, gear, doors, glass, engines, seat), already assigned on BP_Starship
  • Engine exhaust FX (flame meshes and materials), Niagara and a looping sound
  • An Enhanced Input mapping context and input actions for thrust, strafe, climb, roll, look, stabilize and interact
  • HUD widgets for the flight states (including space flight and anchored) and a prompt widget
  • A demo level with the ship ready to board and fly