A* Custom pathing
I am creating a custom path node system to use as the default unreal isn't for flying things
I have created a component that i am using as a path node to use in the A* algorithm. i have collected these components in an array in a separate navigation class that is used to search the array and return a rout.
The system works when only 1 pawn is using the system. I am assuming that it doesn't work with multiple pawns as each pawn can be accessing the nodes at the same time if they are in different threads.
is there a better way to deal with this issue other than creating a struct for each path node in each pawn and copying the components relevant details e.g. g,h,location, etc <- i don't want to do this for performance reasons if i can do it a better way.
with your responses bear in mind that i am a novice coder and will probably need very basic / step by step explanations.
asked Oct 18 '16 at 02:44 AM in C++ Programming
I'm not doing to give you step by step instructions, because that would take a lot of time to write it down (actually it would be quicker to just implement it! :D ) but I've figured it's better to give you a answer than to give you nothing.
I'd suggest you created a new navigation data type. You do that by implementing a class inheriting from
One note, unless you manually make sure your code runs on multiple threads the gameplay code in UE4 is always run in a single thread. It's a strong assumption and unless you really have to go wide I would strongly advice to stay on the game thread (especially if you're a novice coder).
Regarding A* implementation that can be used by multiple agents at "the same" time see if you can figure out how to use
answered Oct 18 '16 at 03:19 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here