Teleport collision issue

i have a line trace that go from character to the distant point that my cursor is at.so my character teleport to the hit point and if theres is no a hit point then it teleports to the end of the line trace,but when theres any object that hit the capsule component of my character but not the line trace it stops there,i have tried using the set actor location and teleport nodes,if sweep is disabled in “set actor location” it kind of works but when the target is at the feet of my character it clips in the floor

here’s a beautiful example

maybe if i could adjust the vector that was generated by the line trace?like adjusting it with collision?i don’t know

Get your end point location.
Do a sphere trace down from that location the radius of your capsule. This is to check for clearance. Adjust accordingly based on hits.

do you mean to put in the end of sphere trace the “end point location” - “my capsule radius”?or do you mean to use my capsule radius as the sphere radius in the sphere trace?

also if my target vector was in a wall it will clip the wall,because i think it’s only affecting the Z axis right?

I mean a sphere trace the same exact size as your capsule to check for clipping. You can then use the impact normal like you were going to place a decal to get the offset direction. Then offset in that direction a few cm (20 or so) and do another trace.

This will prevent you from teleporting into a collision.

1 Like

Thank you! I’ve finally made it work