How to use navigation A(*) Hexagon Planet

  • Hexagon Planet contains a custom navigation node using the A (*) algorithm

  • The path lookup is in a separate blueprint to nativize it easily. If you have other goals, for example, to make the path search asynchronously in the second thread using plugins, then I advise you to transfer the code, for example, to the character's blueprint.

  • "FindPathLocation" - uses a point in space, takes a point and compares it to the location of the hexes and gets the nearest hex, this method requires a little more computing power due to the search for the hex.

  • "FindPathPoints" - uses the given indexes of hexes as input, if you have an RTS and a similar game where characters move exactly along the hexes, then I advise you to store their locations in indexes and use them to find a path.

  • "IsExcludeObjectType" and "ExcludeObjectType" are used to exclude objects with a certain collision type from the search, disable this if you do not need to check the collision type, this will increase performance. "ExcludeObjectType" can be used as an array to exclude different types of collisions, but I recommend that you leave it that way to increase performance.

  • "InclusiveContinents" - include here the types of continents to check, if you only need land then select 2, and so on. Choose only the types of continents you need, this will increase productivity.

  • If the script completed successfully, "IsSuccess" will return yes and "IsPathFound" will tell you if the path was found. If a path has been found, then "PathLocations" contains all the hex points to go through. Produces high points using continent parameters, you can output low points or just indices with a little code editing.

  • "FindPathLocation" contains a small example of code that, using "linetrace", interrupts the path search at the very beginning, for example, if you are trying to find a path out of the planet or into a forbidden collision type, but according to my test it eats up more performance if the search is correct and I do not I advise you to use.

  • You can see the details in BP_AIPawn

  • If you are having difficulties, then write to me in discord.