Jump to content

Ladder physics with Arcade on a Tiled map


Luxis
 Share

Recommended Posts

So, I'm trying to implement ladder physics in a simple 2d platformer, with the map made in Tiled. My solution is that I have a ladder object, and then update checks for overlap between the player and the ladder entering the function "climb". As of now, two problems occur:

 

  1. When overlapping with the ladder, I wish to disallow gravity for the player. This works fine. However, I do not know where in the code to reallow gravity in order to make the gameflow smooth. I tried putting an "if-not-overlap", but this obviously doesn't work since "climb" is then not entered.
  2. (Tiled): I implement the ladder as an invisible object through "Insert Rectangle". It has a specified height of 105px. However, in game, it is only a small box, which doesn't appear where I would imagine, see attached picture.

Happy for any help, also feel free to ask for clarification.

post-16226-0-69247700-1441975033.png

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...