I’m working on a C++ project(mapmaking project with custom triggers for NPC’s) where I am not using the unity engine but the terrain (and all the procedural generated prefabs) are made in the unity engine. The terrain will be randomly generated each time (also all the prefabs).
So I have:
The terrain with all the obstacles and I (can) generate a navmesh from Unity if needed (or better yet from A*).
Example:
I have a constantly updated object position(x,y,z) in my program (this will have the same world coordinates as the nodes use).
I want to set a target (x,y,z) in the world and instruct the object to go there without getting stuck.
The easiest I thought would be:
I need a web or graph that my C++ program can use (standalone). It doesn’t need to care about the map, only its current position, where the target is and which nodes to use to get there the fasest.
The nodes do not need to go to the target. As long as a node is sufficiently close by i can instruct by code to stop using the node webwalking system and go straight from the closest node to the target.
Would it be possible to get each ‘center’ of a hexagon and export this data in json or an array or anything so I can use it in my C++ project?
I mean, worst case i can write a C# script which finds each center of the hexagons provided by A* and writes them to an array.
Would anybody be able to help me out or send me in the right direction?