I am currently working on a custom navigation system that works on square grids.
I wanted to confirm if I was going on the correct path or not or if there are some easier ways to do this.
First what I did is create a class derived from UObject where I store the locations in a 3d array…(Could have done with a 2d array but I am going with a 3d array cause there is a chance I might have multi-layered structure)
I will just store the z values in the 3rd array and the array index of 1st and 2nd array will correspond to the grid number.
Say something like X.Y.Z*. Here the Z just stores a float which can be movable.
If the 3rd array in blank then there are no movable locations in that coordinates.
I am planning on having 4 different arrays for 4 quadrants
But one getter function to see
if the coordinates are positive and negative and get the array.
I will allow to place custom volume. The locations that have volumes are the only locations that are movable and get added to the navmesh grid data.
I will also add a custom blocking volume to prevent the navmesh data from being added at those regions.
After adding the navmesh, to detect for collisions, I plan on spawning square blocks by tracing down from the top of the volume. If the don’t collide and do some other calculations to check if a grid is movable or not.
So is a method like this feasible?