![]() ![]() However any pointers in the right direction in regards any of the points raised would be appreciated. I definitely don't expect anyone to have any ready made solutions to this. I would also need to find a way to tie Aron Granberg's pathfinding into the grid so the units find the shortest route to the destination and avoid obstacles when they move. The movement between grids should be smooth. I want the grid to be square and I want to allow diagonal movement and attack so it would have eight directions. So far I think I will need to instantiate a grid when combat begins and then limit movement to the tiles of that grid and to the number of points the player has to move (1 point = 1 grid square). or work out so that you get whole pixels, otherwise it seems the calculations will produce some floating point fluctuations like this. if the resolution is 768 pixels high then the ortho needs to be 384. I will need to go back to grids soon though as I'm developing a turn-based combat system with tile-based movement (similar to fallout 1,2, wasteland 2 etc.). with pixel snap it seems you also must have an exact pixel-to-texel ratio set up in your camera, so that e.g. Since writing that comment I've found out that I do not need a grid to do this as I can just round to the nearest coordinate in unity. Originally I wanted to move a building around the map according to a grid so it would be easier to place the buildings in perfectly straight lines. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |