Starship features
Flight
Section titled “Flight”- 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
bStabilizeon (the default), thrust inFlyingandSpaceFlightworks as a throttle-cruise. Turn it off for raw Newtonian flight: thrust is an impulse, velocity drifts, and turning does not redirect it.
Flight states
Section titled “Flight states”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
Section titled “Space flight”- 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 atmosphericMaxFlightSpeed(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 entersSpaceFlight.AreEnginesOnline()reports whether the engines are online. - Approach auto-brake. With
bApproachAutoBrakeon, the ship looks ahead down its nose and sheds speed for you. InSpaceFlightit probes for gravity fields and arrives atMaxFlightSpeedinstead of slamming in at cruise speed. WhileFlyingit 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 theShipMovementcomponent can drive a HUD light. - Gravity-entry braking.
GravityEntryBrakingis the retro deceleration that bleeds off overspeed when the ship enters gravity or goes over its speed cap.
Landing on water and steep ground
Section titled “Landing on water and steep ground”When you land, the ship checks what is below it:
- Deep water (deeper than
MinLandableWaterDepth) or ground steeper thanMaxLandingSlopeDeg: the ship anchors. It holdsAnchorElevationover 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.
Engines
Section titled “Engines”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
bAutoPowerFromShipon (the default), the engine reads the ship’s engine power demand each tick and drives its ownSetPower: input effort, a steady carry burn in gravity, strong through landing and take-off, and off when parked. Turn it off to callSetPoweryourself. - Per-engine roles.
ActiveInStateslists 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 inFlyingandSpaceFlightand hover thrusters that burn everywhere else.ShutdownDelaykeeps an engine burning briefly after cut-off, as a spool-down. - Thrust vectoring. With
bAlignToFlightIntenton 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.MaxPitchDeflectionandMaxYawDeflectionbound the swing; both default to 0, which locks the engine.AlignSpeedandAlignSmoothingTimegive critically damped nozzle motion with no overshoot. - Differential power. With
bDifferentialPoweron, a canted thruster modulates its own power by strafe, fore/aft and turn input (skid-steer) based on its mounting side, and flares toBrakeFlarePowerwhile the ship brakes. Canted pods then work as strafe and retro thrusters, not just decoration. - Flame shells. Each
Flamesentry is a code-created flame mesh at a nozzle transform you author. WithbScaleFlamesWithPoweron (the default), the flame length grows with throttle. - Custom FX. All of this is presentation only. Override
SetPowerorSetEngineActivein a Blueprint subclass for your own FX, and call Parent to keep the default behaviour. - Presets. The included
BP_HoverEngine(hover thruster) andBP_HyperEngine(main/cruise engine) show both roles set up.
Landing gear
Section titled “Landing gear”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 fillSleeveDimensions. 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
bFollowShipGearon (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 withSetDeployed. - Per-strut floor trace. With
bTraceForFlooron (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 yourLandingDuration) andFootOffset. The includedBP_LandingGearis a ready-made strut.
Piloting and passengers
Section titled “Piloting and passengers”- On-foot boarding. The pawn carries a movable
InteractionVolumethat 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
MaxPassengersriders (4 by default), welded to the hull and mirrored on every machine. Players board and leave through the same prompt, andBoardPassenger/UnboardPassengerseat 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
DoorInteractionVolumesits at the door. A character standing there while the ship is in space with the door shut gets an “Open Door” prompt.SetMainDoorOpengives Blueprint manual control of the door; it runs on the server, is mirrored on every machine and fires On Main Door Changed.
Multiplayer
Section titled “Multiplayer”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
SetReplicateMovementfans the transform out to every other machine. - Server-authoritative possession and passengers. Boarding, disembarking and seating are validated and executed on the server. Occupancy (
GetPilotand the passenger list) is replicated. - Smooth proxy interpolation. Machines that are not simulating the ship chase the replicated transform at
ProxySmoothingSpeedinstead 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
UStarshipRiderComponenton 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 and camera
Section titled “Gravity and camera”- Gravity-agnostic. Starship never links against a gravity plugin. It reads gravity through
IStarshipGravitySource, resolved once at BeginPlay. By default,FDefaultStarshipGravitySourcereturns the engine’s world gravity, so the ship flies and levels in normal gravity and goes weightless in zero-g. - Optional directional gravity.
FGravityCoreAdapterlooks up an external gravity subsystem by reflection (class and function name, called throughProcessEvent). 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
Flyingor inSpaceFlight.
Blueprint API
Section titled “Blueprint API”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
ShipMovementcomponent: select ShipMovement in the Components panel and add the event from the Details panel. - Queries:
GetFlightState,GetElevation,IsLanding,IsTakingOff,AreEnginesOnline,IsLandingGearDeployed,IsApproachBraking,GetPilot,GetPassengerCountandHasFreeSeat, plus the values the engine component reads for auto-power and vectoring (GetEnginePowerDemand,GetThrustState,GetTurnIntent,GetRollInput).GetElevation,IsLanding,IsTakingOffandIsApproachBrakingare called on theShipMovementcomponent. - Actions:
EnterShip/ExitShipfor the pilot;BoardPassenger,UnboardPassengerandSetMainDoorOpenon the server;SetDeployed/GetDeployAlphato drive or read a landing-gear strut; andSetPower,SetEngineActiveandUpdateFlightAlignmenton an engine.
What’s included
Section titled “What’s included”- Full C++ source (one runtime module,
Starship) AStarshipPawnandBP_Starship, a drop-in, ready-to-fly, network-replicated spacecraftUStarshipEngineComponent, with theBP_HoverEngineandBP_HyperEnginepresetsUStarshipLandingGearComponent, with theBP_LandingGearstrut- 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
