Distance interpolation between character and wall, but only in wall facing direction

For my climbing system I want to interpolate my character’s position when he starts climbing and also during the climb, so that the distance between character and wall is fixed. But the character should be able to move in different direction freely.

Here’s what I have… I basically to trace from my character in forward direction, get the hit location and hit normal, so I can calculate distance and rotation. Then I lerp current’s position to the new position, excluding the Z axis. So right now the character can climb up and down, but not to the left or right.

My problem: The new vector I create and lerp the capsule position to should exlude the characters x-axis, so he can climb left/right.

Any idea how to do this?

There is a very useful ThirdPerson template where “Wall Climbing” is implemented you should take a look to it :smiley: :wink:
https://forums.unrealengine.com/showthread.php?125187-FREE-ThirdPerson-Action-Platformer

Thanks, I’ve seen it, but not sure if it helps in this case. If you only have straight walls to climb it’s easier…but I need to continiously check and interpolate the distance. What I have here is more of a Math/Logical problem :slight_smile: Feels like I’m almost there, but still can’t figure out how to exclude characters horizontal movement from my target vector I want to interpolate to (the Make Vector node).