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

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?