Aim, Click, Teleport.
Hello, I was wondering if anyone knew of a way to teleport the player across a level to the position where they're aiming, and on top of this add a limiting perimeter of distance where the player can teleport. Kind of like this guy explained Cø when he said "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)" in this post.
Thanks in advance, I look forward to people reaping the mechanic rewards from this one.
asked Mar 16 '15 at 12:40 AM in Blueprint Scripting
I think you already have the answer within your question.
When you click the mouse button, simply do a line trace along the control view forward vector. The teleport distance limit can be easily implemented by setting the trace length to whatever is the maximum teleport distance. If the trace returns a hit, you will get the trace hit location and slope from the HitInfo. Then you can simply set the location of your character to this new location.
answered Mar 16 '15 at 03:22 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here