fort_character TeleportTo is not working.

Reference ID

be739c37-4076-4388-d5d8-a88025dc9e97

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

Verse

Summary

fort_character TeleportTo is not working.

Steps to Reproduce

    TeleportOut<private>(Agent : agent):void=
        Logger.Print("Teleport Out")
        if(TeleportPointOut.IsValid[], AgentCharacter := Agent.GetFortCharacter[]):
            PointTransform := TeleportPointOut.GetTransform()
            Position := PointTransform.Translation
            if(AgentCharacter.TeleportTo[Position, IdentityRotation()]):
                Agent.ShowHUD("{TP_AGENTTELEPORT_MSG}: {LocationOutName}")
                Logger.Print("Teleported to {Position.X}, {Position.Y}, {Position.Z}")
            else Logger.Print("Can't teleport player to point", ?Level := log_level.Warning)
        else Logger.Print("Teleport Point in doesn't exist", ?Level := log_level.Error)

Expected Result

Teleports the player to a specified point.

Observed Result

Does not teleport the player to the specified point.

Platform(s)

PC

Can you also print Position just above this line and send both print results so we can know where it teleports instead.

Yeah, I checked it. The positions are specified correctly, but the teleport itself does not happen. That is, the function itself works fine and there is no TeleportTo execution failure in the code, but the player stays put.

LogVerse: PORTAL_LOG: Teleported to -1731.608363, 3376.661095, 5463.366358
LogVerse: PORTAL_LOG: Teleport Out
LogVerse: PORTAL_LOG: Teleported to -1731.608363, 3376.661095, 5463.366358
LogVerse: PORTAL_LOG: Teleport Out
LogVerse: PORTAL_LOG: Teleported to -1731.608363, 3376.661095, 5463.366358

Hey, are you sure you’re calling it on the right character? :fearful:

It made me hesitate just now, but it’s accurate. I payload Agent from mutator.AgentEntersEvent when subscribing. I am the only one on the map, so no one else can be called.

Maybe try to use AgentCharacter.GetTransform().Rotation instead of IdentityRotation()?

1 Like

I try:

  1. teleport point rotation
  2. Character rotation
  3. IdentityRotation
    I even tried to split the transform struct and initialize it on a per-unit basis and then pass it to a function, I think that might be the problem.

I think there are 2 possibilities here: 1. Prop is too far away from the character (out of world partition) 2. Just a bug in the function.

You might be right, I used this function and it worked partially, like it would teleport the player, then do a black screen and teleport him under the map.

So maybe move a creative_prop for which a teleport_device is attached to, and once you teleported the prop, trigger the teleporter :slight_smile:

1 Like

bump, still not fixed (only works in UEFN sessions)

1 Like