- Home /
Helocopter obstical avoidance (Navmesh agent)
Ive changed the helocopters nav mesh agent base offset so now it is floating in the air and I can move it as desired but the nav mesh agent below the helicopter that controls the helicopter still can bump into other nav mesh agents moving them when the helicopter is above them. The helicopter also moves around stationary objects that are obsticals but I want the helicopter to fly over the navmesh obsticals but because the nav mesh agent is still on the ground its treating the helicopter like a troop on the ground.
Summary
After messing with the navmesh base offset to allow the helicopter to move in the air with the agent on the ground, the helocopter is getting treated like it is on the ground so it moves around things it should be able to fly over. How can I make the helocopters nav mesh agent only worry about other objects it may run into while in the air only such as air obsticals or other helocopters?
Answer by RealSoftGames · Apr 08, 2017 at 06:20 AM
You can indeed use a navmesh agent set the base offset on the NavmeshAgent component above 0
Ok but wont the navmesh move according to what is below it or will it ignore what is below it because it can just fly over it?
Answer by Zymu · Apr 08, 2017 at 11:03 PM
Personally, I would ditch navmesh completely and use A* or something. This would allow you to set up "nodes" wherever you want as you please, which opens up the possibility of procedurally generated maps.
In my opinion, implementing your own pathfinding would be advantageous for lots of reasons. The top reason being the ability to alter what you'd like at runtime.
Is there a good article on how to start this in Unity or have you done it before? @Zymu
Answer by Zymu · Apr 08, 2017 at 11:21 PM
Personally, I would ditch navmesh completely and use A* or something. This would allow you to set up "nodes" wherever you want as you please, which opens up the possibility of procedurally generated maps.
In my opinion, implementing your own pathfinding would be advantageous for lots of reasons. The top reason being the ability to alter what you'd like at runtime.
Your answer
Follow this Question
Related Questions
Simple RTS movement offset 0 Answers
NavMeshAgent teleports to destination when OffmeshLink is Activated 2 Answers
"Nav Mesh Agent" messes up simple prototype player-gameobject. What's up with that? 0 Answers
Navigation Mesh + Doors 0 Answers
Way to find closest point in a specific area on navmesh. 0 Answers