Switch between pawns with smooth camera blends and climb into vehicles and mounts with several seats: roster cycling, driver/passenger seats, validated exits, seat locks and team rules, "Press E" interaction, spectating, per-pawn input modes and save/restore - server-authoritative and replicated.
Long Description:
PawnSwap handles everything around who controls which pawn. Add the Pawn Swap Manager to your PlayerController and switch between a roster of pawns - next, previous, by index or by tag - with a smooth view-target blend on every switch: blend time, blend function, exponent and a locked outgoing camera so the blend starts exactly where the view was. The pawn you leave behind can stay unpossessed, get its AI controller or get back the controller it had before you took it.
Vehicles and mounts get one Pawn Swap Seat per seat. Each seat has entry and exit points (named scene components or offsets), a driver or passenger role, a priority and an occupancy state. Entering the driver seat possesses the vehicle with its own blend; leaving it gives you your character back. The occupant is attached to the seat or to a socket, hidden or kept visible, with collision, movement and controller rotation turned off while seated, and everything is restored on exit. Change seats inside the same vehicle, or seat AI passengers directly from the server.
Exits are validated: every exit point is snapped to the ground, tested with the occupant's capsule and checked for line of sight; when all of them are blocked, rings around the vehicle and finally the roof are searched. Seats can be locked, reserved for their owner (claimed by the first player who enters), for a team, or ruled by your own Blueprint function.
An interaction query finds the best seat or pawn within a radius and view angle and returns its prompt text, ready for "Press E to enter" widgets; one Interact node enters, takes over or exits. Spectate any pawn without possessing it and come back. Each pawn can set its own input mode and mouse cursor, and a Setup Input event fires after every switch. The roster and seat occupancy export to a SaveGame-ready struct and restore - respawning missing pawns if needed.
Everything is server-authoritative: client requests go through Server RPCs, seat occupancy replicates with a RepNotify that applies the seated state on every machine, and every switch, seat change and refusal (with a reason) is reported through Blueprint events.
PawnSwap is part of the Alpha XP collection for Unreal Engine 4.27 and 5.8. Every feature is exposed to Blueprints and C++, it ships with styled HTML documentation, and it is compiled and verified warning-free against clean UE 4.27 and UE 5.8 projects.
Key Features:
- Pawn Swap Manager: possess another pawn on request, server-authoritative
- Smooth view-target blend on switch: blend time, blend function, exponent, lock outgoing
- Pawn roster: register, cycle next/previous, switch by index or tag, auto registration
- Seat component with entry and exit points (scene components or relative offsets)
- Multiple seats per vehicle: driver/passenger roles, priority, occupancy, possess the vehicle from the driver seat, change seat
- Exit validation: ground snap, capsule overlap, line of sight, ring and roof fallback search
- Left-behind controller policy: leave unpossessed, spawn AI controller, restore original controller
- Seated occupant: attach to seat or socket, offset, hide, collision/movement/rotation off, restored on exit
- Interaction query: best seat or pawn by radius and view angle with prompt text, plus an auto-scan event
- Seat locks and access rules: owner only, same team, owner or team, custom Blueprint rule
- Events: pawn switched, seat entered, seat exited, enter/exit/switch denied with a reason enum
- Multiplayer: Server RPCs, replicated seat occupancy with RepNotify, owner-only roster
- Spectate mode: view another pawn without possessing it, cycle the roster, return
- Input mode and mouse cursor per pawn, applied on switch, plus a Setup Input event
- Save/restore of roster and seat occupancy in a SaveGame-ready struct
- Blueprint function library: seats of a vehicle, free seat, occupants, teams, capsule tests
Full documentation: https://demo.alphaxp.net/FabStore/Pawn/PawnSwap/
Support: https://alphaxp.net/