UE4 Pathfinding...basic AI

We are working on proper documentation; Work-in-progress on that documentation is here: Behavior Tree Documentation. I plan to keep updating it while we’re getting ready to “release” Behavior Trees from the “Experimental” section.

As soon as it’s in more complete form, we’ll move it to the official documentation page.

We’ve also got some samples in progress (Mieszko Z. just made a very cool sample level with a purely blueprint (no code) behavior tree example). I’m hoping to combine samples and some intro documentation to be able to make some videos starting with a video of all the basics for new users.

hi, i need to check if the player is in direct sight of my ai, also do a distance check to let my ai attack the player’s pawn, i know that this can be done with behavior trees, but i have tried many searches and i didn’t found anything on it, any help on this ?

How can i set a bool key in my BT? I also tried to add a condition loop decorator on bool key, but even when not set the loop runs.

I found a solution here Futuristic Soldier – Behavior Tree | Shooter Tutorial Basically you need to add a decorator script, overriding a perform condition check script. The decorator can then be added in front of the Move To BS.

See this image and

Hi Guys,

Awesome work with the BT documentations.

But, what about the nav system? I am currently using the MoveToLocation function to move my agent over the navmesh. However, this only takes into account distances. It does not make sense in a FPS game. If I want to move an agent from A to B, I want the safer path not the shortest one. How can I do this? Should I implement a completely new pathfinding algorithm? (that is a bit insane) Or there is a way to specify a cost for each node of the navmesh?

I am very lost here and I am not able to find any documentation of how to do it.



Quick innocent question…
What kind of FPS you’d expect from 100 super-basic AIs using the Navmesh?

For a quick test I used some basic AI I found online, it turned out to be less than basic…

So basically. Let’s say… 100 basic AIs [no animation] that don’t use raycasting or anything expensive and just pathfind towards random positions on the Navmesh. Or follow the player’s position. Should I see any performance hit?

What about 1000? : ]