F key on the ship: teleports the player character to just above the ship's location and possesses it. F key on the character: possesses the ship back. Same controller, so possessing one pawn automatically unpossesses the other. Notable implementation detail: GameplayStatics::GetActorOfClass looked like the obvious way to find "the other pawn" at runtime, but this MCP plugin's pin_defaults mechanism can't correctly set a Class- type pin (it accepts the string silently but the compiler later rejects it as an invalid default) -- there's no supported node type for a class-literal either. Worked around it by adding real object- reference variables (PlayerCharacterRef / ShipPawnRef) via unreal.BlueprintEditorLibrary.get_object_reference_type() directly through the Python escape hatch, marking them instance-editable, and wiring the actual actor references between the two placed level instances. Avoids needing any runtime class lookup at all.
41 KiB (Stored with Git LFS)
41 KiB (Stored with Git LFS)