Navmesh3D Plugin

Navmesh3D is a plugin in development that was created for my flight racing game, Drifters. I needed a way to generate paths for AI flying ships to traverse a race track, as well as things like missiles. I needed the pathfinding to be fast and have a low memory and disk footprint. I also wanted the process of building the navmesh to be relatively quick for large maps (8km x 8km) and allow me to specify exactly which parts of the map should be traversable.

I settled on using A* as the primary pathfinding algorithm. The navmesh is built using a series of box traces, the size of which is determined by configuration. The result of that trace is packed as a bit into a byte (so, 8 trace results per byte).

The bounds of the navmesh are determined using proxy actors with box components. I also developed a series of editor utilities to make visualization and debugging of the navmesh easier for myself and anyone who uses the plugin.

The plugin does not provide the bells and whistles of other plugins - like a movement component or integration with Unreal Engine’s movement tasks - instead providing the essentials for finding paths in 3D environments, with a small library of functions that I found personally useful for development, debugging, and integrating into an actual game.

Additional Details

  • Paths can be generated from C++ or blueprint, asynchronously or synchronously

  • From the Navmesh3D actor, you can see an estimate for the total navmesh size on disk

  • Helper function library that allows you to access the data inside the navmesh to do your own custom logic

  • A low cost cell tracing library (referred to as Bresenham trace)

  • A CVar is included to see more detailed debug (DebugNavmesh3D)

  • Comes with its own logging cateogry (LogNavmesh3D)

Visual representation of the wind tunnel's scan, to determine a ship's aerodynamics for drag calculations.
Tuning window
Large thruster part info panel
Simulator window
Specifications panel

Debug lines drawn to show trace lines that detect parts, which is used for drag calculation.

Ground effect debug, showing traces done to detect closeness to surface, negating drag.

Client debug lines for netcode client prediction. Yellow is before rollback. Red is after rollback. Green is the final result after replaying inputs.

The leaderboard shows a record of all races you’ve played in, sorted by your result.

Controls can be mapped through settings menu.

All races are shown in the replay menu, where they can be watched, played against, or deleted.

An example of the build menu widgets when creating ships.

Tuning Window allows the player to tune each part that can be tuned, such as changing how much fuel is in the tank, setting thrust levels, setting lift generation of wings, etc.

Specifications window shows important statistical information about the ship, including its max velocity, acceleration, thrust, lift, drag, mass, etc. Most specs can be expanded to show even more detailed information about the specifications in each direction

Simulator allows you to simulate how the ship will perform given certain inputs, such as thrust levels, if using boost, fuel and boost fuel levels, and flap angle.

Part Panel can be see by hovering over a part in the part selection panel , displaying its statistics.

Small fuel tank part info panel
Small reaction wheel part info panel