1 decade ago by Elvar
Hey developers.
As stated in a previous thread, i am currently working on a TD, in my game, you are to buy towers from a menu, after selecting a tower from the menu, it follows the mouse.
This works great, but i want the tower to snap to the grid, as the player moves the mouse, how should i approach this?
I thought i could get the tile, using the getTile method, but this seems only to work on collisionMap returning 0 or 1 only.
Best regards
Elvar
As stated in a previous thread, i am currently working on a TD, in my game, you are to buy towers from a menu, after selecting a tower from the menu, it follows the mouse.
This works great, but i want the tower to snap to the grid, as the player moves the mouse, how should i approach this?
I thought i could get the tile, using the getTile method, but this seems only to work on collisionMap returning 0 or 1 only.
Best regards
Elvar