7 ms·
I think this part also needs to be considered. Many pathfinding algorithms, including A* , aim to find the optimal path. However, my goal started with repli
by Farer 2y ago
I think this part also needs to be considered.
Many pathfinding algorithms, including A* , aim to find the optimal path.
However, my goal started with replicating how humans visually find their way.
In such cases, humans cannot see the back side of obstacles.
Additionally, there are situations where the exact destination may not be known.
They simply infer based on what they can see in front of them.
"There's an obstacle over there. Which way would be better to go around?"
My approach began from this perspective.
This flow of pathfinding is entirely different from A*.
So, the algorithm has been modified a bit now.
I changed it so that it does not investigate the entire shape or full outline of obstacles.
The flow is as follows:
1. Attempt to move in a straight line in the direction I want to go.
2. Detect an obstacle.
3. Explore the visible outline of the obstacle, focusing on the side that seems closer to the destination.
4. When reaching the endpoint of the outline, select an appropriate detour point nearby.
The final detour point will, of course, be a location where a straight-line movement from the starting point avoids hitting the obstacle.
Once I reach the detour point from the starting point, I repeat the process.