Hi! I am trying to create a basic tower defense game where I have set up my cell size to be 0.5 X and 0.5 Y (so that the player can place their towers more freely, think WC3). This causes problems when I later in the game wants to check if a grid cell is occupied, because some cells will seem to be taken, but actually are not. Here's an image to illustrate my problem: The black square is rendered over 4 cells, but only 1 of the cells are occupied (the white square in the lower left corner of the black square). Have anyone else faced this problem and knows how to solve it? Thanks in advance!
Thanks for your reply! This will only affect the size of the sprite, but not actually how many grid slots it will occupy.
In my tilemap game, I maintained a 2D array in the code which defined whether a grid cell was empty or occupied. It would be very easy to place an object in one cell and then tell all 4 cells in the array to be occupied.
Thanks for your reply. I am also starting to realize that my use case for the built in grid is not possible to accomplish, so I think I will have to implement something myself, as you are suggesting.