Pass through wall on double jump not working on second attempt

Hello everyone, I built a simple mechanic to pass through a wall on the player’s double jump.
It checks jump availability and, if in range, when the player double jumps it passes through the wall insted of splatting on it.
The problem is, when i try to do it again on the second wall, it just double jumps normally and dies to the wall.
I double checked all collisions and can’t figure out the problem.
Any help is very appreciated, thanks! :slight_smile:
First three pics are player bp and last one is the obstacle bp:

And here’s the video of what happens:

1 Like

It looks unnecessarily complex. Why not just turn off player collision when the player jumps?

I simplified the blueprint disabling the player collision directly but the same problem happens.
First two are player bp and last is the obstacle.

(Last collision is set on beginplay and checks what type of collision the player starts with so I can be sure it resets as it was before)

I don’t think you’re updating the reference to the obstacle?.. It’s valid for the first, but not the second.

BTW: A DoOnce node is easier than counting jumps.

How would I update the Obstacle reference? I just set it at Beginplay and thought it would be valid for all instances of the actor.
Sorry if I ask dumb questions, It’s been a while since I used UE.

1 Like

Ah, noo… that’s the problem.

Each object has a unique reference :slight_smile:

The player would need to get the wall reference on overlap ( or the wall could set it in the player ).

1 Like

Thanks! I’ll try it now.

Yup. It worked. Thank you so much :slight_smile:

1 Like

:smiley: :pray:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.