Wire up ship exit/enter possession transition

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.
This commit is contained in:
Joshua Deville
2026-07-08 15:48:29 -04:00
parent d6f7271bed
commit 0744be80bd
3 changed files with 6 additions and 6 deletions

Binary file not shown.

BIN
Content/Blueprints/BP_ShipPawn.uasset (Stored with Git LFS)

Binary file not shown.