HomeModule plugins › AFM_Teleport
Module

AFM_Teleport

Pawn-side teleport execution with fade, motion and tracking-level options, in separate Pawn and Character variants.

What it gives you

  • Teleport execution independent of targeting
  • Fade or dash comfort options
  • Correct arrival height per pawn type
  • Carried objects travel with the player

Requires

AFM_Abilities

Required by

AFS_Core_Loading AFS_Core_Pawn AFS_UX_Locomotion AFS_UX_Teleporter AF_Examples

3 assets16 API members

Description

This plugin performs the teleport; AFS_UX_Teleporter decides where. Keeping them separate means you can replace either.

The execution is staged so the comfort options compose: fade out, relocate, fade in, with optional motion instead of a cut. Tracking Level corrects arrival height so the player lands standing on the surface rather than with their head at floor level — and this is where the Pawn and Character variants differ, since only the Character variant has a capsule to offset against.

RelocateActorAndFollowingActors moves everything the player is carrying with them, so held objects arrive too.

Setup

  1. Enable AFM_Teleport. Its Engine.ini enables Mobile HDR.
  2. Add BPC_PawnAbility_Teleport_Character to a Character pawn, or _Pawn to a plain Pawn.
  3. Add BPC_PlayerController_CameraFade to the player controller for the fade option.

Usage

Teleporting

Call the Teleport event with a location, rotation or destination component. Set Use Fade and Use Motion for comfort, and Eye Level for arrival height.

Turning in place

Call Teleport Turn with a degree amount — this reuses the same comfort pipeline as teleporting.

The camera fade at its midpoint during a teleport
AFM_Teleport_result.pngThe camera fade at its midpoint during a teleport
The camera fade at its midpoint during a teleport

Key properties

PropertyWhen to change
Use FadeComfort; fade is the safest default
Use MotionDash instead of cut — less comfortable for some users
Eye LevelGround level or eye level arrival
DurationLength of the transition

Extending

Derive from BPC_PawnAbility_Teleport and override LocationCorrection and the phase events for a custom movement pawn.

Example map

Map_Examples_Teleport compares the execution options directly.

Troubleshooting

The player arrives at floor height. The Pawn variant is being used where the Character variant is needed, or Eye Level is set incorrectly.

API reference

Every blueprint asset in this plugin. Expand an asset to see its members.

Components

BPC_PawnAbility_Teleport13 members
extends BPC_PawnAbility
KindNameSignatureDescription
fnChooseDestination(DestinationComponent: SceneComponent, DestinationVector: Vector, DestinationRotator: Rotator, out ChosenVector: Vector, out ChosenRotator: Rotator)Resolves the final destination from the supplied component, location and rotation, preferring the component when one is given.
fnLocationCorrection(OriginalLocation: Vector, RelativeTrackingLevel: E_Teleport_TrackingLevel = "GroundLevel", out NewLocation: Vector)Adjusts the destination for the requested tracking level, so the player arrives standing on the ground rather than with their head at floor height. Overridden per pawn type.
fngetDesiredLocationAndRotation(out Location: Vector, out Rotation: Rotator)Returns the destination currently resolved for the pending teleport.
fnRelocateActorAndFollowingActors(DestLocation: Vector, DestRotation: Rotator, ControlRotation: Rotator)Moves the pawn and everything it is carrying to the destination in one step, so held objects arrive with the player.
eventTeleport(DestLocation: Vector, DestRotation: Rotator, DestSceneComp: SceneComponent, AttachToSceneComponent: bool, Duration: float, UseFade: E_Teleport_Fade, UseMotion: E_Teleport_Motion, EyeLevel: E_Teleport_TrackingLevel, Sound: SoundBase, Force: bool)Teleports the pawn to a location, rotation or scene component, with configurable fade, motion, tracking level, duration and sound. Set Force to teleport even while another teleport is running.
eventTeleport_Phase_0(DestLocation: Vector, DestRotation: Rotator, DestSceneComp: SceneComponent, AttachToSceneComponent: bool, Duration: float, UseFade: E_Teleport_Fade, UseMotion: E_Teleport_Motion, EyeLevel: E_Teleport_TrackingLevel, Sound: SoundBase)Internal stage of the teleport sequence: validates the request and begins the fade or motion.
eventStopTeleport()Cancels a teleport in progress and restores normal control.
eventTeleportTurn(Degree: float, Duration: float, UseFade: E_Teleport_Fade, Sound: SoundBase)Rotates the player in place by the given number of degrees, using the same fade and comfort options as a teleport.
eventTeleport_Phase_3()Internal stage of the teleport sequence: plays the incoming transition.
eventTeleport_Phase_4()Internal stage of the teleport sequence: restores control and clears the pending teleport.
eventTeleport_Phase_2()Internal stage of the teleport sequence: performs the actual relocation. Overridden per pawn type.
eventTeleport_Phase_02_Finished()Internal stage of the teleport sequence: signals that relocation has completed.
eventTeleport_Phase_1()Internal stage of the teleport sequence: waits for the outgoing transition to finish.
BPC_PawnAbility_Teleport_Character2 members
extends BPC_PawnAbility_Teleport
KindNameSignatureDescription
fnLocationCorrection(OriginalLocation: Vector = "0, 0, 0", RelativeTrackingLevel: E_Teleport_TrackingLevel = "GroundLevel", out NewLocation: Vector)Corrects the destination for a Character pawn, accounting for capsule half-height so the character stands on the target surface.
eventTeleport_Phase_2()Relocates a Character pawn using the character movement component, so ground constraints are respected.
BPC_PawnAbility_Teleport_Pawn1 members
extends BPC_PawnAbility_Teleport
KindNameSignatureDescription
fnLocationCorrection(OriginalLocation: Vector = "0, 0, 0", RelativeTrackingLevel: E_Teleport_TrackingLevel = "GroundLevel", out NewLocation: Vector)Corrects the destination for a plain Pawn, which has no capsule to offset against.