How would you teleport to a point in front of you?

Hi,
I am having trouble figuring out how to teleport my character to a point, say 50 units in front of me. How would I go about doing this? I looked at this forum, and it shows you how to teleport in a single axis (Teleportation in a single direction - Programming & Scripting - Epic Developer Community Forums)

Also I was thinking it would be really cool if you could teleport to a location, again lets say 50 units, in front of the camera, so that I would be able to teleport in any direction based on where I was looking.

Thanks in advance.

Hi, something like this should do the trick (T teleports according to the camera direction, R teleports in front of the character)

NB: i multiplied by {50,50,0} to remove the Z component and prevent teleporting through the ground, it’s not a 50unit teleport, i should have removed the Z component then normalized the vector then multiplied by 50 but it would have been harder to read.

Thank you so much, I was wondering how to do something like that. There was a problem with teleporting through the landscapes like the mountains. Is there a way to stop that from happening or may if you are near the mountain you just teleport to the other side. Also I was wondering, how would you teleport into the air like onto a ledge or something like that?

Instead of just teleporting the actor you can compute the new location as explained in my 1st comment then make vertical a line trace check upon this location to find the “ground” there and your teleport will follow the relief of your landscape (not sure if this is what you need but it seems to be a good idea)

I am a complete beginner and I have no idea what I am doing. So what do you mean by vertical line trace and normalizing a vector. Also how do you take out the Z component. Like I said, I am a complete noob.

Here is one way to do what i explained in my last comment, it makes a vertical line trace 50cm in front of the character (to find the ground), and then teleport the actor on the ground at this location.