Download

[Solved] Vertical Sphere Trace not remaining in front of character

I’ve been trying to follow this tutorial series on making a wall climbing mechanic. I’ve gotten stuck, though, because the way he recommends making the vertical “ledge trace” as shown in the video isn’t working properly in 4.22

My version of the ledge tracer:

In case it’s an error made elsewhere in the blueprint:

As far as I can tell after doing it over a couple times, I’ve done as the tutorial instructed. However, this is always my end result:

The horizontal test does what it’s supposed to, stays in place, and detects the wall. The vertical check ends up behind the character and at an angle. I had to work at it, but I was able to verify that it does behave properly if by some chance you manage to make it collide with the block, but it’s obviously not staying in front of the character, so it’s not really practical. What did I do wrong or what changed in Blueprint that this no longer works, and what can I do to fix it?

Looking at the ledge trace logic, the “Start” point is the one way above the character and the “End” point is behind you … so the problem is the “End” point. The issue seems to be that you’re not adding your forward vector manipulation back to the character’s original position. So you get the forward vector and multiply it by 70 then subtract the Z by the distance (whatever that is). But when you set that as the “End” point, it uses this transformation relative to 0,0,0. So the “End” point is 70 units forward and <distance> units down/up from 0,0,0 instead of your character. Use another “Ger Actor Location” node and add it to the vector before passing it into “End” and I imagine this will resolve your issue.

Thanks for that. I actually managed to get past this point already, I meant to mark this as solved as soon as it got past review but you beat me to it lol. For the record, it was exactly as you said. I figured out the end was stuck at the world’s point of 0 and found a solution from there, although I didn’t realize it was a solution at first lol.