Wall climbing system?

Ive looked all over the place and could not find a explanation or tutorial on how to make a wall climbing system so I came here. How do you make a system like this https://youtu.be/LZ9MR9clPTA?t=699, I dont even know where to start :frowning:, if someone could give me a good explanation I would be in debted to you.

6 Likes

You mean like a parkour script?

1 Like

I guess wall climbing is considered parkour.

1 Like

I’m guessing that you have to do raycasts forward to see if there is a wall, check the wall’s angle and if it is climbable (in case you only want specific walls to be climbed).

If a wall is detected you could use bodypositions, forced or whatever velocity works best to position the player against the wall.

You may want to detect WASD input.
If the player pressed W for example, you do a raycast up to see if there is more wall.

If the wall still goes on you adjust the velocities/positions so the player moves a bit up. Else you disable the wall climbing state.
Same for the other directions.

I’m not very good at math though and not sure how complicated it exactly is to make but this is how I had it in mind.
I guess you can detect which side of the wall you are climbing and make the character rotate to that direction to avoid akward positions and so.

3 Likes

What type of wall climbing mechanic do you want?

A free flowing system is dynamic, gives the user full control of where they can go but is harder to get right, especially when it comes to testing consistency.

An animated and fixed parkour system still provides a little freedom of where you can use it, but it is very consistent and likely to be more stable. You can better define where users can use their park our with this system aswell, which has its pros and cons.

In other words, you need to think about your genre and style of game, mechanics and think of which version will best fit and add to your game.

As for the actual system. Just break it down in to four or five sections:

  • stopping the character from falling when ‘holding on’ (anti gravity)
  • running
  • sliding
  • moving the character left/right when ‘holding’ a ledge.
  • maybe double jumping?

Start with the absolute basics: create a wall you want to be climb able, detect when the character is near or touching the wall (tray cast, or touch event), then implement anti gravity.

You could stop the character from falling by creating a Body Force and setting it to the character’s weight * gravity, weld them to the wall, or place a block platform under the character’s feet.

From there, figure out how to move the characters left and right, falling, etc.

5 Likes

You can go check this guys post out! I think you’ll find it very helpful.

2 Likes