Need help with 2D teleport issue
When the player overlaps the box and teleports, if something is above the player they get stuck in the wall essentially and can't move or do anything. What would be a good way of fixing this?
One way would be to use a line trace (raycast).
If you have line of sight to the teleportation location you can do a line trace to see where the nearest non-intersecting location could be and then use that location as the destination.
If you don't have a line of sight, you can try a line trace or a shape trace from the teleport location outward to see if what's the nearest non-intersecting point.
answered Dec 14 '15 at 06:54 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here