-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get_surrounding_cells in TileMapLayer should specify that it means surrounding in 4 directions not 8. #9779
Comments
Might want to use the term "orthogonal neighbors" in addition to plain language, as it's the technical term for it. Edit: I don't use the 2d tilemap system, but from reading the source it looks like these functions don't always return 4 neighbors. The TileMapLayer function calls into this TileSet function. When the tile shape is |
I think 6 tiles is for when you use hexes instead of squares for tilemaps. I like "orthogonal neighbors." |
I agree with DanielBrunoDavis. It took me hours to realize this and now I'll have to rework a lot of code around this because I need to know if corners are present. Having known this, I could've worked around it from the get go and spent less time debugging. I don't know if it's the correct place to suggest this, but having the possibility to tell the engine you want to include corners by adding a bool to the function (true for including corners, false for excluding them, whichever it should be by default) would be a nice addition that would maintain the way it works currently while adding a new functionnality for those of us who would like to use it. |
@IrontMesdents The right place for a suggestion to add a feature is in https://github.com/godotengine/godot-proposals/issues/new/choose. For your case, you'd choose "Feature implementation proposal" and go into as much concrete detail as you can. I agree that it sounds like a useful feature to add. If you had only a vague idea about a missing funtionality, you might want to start with "Share and discuss ideas" instead. |
@IrontMesdents A change has been proposed godotengine/godot-proposals#3973 but it was a while ago so I just thought I'd suggest updating the documentation. |
Your Godot version:
4.3
Issue description:
"get_surrounding_cells" in TileMapLayer doesn't specify if "surrounding" means 4 directions or 8. It should specify that it means surrounding in 4 directions.
URL to the documentation page (if already existing):
https://docs.godotengine.org/en/stable/classes/class_tilemaplayer.html#class-tilemaplayer-method-get-surrounding-cells
The text was updated successfully, but these errors were encountered: