Download

Climbing

Hello again,
as I mentioned in previous post I am making a game. It is actually some kind of rpg. I have my character who can run, walk and jump but I want him to climb onto walls of a proximate height.
Not every wall he can see but for example:
-walls between 0 and 0,5 meteres- pressing space is a jump on it
-walls beetween 0,5 and 2,5 meteres- pressing space is climbinng into at (as the photo shows)
-walls higer than 2,5 pressing space is just a jump and character cannot get on the top of the wall
Of course I can make the jump velocity higher to enable jumping on higher walls but it looks non-realistic
I already have an animation of climbing and need only to know how to script this in blueprint.

Thank you so much for all replies and apologise again for my English :confused:

Do wall detection using 3 linetraces that fires every frame (or however many times per second you want.
They trace forwards the distance you want player to be able to detect the wall he will jump.
Set em at at 0.25, 0.5 and 0.6 meters above the base of your character’s model.
IF the 0.25 AND 0.5 are TRUE, AND the 0.6 is NOT TRUE, then do a jump.
IF the 0.25 is TRUE, AND the 0.5 AND 0.6 are NOT TRUE, then do a climb.

Hi 6ixpool,
Thank you for your response, I will be more than happy to see the blueprint setup if it woud not be any problem to you.
Waiting for this post be agreed I made this image to be better understood.

climb.png

All the free code huh?

Ok then here it goes:
5c2fc06e44147588a5fcf92009c106f3038dcc61.png
52176aeff8e2a4c3c2b56d6bff9124b737296f96.png

I haven’t tested the code yet, but all the necessary logic is there. Expect to have to squash a bug or three.

EDIT:
I just realized there was a mistake in the second image. You want to remove the “set” nodes from the false branches and just hook them up directly to the next node. You then reset all 3 booleans to false after everything is done.

climbLedgeBP2-revised.png

Thank you so much! I will test it soon and check how it works.
Once I again, thank you very much for your reply!

You probably also wanna use “lineTraceByChannel” (using the visibility channel) instead of “lineTraceForObjects”. Trace for objectsbis better though if only specific objects can be climbed.

Hi,
I have set it all with some changes and I think it works but I have two further questions.

I think character detects all the walls he sees, how do it, that he will detect only near Objects, lets say in a 1meter area from him?
And the second thing is, i have conntectd jump aniamtion with the low wall, that he can jump into it and with the highrest wall that he cannnot either jump or climb. But how to connect my climb aniamtion that I have importrd to UE with my third option?
Anyway, I have learned many usefull things so Thank you very much for your help!

Okey, I solved all the problems on my own and made completly different system of climbing.
If anyone is interested of my solution, write private message :slight_smile: