Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | dejvid_bejlej | |
Old Version | Published before Godot 3 was released. |
I’m working on a player movement in platformer games, I have a Player (kinematic body) that can move to the sides, jump and grab/climb walls when holding a “grab” key.
He’s on a TileMap, right now he can climb on every tile(wall).
I’m trying to make it possible to grab and climb only on speciffic tiles (like ladders), and I’m wondering if it’s possible to “set it up” in a tileset.
To clarify what I’m trying to do:
- make a TileSet that contains few tiles, one of them is Ladder tile
- the ladder tile is set up in a way that lets player check if he’s colliding with it (I think Area2D doesn’t work, I thought about using raycast2D)
- create a TileMap with that TileSet
- Put that TileMap in a Level scene where player could detect if he’s colliding with Ladder tile, and if he is, he can clib it
I could probably do it by placing Areas2D in a level scene in places where climbing should be possible, but the amount of work (and nodes) necessary to do it would be very inconvenient
I also thought about getting a tile ID when interacting with tilemap but as far as I know, that requires preloading a map, so if I have many of them (maps), that’s kind of inconvenient.
Any ideas?