Enemies waiting without going to waypoints


I did everything I owed from video 14 to 16 but I can’t get the enemy to move. He waits to kill me and do nothing more. Can anybody help me?

Thank you

hi! do you have navArea component and do you generate rebuild navmesh ? do you see valid “blue mesh” for navmesh ? (editor -> game->AI->Show nav areas & view agent type -> choice some type )
also try copy those files in to your project dir:

  1. dev\StarterGame\Scripts\AI\Navigation.xml in to your project folder dev\YouProject\Scripts\AI\Navigation.xml
    2.dev\StarterGame\libs\MaterialEffects\surfacetypes.xml in to your project dev\YouProject\libs\MaterialEffects\surfacetypes.xml

Hi, I did everything you told me (copy files on my project and reboot), I had already done the thing about Show nav areas & view agent type, but I don’t see “blue mesh” in navmesh. The only thing I am not sure about is what you say about “generate rebuild navmesh”, can you clarify it?

Hey!!! I got it, what was missing was Game / AI / Continuous Update to see the blue mesh.

Thank You very much.I’m really very grateful to you.

hey, now if you are see that navmesh avoid static obstacles then navmesh is fine builded. And if your bots still do not moves check component of enemies entities. On every enemy should been an navigation component with checked or not “physical movement”, also check your code or sc, it should send requests from entity’s navigation component to nav system.

The enemies are doing well now :slight_smile: . The new thing is that I have problems with the speed of my character’s movement. I can not control it. I don’t know if it will be due to lack of memory or if there is somewhere to regulate it.

you can control speed of navigation agents by using 4 ways:

  1. with code using C++
#include <LmbrCentral\Ai\NavigationAreaBus.h>
#include <LmbrCentral\Ai\NavigationSystemBus.h>

using namespace LmbrCentral;
// set speed for nav agent
NavigationComponentRequestBus::Event(GetEntityId(), &NavigationComponentRequestBus::Events::SetAgentSpeed, 4.0f);
// stop nav agent
NavigationComponentRequestBus::Event(GetEntityId(), &NavigationComponentRequestBus::Events::Stop, curruntRequestId);

  1. with helps lua
    I personally don’t like lua so do not know how code looks like

  2. component on entity

  3. ScriptCavas Node in your graph logic