How to not Teleport into objects?
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?
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.
asked Jan 29 '16 at 12:17 AM in Blueprint Scripting
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.
answered Jan 29 '16 at 12:25 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here