3D Nav Mesh?

I’m working on a 6 Degrees of Freedom FPS game (think Descent), in which you pilot a small spacecraft. The levels will be the interiors of large capital ships, so you’ll be able to fly in any direction, and hallways can be vertical as well as horizontal.

I have the ship flying reasonably well, but I’m thinking ahead to when I’ll need to add AI Enemy drones. Is it possible to make a 3D navmesh? I’ve been looking at the documentation, and I’ve only seen planar navmeshes that define the area of the floor that AI characters can walk on. Is it possible to instead define a volume in which drones can fly?

To my knowledge you’re out of luck. This is a feature that I think would be of great benefit to a vast range of games, that along with being to able to change the plane on which the navmesh works would be great. This way you could use the navmesh for 2d flying things in a sidescroller for instance, without having to build your entire world on the ‘wrong’ plane just to make the navmesh work.

Maybe instead I could use physics volumes that don’t do anything, then have AI pawns try to stay inside those volumes. The only trouble might be transitioning from one volume to another. Can you “weld” multiple physics volumes together, so that they’re treated as one whole rather than a bunch of separate volumes?

I have little experience with those actually so doubt I’ll be able to help you out much. Wouldn’t you still need some sort of at least rudimentary pathfinding?

If a very simple solution will work in your case you can consider doing a bunch of raycasts to find obstacles and alter a pawn’s course depending on the ray results.

Still - I’d looooove for more options in Unreal’s pathfinding solution. 3d volume and the ability to change 2d planes please. :slight_smile:

Yeah that’d work quite well for something I hope to do after my current project I think (waypoints sound preferred)! How would you recommend travelling between the different waypoints? If they are placed in straight lines raycasting to check for new obstacles could work I guess…

Also, if you have any suggestions for how to figure out the shortest path if a pawn reaches a branching point from which 4 different waypoints branch out? One might consider doing raycasts along all the 4 different waypoints, capturing distance and of course if they hit an obstacle along the way… but if you have a game where obstacles can appear and block out paths it could be a lot of raycasts. You’d have to do this not just when waypoints branch out or when a pawn has reached a waypoint if you want to support the AI reacting to game events that can alter the pawn’s path of action.

Anyway, I’m going on a bit here but I have given it some thought before and would love to hear thoughts on basic pathfinding that can’t be done with a navmesh as it stands. Maybe raycasting like I mentioned above wouldn’t be a big problem for anything but mobile as well.