2.5D SideScroller Teleportation

I’m just starting out with Blueprints, so I thought I would have a go at Teleportation. I’m trying to make it work in a sidescroller, and the first attempt I made at it used a line trace sent out from the character then the first surface it hit, it would teleport to. Though this worked I wasn’t happy with the lack of control.

So I’m trying to teleport based on the mouse cursor location and mouse click to activate, but this leads to you teleport into the background, or being stuck in mesh.

My first thoughts were to try putting a collision box behind the character, but this led to the character being stuck in the mesh, Teleporting to ledges also leads to being stuck.

Any tips or pointers in the right direction would be greatly appreciated.

What I have so far:

Hello, this post is old and I don’t know if it’s within the rules to reply but I want to help people like me who came to this post from Google only to find no answers. See screenshots. I started like you with GetPlayerController but I connected it to ConvertMouseLocationToWorldSpace. Plugging World Direction into a floatvector to set line distance to direction. Now using GetWorldLocation (mesh) I did vector+vector with the floatvector I did with World Direction earlier. Since it is a side scroller, the X value has to stay the same, I split construct pins on vector+vector, connected the Y and Z pins to ToVector(2D), split the input construct pins so that you can plug the Y and Z pins, and set the X value to whatever the center of your character is. (Later when I did vector+vector, only to add 50 Z value, is because the mouse location wasn’t well inputted and it was a litle lower than the mouse). You connect it to the End of the LineTraceByChannel. On the Start of it, you just need to insert the GetWorldLocation for your character. Then you can connect to teleport functions as usual. Lastly, because even if you teleport, the falling acceleration stays the same, which is weird, you can SetMovementMode to Walking as you press the key to teleport and when you release the key it will set the movement mode to falling again (so that falling acceleration is reset).

EDIT: There is a mistake, on the branch True or False output, they have to be inverted (True goes to the below Teleport function, False goes to the aboce).