Hello I need help with movement after a wall jump in a 2d endless runner.

Hello, I’ve been stuck for awhile on a problem. I’m making a 2d endless runner.

I’ve made my character move forward on the x axis but when the character wall jumps he goes the opposite way for a moment but then turns back around and resumes his normal movement.

I’ve tried movement with both timelines and tick to no avail. I thought I was close and got it to work with a branch condition of after wall jump change character movement by multiplying forward vector but then he was always in a wall jump state and no longer needed a wall to wall jump. He could just switch direction any time you pressed jump after wall jumping once.

I am humbly asking for help and thank you very much.

It’s impossible to know what could be wrong.

How do you implement jumping?
How do you implement wall climbing?
How do you update state in general?

There’s probably a bug in there somewhere.
What I would do if I didn’t know more than this, would be to put some print statements in these parts of the code, printing the movement/input vectors at each tick, and seeing what I can find.
Maybe put some branch statements that only prints in some cases (say, when X movement is negative) and then maybe put a breakpoint in those places to see how they occur.

Ya i figured it’d be hard lol. I’m at work unfortunately but I’ll upload some pictures when i finally get home. I’ll try that as well and get back to you thank you.

Does this help at all? It does turn the character around but I can’t get it to check for wall jump anymore after the first jump. I tried copying all the wall jump stuff to the bottom branch but it does nothing.

I know it’s something to do with that first branch. I’m still new to all this so if there’s an easier way to do this entirely I’m definitely open to it.

Hmm, if you’re using the CharacterMovementComponent, I’m not sure how to easily get that to support wall running.
You probably want to, at a minimum, set it into the “custom” movement mode when you enter wall jumping.

Also, the top part of your graph makes it look like you’re launching the character to the right if it’s climbing a wall on the right? That doesn’t quite seem right, maybe something to look into for your current approach.

1 Like