How to not Teleport into objects?

Do a world capsule trace where the destination will be. If it hits anything, don’t teleport. If it doesn’t hit anything it’s safe to teleport. You may need to move the capsule trace slightly up the z-axis so you don’t hit the floor.

I have a side-scroller character who I can get to teleport left and right. Thing is I want to be able to teleport past obstacles, but it would do no good to get stuck in them. Sweep won’t work for me since it prevents bypassing obstacles entirely, so how do I set this up to where I can teleport by obstacles, but either stop the player from teleporting, or stop the teleport short if they’re going to get stuck inside an obstacle?

76437-teleport+code.jpg

NOTE: Event Tick sets the vector variable you see in the picture to Player Vector + y: 500. I have a similar set-up for teleporting in the opposite direction but it’s virtually the same so I did not include a picture of that.

Thanks for the input!