0
$\begingroup$

I've been working on a new game with the Blender Game Engine - a 2D platform game. I've added some basic functionality, and now I want to allow the player to climb a ladder.

To put it very plainly, how do I do that (either by logic or Python code)?

I've seen some tutorials online, but they seem to have a roundabout approach (but I'm probably wrong). They add a plane to the ladder, and allow the player to climb then. I gave it a different try and set it so that if the player was touching the ladder and pressed space, his z velocity (I think it was) went up. He was able to climb the ladder that way, but the animation was very unrealistic.

So, I am just wondering the best, professional way to allow a player to climb a ladder. Furthermore, what if the ladder was slanted a little? How would you climb that? (I guess you could create logic moving him up and forward, but that would require a whole new ladder function; one for vertical ladders, and another for slanted ladders).

P.S. Any help is appreciated. Any tips or whatever offered will probably be used in my game and other projects. I may not be able to offer any credit, but help will still be very appreciated.

$\endgroup$
  • $\begingroup$ Have you tried changing the collision type of the ladder to sensor? That way you shouldn't bounce off the ladder, but continue to climb. $\endgroup$ – christai Oct 22 '16 at 13:48
  • $\begingroup$ Unfortunately, that doesn't work. First of all, the ladder is able to be walked through. Secondly, the player actually doesn't climb it for some reason, like it doesn't detect collision. Any settings I need to change or something? $\endgroup$ – josepharaoh99 Oct 25 '16 at 1:14
  • $\begingroup$ Okay, the error seemed to come from me locking the bones' positions - that was why the player was knocked back. But I'm still wondering how to add professional ladder climbing ability to the game as mentioned above... $\endgroup$ – josepharaoh99 Oct 27 '16 at 0:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.