There are a few developers on these forums who have made attempts at making gridless TBS games. Ryukra made a thread of it here a while ago, though I think he has since abandoned the project. You might want want to send him a PM if you want to make something similar. Stormrage256 was also working on a semi-gridless tbs system before switching to full grid based. Here’s a video of his older WIP game.
I prefer working with grids myself, though, and creating a hexagonal grid in UE4 is pretty easy. All you need to do is to create an array that holds the locations of all the tiles of the grid. You can make this easily by running a for-loop that adds vectors to a vector array. You’ll need to input two integers for the width and length of the grid, and then you add a vector with an X-value equal to the loop index modulated by the width of the grid and add a Y-value equal to the index divided by the width of the grid. You’d want to multiply both of these values by the size of each grid cell. Like so:
For hexagonal grids the process is pretty similar, but you have to offset every other grid row by half the size of your grid cells. Also, the Y distance between rows should be 0.75 times the distance between columns (provided your hex grid is not flat-topped, in which case you replace columns and rows in the last sentence). You’ll end up with something like this:
Now do a forloop on your new vector array and add a hexagonal static mesh (preferably instanced static meshes if you use a large grid) to every output vector and you should end up with something like this:
For distance calculations you could do what Zeustiak is suggesting.
For more info on hexagonal grids I would look at Amit’s excellent website here.