Allow TileMap's get_surrounding_tiles
method to return either side tiles or side and corner tiles
#5546
amifelipek
started this conversation in
2D
Replies: 1 comment
-
godotengine/godot#58140 does exactly that! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In Godot 4 the TileMap node has this method called
get_surrounding_tiles
which is great but it would be nice to be able to get either the side tiles (it's already doing this) or to return all the 8 tiles around the given position.The way I found around this problem was to use the
get_neighbor_cell
method, with this piece of code can get the corner tiles thatget_surrounding_tiles
doesn't gives us:Having something like
get_surrounding_tiles(position, TileSet.SIDES)
andget_surrounding_tiles(position, TileSet.SIDES_AND_CORNERS)
would be really nice!Beta Was this translation helpful? Give feedback.
All reactions