-
Notifications
You must be signed in to change notification settings - Fork 198
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
TilemapBundle::grid_size should scale images #337
Comments
In the case when grid size > tile size:
In the case when grid size < tile size:
Grid size is the "logical size" of the grid positions of the underlying tile map. Put differently, it is the distance between grid positions. For example, if grid size is Tile size is the "physical size" of the tiles being placed at each grid position. In particular, it is used to figure out the region of input texture that should be read from in order to visualize the tile. So, if scaling is required by the user, the best thing to do would be to provide a |
Adding another component to control "tile world size" is probably the better solution, but
I have a concern that the TilemapBundle is becoming quite unwieldy with a bunch of components that are not super clearly distinguished that a typical user will be setting the same value. |
I believe it should be in TilemapBundle, but I may be wrong.
Currently,
TilemapBundle::grid_size
cuts images off if smaller thanTilemapBundle::tile_size
or adds padding to the left and above if larger. The expected result is a scaled tile image which matchesTilemapBundle::grid_size
.This would allow a custom orthographic projection mapping where world space coordinates are the same as tile position without needing to re-adjust the orthographic projection's scale per tileset size. This would also allow use of multiple tileset's where the aspect ratio is identical even if the tile sizes are not. Traditionally Bevy's Sprite::custom_size could be used to achieve the same result.
If I have misinterpreted grid_size, or a breaking change like this is not allowed, an additional field for
TilemapBundle::tile_custom_size
or the like would be requested.The text was updated successfully, but these errors were encountered: