[4.12][AI] Dynamic Obsacle doesn't work

What I am trying to do:
Create movable obstacle. Obstacle moves thrugh level freely. AI is allowed to move through obstacle but only as a last resort.

How I am trying to achieve it:
I am trying to use “dynamic obstacle” feature. My obstacle is a Actor Blueprint which I move through level. I want this actor to dynamically update nav mesh in its proximity so nav mesh trespasing will be more costly in obstacle proximity. However this doesn’t work. Repro steps:

  1. Create blank Blueprint project

  2. Prepare You level so You will have testing environment. You will need floor with nav mesh build upon it, light to see anything and that’s all.

  3. Go Edit->Project Settings->NavigationMesh an under “Runtime” select “Runtime Navigation” to “Dynamic”

  4. Create blueprint BP_Obstacle, inherit it from “Actor” class. In this blueprint add “Sphere Collision” component and make it root component. In sphere collision component select “Dynamic Obstacle” to true, “Area class” to “NavArea_Null” and “Can Ever Affect Navigation” to true. Also go ahead and uncheck “hidden in game” so you will see where this blueprint is on the level.

  5. Place BP_Obstacle somewhere on the floor. Save all and run game. Open console and type Show Navigation. When navigation is shown you will notice that nav mesh gets properly cut where BP_Obstacle is on the level. Everything works as expected.

  6. Now create new blueprint and inherit it from “NavArea”. Name it “NavAreaTest”.

  7. Go to BP_Obstacle and change “Area class” to “NavAreaTest”. Save all and run game.

  8. As You see navmesh doesn’t change around BP_Obstacle. Proper bahaviour would be for it to change color to magenta wich would mean that area around BP_Obstacle is our “navAreaTest”. Error

Cheers,
Dawid

Hello Buyaka,

I’ve run through your repro steps and experienced the same issue. However, the issue resolves itself upon restarting the editor and moving the object to ensure it is in contact with the Nav Mesh.

Below is an image of what I’m seeing after my restart of the editor (I’m using Yellow for my Nav Area color).

Let me know if you’re still experiencing this issue after a restart. Here is the bug that this issue is related to: Unreal Engine Issues and Bug Tracker (UE-30174)

Have a great day

Hello Sean,

In my case the problem was different. It turns out that nav mesh calculation doesn’t take into consideration objects that are certain threshold above it. My sphere was quite big and overlapped nav mesh. However system still ignored it since its position was too high relative to nav mesh.

thanks for help,
Dawid

Just to clarify, were you able to resolve the issue or do you still need additional assistance?

Problem is resolved, moving my obstacle closer to the ground fixed the issue. Thanks