- Home /
Pathfinding in a 3d Space
Heya, I'm creating a space simulator in which the player combats with enemy ships in a field of procedural generated asteroids and obstacles. What is the best way I can get an enemy ship to pathfind it's way to the player whilst avoiding the asteroids. Since the pathfinding needs to work in 3 dimensions, I doubt a navmesh will work since that only deals with surfaces. How can I program the AI to find a route to the player?
Answer by MoR81204 · Apr 09, 2019 at 02:15 PM
You could use the A* pathfinding algorithm, if you're new to A* I recommend watching Sebastian Lague's A* implementation tutorial series on YouTube - https://www.youtube.com/watch?v=-L-WgKMFuhE&list=PLFt_AvWsXl0cq5Umv3pMC9SPnKjfp9eGW
@jarratt51 how did the A* implementation go? I am trying to solve the same problem as you. I have seen A* suggested for this problem a few times.
Your answer
Follow this Question
Related Questions
Is there any full 3D-Pathfinding asset/solution? 3 Answers
Move towards the player only when the path is not invalid or partial 0 Answers
3D flying enemy pathfinding,3D flying pathfinding? 0 Answers
A* Pathfinding on enemy to follow the player 0 Answers
A* Pathfinding AIFollow in JavaScript? 0 Answers