September 1, 2014, 10:59pm
In our game, the player builds roads (these are square tile pieces). I am looking for a way to make the ai prefer to walk on roads if possible.
The only method I’ve seen so far is to use a NavMeshModifier volume, but I haven’t been successful in spawning one at runtime.
Is there a suggested method of handling realtime navigation cost changes? (Either in c++ or blueprint)
Thanks in advance
September 1, 2014, 11:11pm
Rama is making great dynamic AI system
Dear Community, I am designing a custom AI with my own custom pathing system, as requested by a client! Here’s a video of my progress with my very own pathing system! First videohttps://youtube.com/watch?v=mMKQvAf9KSQ What you see in video is...
, pm him
September 2, 2014, 1:55am
Thanks Tim, that looks like a really great system but unfortunately Rama re-invented his own system entirely, I simply need to modify the navigation cost (I imagine this should be possible with the existing navmesh system).
September 2, 2014, 12:49pm
Well, you can ask him what’s the best wy to implement it in your case.
September 3, 2014, 4:34am
Make a BP of NavArea_Default
Set the custom cost value as seen in picture!
Make a c++ class that extends the nav modifier volume
mobility to moveable in the constructor!
You should now be able to spawn it at runtime, position and resize it!
class ANavModifierVolume : public AVolume, public INavRelevantActorInterface
extend the above
in the C++ constructor
September 3, 2014, 2:52pm
Thanks Rama, this looks like what I’m after.
I’m having a problem extending from ANavModifierVolume though, I’m getting many linker errors (here’s a sample):
error LNK2001: unresolved external symbol "public: virtual bool __cdecl ABrush::IsLevelBoundsRelevant(void)const " (?IsLevelBoundsRelevant@ABrush@@UEBA_NXZ) ...MobileNavModifierVolume.cpp.obj
error LNK2001: unresolved external symbol "public: virtual void __cdecl ABrush::CheckForErrors(void)" (?CheckForErrors@ABrush@@UEAAXXZ) ...MobileNavModifierVolume.cpp.obj
I’m running off of the launcher version 4.4.1 at the moment. Do you know of any steps to remedy this?
I am having the same problem. I’ve already spent a week trying t modify costs on runtime…How did you solve it?
For my purposes, the NavModifierComponent is what I am using
I tried to override cost functions in the nav mesh but I found that so *** difficult…Are you spawning NavModifiers on runtime and changing its costs?
Do you know if a lot of nav modifiers can bring performance issues?
Finally I would be very happi if you can you show me a sample code instanciating your own Nav Modifier.
January 6, 2016, 10:15pm
I’m placing movable actors with NavModifierComponents attached to them. The components take a NavArea class that defines the custom costs