Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Gonz4 L |
When you press certain buttons, the tilemap flips vertical or horizontally.
The problem is that the player could get stuck in the collision shape of a tile.
How i could transport my character to the top of the tiles when stuck in one?
What have you tried to solve issue already?
Reloecc | 2020-09-17 06:59
I used RayShape2d and it worked for my original question, but more important than the character being over a tile its that the player always has to be in the nearest free space, being the priorities up and down (depending on the position of the center of the collision shape, it will go to one direction or the other (if in the middle of the tile, then up) ) and left or right if there’s no space in the previous directions.
Gonz4 L | 2020-09-17 22:55
Sounds complicated… I would flip a tilemap around the player (if possible by game design)? So you’ll sure there is allways going to be a space for a player.
Reloecc | 2020-09-18 04:54
Yeah, i know. If i don’t find the way to do it relatively soon, then maybe that will be ok with an area2d? Thanks!
Gonz4 L | 2020-09-18 06:14