Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Climbing system

Anyone have any ideas on how you would go about creating a climbing system...A pseudo code would be perfect


  • WarpWarp Administrator

    Hey, so something you could try is placing a trigger on a stairs, and then when it is collided with, change the players movement direction up.

    Once your ladder is fitted with the collider, when it is colliding with the player, if there is any movement on the vertical axis (W or S) then make the player move up, instead of forward. Once they get off, go back to normal. That way they stay on the ladder, and if they fall off, they go back to normal.

    If you want some pseudo code, feel free to post your controller script, so I can adapt it to that.

  • The ladder thing gave me an idea thanks

    I will try to post it here when i am done with it

  • Although colliders should work fine, they can be tricky from time to time, especially when your movement gets a bit more complicated and you have several colliders quite close to each other. What can help in such cases is basically checking if the player is in a certain distance, I think Brackeys did this within his RPG tutorial once. You can then use gizmos for debugging purposes to check if the distance fits your needs.

  • I was think a raycast in front on the player

  • I was think a raycast in front on the player

    Could work, however then you are limited to a strict line, except you plan on having multiple raycasts. Could be tricky to get right. Think you have to prototype your best way in for what you want to have such a system. If it is "just climbing" from time to time and not the selling point of it all, colliders would work fine. If it needs to be more sufficient, as it is the main purpose of the game, you surely will have to tweak it quite constantly in the beginning

Sign In or Register to comment.