Mercuna has been designed to be easy to use. This setup guide will help you quickly get Mercuna navigating your pawns around your UE4 levels. Watch the brief demonstration or follow the instructions below.
The Mercuna plugin requires Unreal Engine 4.19-4.23, if you’re using an older version you must upgrade your project first.
The binary evaluation version of Mercuna must be installed as an Engine plugin – unzip the archive and copy the Mercuna directory to the Plugins directory within your Unreal Engine install, e.g. UnrealEngineDir/Engine/Plugins/Mercuna.
For source versions of Mercuna, it can be used either as a Game plugin or, if you are building the engine from source, as an Engine plugin.
Once installed, the plugin will be loaded automatically when you open your game project.
2. Level Setup
In order for pawns to move, a Mercuna Navigation Octree needs to be added to your levels.
Drag a Mercuna Nav Volume actor into your level and resize the box to surround the entire level. Set the size using the brush settings. Do not scale or rotate the volume.
Drag a Mercuna Nav Seed into your level and ensure it is placed in empty space (i.e. not inside any walls or the floor).
From the Mercuna menu select Build Octree and wait for generation to complete.
3. Pawn setup
Your AI pawns need the following additional components in order to be registered with Mercuna:
MercunaObstacle component (this must be a child of the root scene component)
On any mesh or collision components, under their Collision properties, ensure that “Can Ever Affect Navigation” is unchecked (this stops the pawn being considered as a static object in the navigation octree)
4. Setup Blueprint commands
Your pawns can be ordered to move around using Blueprint commands. A simple example of using a Mercuna Move to Actor task in the Level Blueprint to send a pawn to a target point is shown below.
Now when you enter Play mode, you should see your pawn fly to and stop at the target point.
See the Mercuna UE4 User Guide for more information on how to configure the Mercuna navigation system, along with details of more advanced uses.