Fake elevator system using player teleportation

Get the elevator Rotation and the Character Rotation (or Control Rotation), and use a [Delta] node to get the rotation difference, save this delta to a variable.

After teleporting the character, get the Rotation of the new elevator, and use [Combine Rotators] with the saved delta to set the Character Rotation (or Control Rotation).

Hey, all. I’m trying to figure out how to do something that requires some vector math with blueprints in Unreal.

Basically, I have two enclosed elevator meshes. The elevators are at different locations and Z rotations in the map. Both are lit exactly the same.

The idea is to have the player enter Elevator A, hit a button, and then after a delay, teleport the player seamlessly into Elevator B to give the illusion that the elevator has moved, but it hasn’t at all.The player has just teleported from one elevator to the next in relation to the position and rotation of both elevator meshes. Moving the elevators is not an option in my case, as I want to create a network of elevators across several points on a map, and to maintain static lighting between all elevators.

I can get the player to teleport between the two elevators seamlessly if the elevators are both rotated the same direction. However, I’m unsure of how to do this is the elevators rotations are different. I can teleport the player the same distance from Elevator A’s origin to Elevator B’s origin by simple vector subtraction then addition, but I’m not sure how to get the player to teleport the same distance AND rotation from Elevator A to Elevator B. Does that make sense? Also, are extra steps required to ensure that the player camera faces the exact same direction in relation to the elevator’s origin?

Thanks in advance!

  • this is my fake elevator; it has an arrow component that marks the teleport destination

  • I’ve added 2 elevators to the level, moved & rotated their arrow components around

  • the player traces down, if we’re standing on the elevator’s platform, we teleport using the arrow component as destination

Image from Gyazo

Thanks for the replies. Although neither did exactly what I needed them to do, they did lead me to my “aha!” moment which helped me solve the problem. Basically, each elevator has an arrow set at the origin. When the player enters Elevator A and pressed the button to move them to Elevator B, I get the world location and controller rotation of the player and set Elevator A’s arrow to this location and rotation. Then, I get the arrow’s new relative location and rotation to the Elevator A’s origin, and cast to Elevator B to move it’s arrow to the same relative location and rotation to its origin. I then teleport the player to Elevator B’s arrow location, and set the player controller rotation to match as well. Perfect. It looks and feels as if the player is on the same elevator the entire time, which in turn makes it feel as if the elevator has moved across the map. There’s a slight visual “hiccup” when the teleport takes place, however. And I’m not sure what’s causing that or how to fix it, but I can live with it.