Search Unity

Navmesh and flying units?

Discussion in 'Navigation' started by Arowx, Nov 20, 2015.

  1. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    I'm working on the Tank AI challenge and had the idea to add an attack helicopter and assault mech as controllable vehicles.

    So I'm using the navmesh for the tanks and it's working great. But how do I add a flight navmesh e.g. a higher navmesh that will allow the helicopter to fly over buildings but avoid towers?

    Are there any 3d 'voxel' flying navigation solutions?
     
  2. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    OK I've tried adding a static flight plane and building a navmesh for it but it doesn't seem to work?
     
  3. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Well with some limitations you could probably put a plane at the height you want the heli to fly at, pathfind over that. When it takes off manually move it to the height of the plane then pathfind from there. You could even have multiple planes at different heights and allow it to move from plane to plane, although not sure what gameplay value that would actually add.