Just a quick question about teleporting.
I have two boxes as illustrated. Blue “Sends” the player and Red “Receives” the player.
Now, I have figured out how to teleport to that exact location as Illustrated
However, I’m sure there must be a way to “grab” the location of the red block so I wouldn’t have to hard code in the coordinates, so that no matter where I put the red block, blue would automatically send me there. Is there a way? I’m sure it’s dead simple and obvious, but I’m fairly new to UE4… and it is currently 3:40 am… Yikes…
This is simple solution, but it should work.
All you need to do is make reference variable, and store instance to the reference variable when you place a set of teleporter to your levels.
Make sure make the reference variable public(open the eye icon).
I don’t fully understand the “destination reference”, I assume that is set up be the receiving pad by getting it’s world location?
As I said, I’m pretty new to all of this so I don’t fully understand how everything works
Destination Reference is just a variable of this actor.
First, hit the [+] button right side of the list of variables. Then set the type of the new variable as your receiving pad actor reference.
In my case, the type of Destination Reference is Object reference of BP_Teleporter.
Aaaah I see… I got it. Got it working, however, you don’t land atop the object but at the base, is there a way to adjust the Z axis value of the destination?
I know I sound like a total noob… but really… I am…
Put a scene component to your teleport BP, and name it “Teleport Point to” or something.
Then get the component’s location when the character teleports.