Please, what is the best way to implement a climbing mechanic in a 2d game?

Godot Version

Version 4.7.2

Question

I’m currently working on a 2d game and I’m having trouble with implementing a good climbing mechanic. I currently use a collision shape as a “climb zone” So when the player enters the climb zone it immediately jerks up like a rectangle since it has a rectangle collision shape, and it doesn’t look very nice or polished at all. And it’s also my first project so I don’t really have much of an experience in Godot. So please feel free to share your ideas and ways of implementing the best climbing mechanics in Godot and maybe a wall run too when trying to get to the top lip of the wall as this is also a major problem I’m facing. Thanks everyone.




One way to get you started:

  • Make an invisible climb area on top of your ladder.
  • Once the player is inside it they can press some action to enter climb mode (for example Up/Down or a button).
  • In climb mode they can only move up or down.
  • If they either hit a bottom or top area (or leave the climb zone) they stop being im climb mode.

Are you able to use CharacterBody2D’s is_on_wall() check?

Thanks for your suggestion, it’s helped me in implementing another mechanic, although to be more specific the climbing mechanic I’m referring to is actually like a Parkour wall climbing mechanic and not that of a ladder. It’s more of a wall run ledge grab climbing sequence. Thanks for your suggestion I appreciate​:blush::folded_hands:.

Thanks for your support. Yes, that’s what I’m currently using but it’s not really meeting expectations. And also to be more specific the climbing mechanic I’m referring to is actually like a Parkour wall climbing mechanic. Thanks for your time :blush::folded_hands:

For more details about the climbing mechanic I’m referring to is actually like a Parkour wall climbing mechanic, and It’s more of a wall run ledge grab climbing sequence. Thanks to everyone that showed support​:folded_hands:.

And that’s why it’s important ask specific questions.

What’s a “climbing mechanic”?

Ok tnx for your help guys :blush:

Climbing Mechanic sounds like a mid 80s game where you play as Carl the car mechanic who lost his tools on mountain peaks and now has to get them back. There probably exist a different timeline where we don’t have Mario today but instead got Carl.

:smiling_face_with_tear:sorry I wasn’t able to explain well, I’m actually new to Godot and this is in fact my first project ever. In short, I’m just trying to make a Parkour game like the mobile game “Vector” But I’m having troubles with most things, I’d really appreciate your help guys. :rose:

I believe it’s 2D actions such as these…

Yes exactly :heart:

That’s what I thought. Then there’s Climbing Mechanic 2, where you need to go down the mountain throwing wrenches and screwdrivers at enemies.

You should have initially mentioned it’s a side scroller. Use character body’s wall detection system to determine when to switch to the climbing state and use a raycast to determine when you reached near top.

Yes thanks, that’s what I did but I didn’t make use of ray cast, only area 2d. And also the thing is if I don’t get above the top ledge of the wall, I want it so the player does a quick wall run to meet the top ledge. Please do you have any ideas on how I can implement that?

Check if your character body is on the wall and if yes change the movement/control logic to include climbing up the wall.

Along with ray cast right?

Yes, use raycast to determine if player is near the ledge.

Tnx brotha​:handshake: