I’m new to unity and am creating a simple grid-based game to understand things better. in the game I have a “start position” tile that sets where my hero will start the level. however, I can’t seem to get the tile to be located at a clean (1,2) kind of coordinate. instead, the location of the tile is always a long float out to several decimal places, like (-3.897622, 0.9561565).
This is creating problems further down the road when I want to specific particular cell/tile locations.
Is there a way to force unity to use Ints or rounded floats for its grid locations?
I’m going to assume your tiles are NOT placed by hand in the editor, but rather at runtime.
There is Mathf.Round which might work in this case. Try running your location value through that.