Verse Library verse

01 Snippet

Sets a target location and rotation, retrieves the player character, and teleports it to that spot.

extracted-snippets/documentation/en-us/fortnite/scene-graph-known-issues-in-fortnite/01-snippet.verse

# Source URL: https://dev.epicgames.com/documentation/en-us/fortnite/scene-graph-known-issues-in-fortnite
# Local doc:  epic-docs/documentation/en-us/fortnite/scene-graph-known-issues-in-fortnite.md
TeleportLocation := (/Verse.org/SpatialMath:)vector3{Left := 330.0, Up := 20.0, Forward := 50.0}
TeleportRotation := (/Verse.org/SpatialMath:)MakeRotationFromYawPitchRollDegrees(90.0, 0.0     ,0.0)
if:
FortCharacter := Agent.GetFortCharacter[]
FortCharacter.TeleportTo[FromVector3(TeleportLocation), FromRotation(TeleportRotation)]
then:
Print("Character Teleported")

Comments

    Sign in to vote, comment, or suggest an edit. Sign in