Recursive node-based pathfinding
In the image below, I have a set of nodes with splines connecting them together.
These nodes are basically just empty blueprints with a C++ parent class that manage the spline connections whenever a change is made in the editor.
In the character class, I've implemented the ability to raytrace (or "shoot to choose") a node.
When a node is chosen, the player is placed on the node closest to his current location.
The goal of this project is to try and figure out which paths are valid ones to take to reach the chosen node, starting at the node the player has been placed at. I am NOT just searching for the shortest path, I'm searching for all valid paths to the target node.
The problem I'm having is implementing a recursive function which does exactly that. The closest I've come was starting at
Here's the code that I've written so far:
Can anyone help me out?
Again, I'm not looking for Dijkstra's or an A* algorithm here, just trying to assemble valid pathing data.
Follow this question
Once you sign in you will be able to subscribe for any updates here