- Home /
How to implement the flying AI path finding?
I want to implement the flying navigation in 3D space with NavMesh. I searched a lot but still can't find a method to implement it. I found a video in youtube: https://www.youtube.com/watch?v=RkrC0PopskM it's really cool and it's what i really wanted!
depends on what you want to achive with your project. In case you have an open setting like a field or a city with blocks of buildings that you want to navigate around you could simply take a nevmeshagent on a unity navmesh and have your plane attached to it with an y-Offset. Then you only need some basic script to handle y-$$anonymous$$ovement depending on how it should behave. I guess this way could be not applicable if you have a lot of tunnels and so on which cross over each other since the calculation of the y-Offset might prove to be problematic. From the video i'd say the guy who did that build some basic waypoint system. The "planes" in that example consist of 2 points. Point A which just striclty follows the waypoints. Point B, the acutal "plane", which just moves towards point A with a bit of distance. This way you get a smooth movement curve without any sharp edges. But you are limited to flying next to the given movement lines/waypoints.
Answer by oussamahassini6 · May 23, 2018 at 09:54 AM
you can watch this video it's really helpfull and clear I tryed it my self....... https://www.youtube.com/watch?v=CHV1ymlw-P8 please a good vote @morganlining
Answer by morganlining · May 25, 2018 at 01:07 AM
@oussamahassini6 @Captain_Pineapple Thanks for your reply. Actually, I need to navigate hundreds of drones to the different destinations. I think the Navmesh which using A* algorithm is difficult to handle it. I think Reinforcement learning is a good solution after some researches. And, Unity just published the ML-agents framework! link text
Answer by ankuragrawal · Nov 14, 2018 at 05:46 PM
@morganlining Were you able to train your agent for flying using Unity's ML-Agents? I'm trying to do something similar and wondering what was your approach.
I tried, but it was not working well. I plan to navigate the drone in 3D space so that I need 3D data as input. What i try to do is a little complex, and $$anonymous$$L-agents can't fix my problem. If you want to do the navigation in 2D space, I think you can training with $$anonymous$$L-agents. If the situation is complex, I prefer you to implement the algorithm with python and tensorflow. And that's what i am doing now.
Your answer
Follow this Question
Related Questions
Navigation Mesh + Doors 0 Answers
Getting a navmeshagent back on a navmesh. 1 Answer
Navmesh on all sides of an object? 0 Answers
NavMesh.SamplePosition returns point outside the NavMesh 0 Answers