Hi everyone, I’ve been trying for a while now to come up with an accurate ledge detection system. I figured I need two traces so far, one that projects out from the player, and a second trace that ends at the collision point of the first trace to find the top edge of a wall. It’s quite hard to explain so I drew a little diagram:
So no matter how close the player gets to the wall, the second trace will always collide at the goal in the diagram. I’ve tried using the impact point of the first trace to calculate the start and end of the second trace, but this only works for when the first trace is actually colliding (a floating platform for example isn’t detected). I’ve tried to make it so the second trace always draws regardless of whether or not the first trace has collided without using the impact point, but because I’m really new to vector math and I’m still finding my way around the Unreal Engine, it’s not quite working out for me. This is what I have so far for the first trace in the ThirdPersonCharacter blueprint of the example project:
And here is what I have for the second trace which follows from the first trace in the same function (excuse the mess):
Thanks in advance