#gameplay-ai

1 messages Β· Page 65 of 1

vivid fern
#

i wasnt looking for a solution tho

tawdry zephyr
#

Yeah, great, you can continue not knowing anything and sharing that with people. Cool

vivid fern
#

you're projecting a ton of things onto me that arent what im saying at all πŸ™ƒ

tawdry zephyr
#

You're saying you got upset because someone pinged you when continuing a completely relevant conversation

harsh storm
#

I think you're reading this the wrong way Vaei and that is affecting how you're currently responding.

tawdry zephyr
#

What is the right way to read it?

#

Because I actually don't understand this person

#

To me it reads that they're being upset over nothing and extremely rude in the process

#

I was trying to be helpful

vivid fern
#

im not upset about anything i just was saying you probably meant this forReddification

tawdry zephyr
#

They didn't have a good answer and admitted it, why would someone not want to know for future use?

#

To the point where they actually call it out

harsh storm
#

Someone does. But all she said was that she didn't understand the ping. Which is fine.

tawdry zephyr
#

I mean, I pinged them both

harsh storm
#

You're just projecting some kind of emotional thing on it when there isn't.

#

That's all

#

Yeah, I saw that.

tawdry zephyr
#

If I were in their shoes I would not respond if I wasn't interested

harsh storm
#

Sure. And that is your prerogative. They chose to respond.

tawdry zephyr
#

Right, but their response was extremely weird at best

harsh storm
#

Just chop it up as miscommunication. That's all really.

tawdry zephyr
#

Why would I know that this random person on the internet has no interest

#

That is not a sane thing to assume on a server like this

vivid fern
#

i mean you pinged me i assumed you wanted an answer, as most ppl that ping do. Its fine tho. I was just trying to say i dont need this and that it was probably Reddification that needed it, or a place to start looking for his own solutions

tawdry zephyr
#

I didn't ping you, I replied
Which happens to ping you if you don't turn it off
Which I'd only do if I knew you wouldn't be interested, and I'm not psychic
I pinged Reddification

#

Its such a non-issue that I don't understand getting weird about it and making it an issue

harsh storm
#

To be fair - you can also turn off pings on reply. The person who is doing a reply that is.

#

It wasn't an issue really. It turned into an issue

#

When she made her comment, you also could've just said "okay"

vivid fern
#

yeah the reply sender has the option not to send a ping

tawdry zephyr
#

Before either of you said it

vivid fern
#

the intent with my answer was to feel out what fit the game's design. Maybe pushing other ai out of the way isnt ideal for the game, maybe it is?maybe what they need are formations, there's a ton of ways this problem can be solved, but it needs context of the problem to really get a thorough answer out of it

zealous schooner
#

Hey, anyone willing to help out with a basic behavior tree question?

harsh storm
#

Better to ask the question

#

Instead of asking to ask

zealous schooner
#

I cant figure out why at times after it gets to "Switching state to Passive" sequence it starts to rapidly go between the first and second tasks in the sequence (Clear_Focus_BTT and SetMovementSpeed_BTT), but never touching the third/last option (Sequence)

vivid fern
#

what does the rest of the right most branches look like?

zealous schooner
vivid fern
#

my guess would be that your decorator or move along patrol fails and it fails the sequence

#

are you trying to move between points that have proper navmesh below them?

zealous schooner
#

I think so

vivid fern
#

might need to step through the execution here.. and see what the values of the keys of your tree are at each step.. visual logger can maybe also shed light on whats happening

zealous schooner
#

You mean the values of my blackboard keys?

vivid fern
#

nod just make sure that everything is what you are expecting it to be for those decorators

#

then you will probably have to look at your tasks to make sure something isnt failing out improperly or like, not able to generate paths to move along

zealous schooner
#

i switched only the position of the 1st and 2nd task (under the "switch state from passive" sequencer) and it seemed to not even move from root anymore (the arrow coming from top right is root)

vivid fern
#

have you tried stepping through the tree? using break points?

#

you can see the values of your blackboard that way too

zealous schooner
#

Have not, how do i set breakpoints?

earnest musk
#

Hi, is there a way to Initialize StateTree asset from pawn like this?

AIController->GetBlackboardComponent()->InitializeBlackboard(*BehaviorTree->BlackboardAsset);
AIController->RunBehaviorTree(BehaviorTree);

Trying to avoid creating multiple AI controllers per enemy type πŸ˜…

vivid fern
vivid fern
#

np!

keen crow
#

thanks, i'll check it out

nova trout
#

Can anyone help me out with making AI accurate to Half-Life 2's Combine Soldiers and/or Metro Cops? I tried something but I didnt get very far..

slow bobcat
#

This library looks very interesting. You mention it's production tested etc. Any chance you can share names of games that use it? If not here, maybe in a PM?
We use our own solution but we're always looking for better options (if any)

tawdry zephyr
slow bobcat
earnest musk
earnest musk
novel hare
#

the ai keeps atacking whit this how do i stop it

keen crow
#

I'm observing some weird stuff in vislog. Can it be, that the same controller is shared among multiple pawns in the same play session as if controlers were pooled? for example, in 4 consecutive ticks vislog shows that the same controler controls different pawns... wtf is going on? can it be somehow related to world partition? because I think it's the only thing that currently distinguishes my other test levels from the test level this problem appears in

keen crow
#

Also i forgot to mention that I have about 30 npcs on level, but vislog only shows 5 AI controllers

#

Ok it does seem to be related to world partition, because when I disable it in world settings, vislog shows the correct amount of AI controllers, but what do I do with it? I never thought that AI controller can be shared between pawns when programmed the logic... πŸ€”

novel hare
#

how do i change the animation of the ai

slow bobcat
# earnest musk Could not find the place where I can configure asset in runtime.

I don't think you can. You can extend the component, have an array with you trees + an array with their Instanced data (or a map with both), have a function call in tick component to tick that array of trees. You will need to Initialize (start) those trees. You will need to override start, stop, restart etc so they loop your map. In each of those functions you will need to create an execution context object using the tree in question and the Instanced data

#

This will give you the ability of adding/removing trees for said map at runtime

#

But you will face other problems, like the debugger not working properly (adding a track every time call FinishTask on a tree in the map), you will have to build logic for events, so you send them to the main tree or to a Mao-contained tree etc

#

I have logic that is data driven so, depending on the enemy, we use a main tree (the one the component will handle automatically) + different trees we add to that map based on the enemy capabilities

slow bobcat
slow bobcat
#

Both questions mean nothing to me (and I'm guessing most of us)

#

First one shows a random BP that sets a bool in a timer. So.... What's that doing?

#

The second gets a different answer: where? How? When? Tutorials maybe?

slow bobcat
#

It's better to do precise questions with data rather than "how do I develop ai"

novel hare
#

i got and AI

#

i got the character that i want to use

#

and the animations for it

#

but idk how to change the one that i have for the new one

slow bobcat
#

Ok... Do you know what the animation blueprint is?

novel hare
#

yhe but dw now

#

i alr close the unreal

slow bobcat
#

What? Dw? I alr close? Sorry dude, but I don't understand what do you mean

#

"yes but don't know, I already closed Unreal"?

dense owl
#

He’s saying he’ll work on it later

slow bobcat
#

Aaaah dw... Don't worry...
Silly me.... Sorry, English is my second language

vivid fern
#

english isnt my second language and i cant really read it either so i wouldnt be too hard on yourself heh

#

hard to tell what was typo and what was intended words

tawdry zephyr
#

Just looks like someone who has very little typing proficiency/speed
Rather than a language issue. But if you're not used to it it'll be hard to interpret

dense owl
#

But yeah, I’m used to some of these abbreviations

dawn schooner
#

I have encountered some weird behaviour with the StateTree component, something seems off: I am ticking it manually, and it is ticking automatically as well (even if the component tick has been disabled).
I checked by removing my manual tick call, and it's still getting called from the TickTaskManager. Even the actor that has it attached has tick permanently disabled

vivid fern
#

oh its definitely internet slang, not typos or proficiency imo

vivid fern
dawn schooner
vivid fern
#

x_x

lunar dragon
#

Hello everyone!
AI controller makes the shipping project freeze without crashing or any error. From what I have noticed, if I disable auto possess, this does not happen anymore. I use Unreal 5.4.4 with World Partition and the animals (AI) have is spatially loaded activated (if I disable the map it doesn't load anymore because I have a lot of animals)
I manually placed the animals on the map and do not use a spawn system

slow bobcat
slow bobcat
#

Are you using any c++ at all in your project?

#

Form Visual Studio or Rider I mean

#

If you do, simply run the project with Shipping Game config

#

If you don't use c++ at all, it's gonna be more tricky. In that scenario, I would first run a development build or a test build to see if the same happens. Those two configurations produce logs and might give you some clues on what's going on

#

If the logs do not show up anything useful, you will need yo download the debugging symbols from the Epic Launcher, visual studio community, boot up your build and attach VS to it.

lunar dragon
#

Downloading deb symbol now

lunar dragon
#

Absolutely nothing

slow bobcat
#

If you are already using a c++ project I don't think you need the symbols? Not sure, I have always used the github repo, compiled the editor myself etc. Never used the market place vanilla editor

lunar dragon
#

Here is the part where the game is freezing, the rest is from the forced closing from the task manager

slow bobcat
# lunar dragon Here is the part where the game is freezing, the rest is from the forced closing...

The pso's can take a long time to load (it's a famous hitching case in released unreal games) but that should be far from freezing the game.
Before force close, hit Pause in Visual Studio while the game is frozen. It should pause at whatever is doing. You can check the callstack for the main thread. If that doesn't show anything, check if there's any task job or thread doing anything. Might be something stuck in a thread and the main thread waiting for it

lunar dragon
lunar dragon
#

Until now, this setting is disabled for all characters, including the main character

placid silo
#

does anyone know how to use a subtree in different BTs? When I make a subtree, it asks for the BB of one enemy but if I want to reuse it for another enemy, it will say BB is incompatible even though the same keys can be found in the other enemy's BB as well (plus some extra ones)

slow bobcat
#

But in that picture you are not attached to the running game

#

Does the bug only happen in shipping or can you repro it with a dev or test build too?
What I meant was:

  • start a development or test build
  • repro the bug where the game freezes
  • if no ensure or check happens in VS while being attached, hit Pause in VS
placid silo
misty wharf
placid silo
misty wharf
#

as far as I know yes

slow bobcat
#

You can use inheritance in bb's if that helps you

placid silo
slow bobcat
#

Yeah

placid silo
#

So I would have 1 Base BB as a parent for all the enemies and they will have their own BBs inheriting from that, so sharing subtrees will work?

slow bobcat
#

You can have a big tree, a general one, where you run subtrees (dynamic or static). The subtrees can use a child of the general tree BB. I think that should be a valid case

slow bobcat
placid silo
#

what is the difference between a dynamic and static subtree?

slow bobcat
#

RunTree vs RunDynamicBehavior

placid silo
#

sorry, could look this up myself instead of asking you...

slow bobcat
#

In one you state which tree asset to run (static), in the other you assign a g.tag to the node, which you use to dynamically run a sub bt assigned at runtime

#

Imagine you have a data asset per ai that states which bt assets use for combat, idle, patrol etc
In your main tree, where you decide which of those states the AI will run, rather that having a specific bt asset set in the Run BT Combat Task (run subtree), you have a tag. That tag corresponds to the key for the combat tree in your data asset.

#

That way MeleeAI has a different bt for combat than SniperAI

#

But they both use the general tree to decide what to do

#

When the task combat runs, you use that g. Tag to grab from the data asset the right bt to run as sub tree, (melee combat bt, sniper combat bt)

placid silo
#

Hmmm, interesing. So dynamic is used for when you have one main tree for all enemies. that is "overriding" the subtrees based on the tag.

slow bobcat
#

Yeah, something like that. It allows you to be able to make your bt's data driven, which eases the way to reusability of bt's

placid silo
#

do you recommend the approach of having one BT for all enemies or having separate ones for each enemy?
I guess it depends on whether enemies have a similar general behavior, right?

slow bobcat
#

Yeah... Pretty much. Imagine you make a souls game or a game like The Division. Having separated trees for each type of enemy might be too much unnecessarily. Chances are that your melee enemies do more or less the same (mind bosses) things with small variations to make then different. The will be in idle or patrolling until they engage combat, then do whatever they do, which for melee might be "approach target and do X attack", while other melee does "approach running and then attack". Just to vary thet "running" part, it's silly yo have 2 different bt assets

#

Dumb example, but not too far from reality

#

In one game I was part of, all enemies used the same combat tree. Their specialities would come from which tree we run in the leaf selected. If they had a pistol, range approach (look for a nearby cover, go there, then shoot). If they had a baton, run to the player and hit it.

placid silo
#

I see. Makes sense. Will give that a go, thank you so much!

lunar dragon
lunar dragon
#

I can't reproduce it in another package (deb, development) or in the editor

slow bobcat
#

Then try to attach to shipping. Better than nothing I guess

placid silo
slow bobcat
lunar dragon
slow bobcat
#

But attach has nothing to do with the log. Attach will cause a breakpoint if a check or an ensure happens (I believe disabled in shipping). But what you can do is acutualky pause the build execution form VS and see where does it stop. Chances are that it will be the code running in loop that makes your build to stale and crash

#

And when your run the build in development, do you get warnings that might explain anything? Or ensures?

#

I would imagine that you have something that is prevented in builds that are not shipping followed by a log or something

#

It's rare one gets a crash like that in Shipping without warnings in a dev build

lunar dragon
#

It also works perfectly in the editor and development

#

I use world partiton and have the animals set to is spatially loaded, I think something is happening here

slow bobcat
#

I don't believe you don't get warnings at all while running the development build. Nobody is that good XD

lunar dragon
#

I immediately package it for development and send you the log

slow bobcat
#

PITA but...

slow bobcat
#

You want to look at the logs generated in the Save folder of the build when you run it. Same thing that shows in the outputlog window when you PIE

lunar dragon
slow bobcat
#

In your case I would look for info in the logs about the animals initialization process, the world partition etc

lunar dragon
slow bobcat
#

Something is off and surely some warning is letting you know withiut you knowing

lunar dragon
#

I will check, thank you very much for your help and for your time

slow bobcat
#

You could also try disabling all the AI's logic and see if they spawn at least. If they are there brainless, you know it's something in the AI logic. If still happens, something with the way they spawn

slow bobcat
lunar dragon
slow bobcat
#

Let us know if you figure out this one. Good luck

lunar dragon
slow bobcat
lunar dragon
slow bobcat
#

At least for now put the AI's in their own data layer and pack the game without it. To double check your game doesn't work due to ai spawning. Imagine you start the build without any ai and still get that problem

lunar dragon
#

[2024.09.29-18.27.11:128][619]LogScript: Warning: Script Msg: Attempted to access index 0 from array 'Eyes_17_F352401649EBA276B93B75812EE4A429' of length 0 in '/Game/AnimX/_Common/Realistic/Structures/S_Styles_R.S_Styles_R'!
[2024.09.29-18.27.11:128][619]LogScript: Warning: Script call stack:
/Game/AnimX/_Common/Realistic/CompBP_Material_R_ANX.CompBP_Material_R_ANX_C.Set Materials <---
/Game/AnimX/_Common/Realistic/CompBP_Material_R_ANX.CompBP_Material_R_ANX_C.ExecuteUbergraph_CompBP_Material_R_ANX
/Game/AnimX/_Common/Realistic/CompBP_Material_R_ANX.CompBP_Material_R_ANX_C.ReceiveBeginPlay

#

[2024.09.29-18.27.11:128][619]LogScript: Warning: Script Msg: Attempted to access index 0 from array 'Size_21_469B8FF145D5C01BFA9F1CB2F6AD23AF' of length 0 in '/Game/AnimX/_Common/Realistic/Structures/S_Styles_R.S_Styles_R'!
[2024.09.29-18.27.11:128][619]LogScript: Warning: Script call stack:
/Game/AnimX/_Common/Realistic/CompBP_Material_R_ANX.CompBP_Material_R_ANX_C.Set Materials <---
/Game/AnimX/_Common/Realistic/CompBP_Material_R_ANX.CompBP_Material_R_ANX_C.ExecuteUbergraph_CompBP_Material_R_ANX
/Game/AnimX/_Common/Realistic/CompBP_Material_R_ANX.CompBP_Material_R_ANX_C.ReceiveBeginPlay

#

[2024.09.29-18.27.11:128][619]LogScript: Warning: Script Msg: Attempted to access index 0 from array 'SpeedMultiplier_40_1FA5DCA043F576EAF8A30FB0A6B993DA' of length 0 in '/Game/AnimX/_Common/Realistic/Structures/S_Styles_R.S_Styles_R'!
[2024.09.29-18.27.11:128][619]LogScript: Warning: Script call stack:
/Game/AnimX/_Common/Realistic/CompBP_Material_R_ANX.CompBP_Material_R_ANX_C.Set Materials <---
/Game/AnimX/_Common/Realistic/CompBP_Material_R_ANX.CompBP_Material_R_ANX_C.ExecuteUbergraph_CompBP_Material_R_ANX
/Game/AnimX/_Common/Realistic/CompBP_Material_R_ANX.CompBP_Material_R_ANX_C.ReceiveBeginPlay

#

[2024.09.29-18.27.12:591][620]LogScript: Warning: Runaway loop detected (over 5,000,000 iterations) - see log for stack trace
AIControllerBP_ANX_C /Game/Map/Map_Forest2/Generated/6E80ZK5UYOGS29LW4I66RA1RR.Map_Forest2:PersistentLevel.AIControllerBP_ANX_C_2147475358
Function /Game/AnimX/_Common/BP/AI/AIControllerBP_ANX.AIControllerBP_ANX_C:ExecuteUbergraph_AIControllerBP_ANX:05CD
Script call stack:
Function /Game/AnimX/_Common/BP/AI/AIControllerBP_ANX.AIControllerBP_ANX_C:ReceiveTick
Function /Game/AnimX/_Common/BP/AI/AIControllerBP_ANX.AIControllerBP_ANX_C:ExecuteUbergraph_AIControllerBP_ANX

[2024.09.29-18.27.12:591][620]LogScript: Warning: Script call stack:
Function /Game/AnimX/_Common/BP/AI/AIControllerBP_ANX.AIControllerBP_ANX_C:ReceiveTick
Function /Game/AnimX/_Common/BP/AI/AIControllerBP_ANX.AIControllerBP_ANX_C:ExecuteUbergraph_AIControllerBP_ANX

slow bobcat
#

Runner loop, more than 5k iterations.
Game will crash after the limit is passed out of security

lunar dragon
#

Now I was looking at that error πŸ˜‚

lunar dragon
slow bobcat
#

620]LogScript: Warning: Runaway loop detected (over 5,000,000 iterations) - see log for stack trace
AIControllerBP_ANX_C /Game/Map/Map_Forest2/Generated/6E80ZK5UYOGS29LW4I66RA1RR.Map_Forest2:PersistentLevel.AIControllerBP_ANX_C_2147475358
Function /Game/AnimX/_Common/BP/AI/AIControllerBP_ANX.AIControllerBP_ANX_C:ExecuteUbergraph_AIControllerBP_ANX:05CD

#

Without looking at your code no idea. Looks like soemthing you have un the AI controller BP.

#

Ah not 5k, but 5 millions

#

Do you have any form of do-while loop?

#

Maybe a recurrent call to soemthing?

lunar dragon
slow bobcat
#

Yeah that looks like an infinite loop. If the condition never changes, trapped forever

lunar dragon
#

Honestly the animals (AI) are taken from the marketplace so I don't know their systems very well

slow bobcat
#

That loop checkign for the AI state looks uber dangerous

#

If that state never changes....

#

I would add a counter in that loop and if it happens more than 1500 times, the skip it or something and tint the AI so you see some red dude looking ugly in your game

#

I would track where does the AI state change in that logic. Maybe in shipping is not happening

lunar dragon
#

So where to change AI state seems to be the problem

#

I'll try to leave them on default, maybe that won't happen anymore, then I'll check as you say

lunar dragon
slow bobcat
#

Glad you found it and happy to help

dawn schooner
#

Hi! One question, has anybody tested performance differences between using State trees as an actor component, and State trees integrated with Mass?
We have Mass entities that are synced with Actors, and our current setup has State trees as actor components (was easier to setup). Performance is acceptable if we lower the tick rate, but I was wondering if the component has some overhead and we could maybe get any benefits by using the other approach (such as multithreading possibilities for tick etc)

wise sluice
#

Macros are either in StateTreeTrace.h (so StateTreeModule) or StateTreeExecutionContext.cpp (these one just wrap the ones from StateTreeTrace.h

In both case, they are surrounded with #if WITH_STATETREE_DEBUGGER

I will try to make it work and notice you

wise sluice
vivid fern
#

^^^^ it pretty much has no regulartick.. i was running several thousand state trees using synced actors AND path findingat 60+ fps even

#

which is probably more non mass driven state trees could

wise sluice
#

@slow bobcat
In order to compile i had to add extra STATETREEMODULE_API in StateTreeTrace.h (i'm in 5.3 maybe it changed)

#

I successfully added my own log in StateTree debugger, now i need to understand the scope

slow bobcat
#

how does it look like in the Debugger itself?

dawn schooner
wise sluice
#

MassStateTree only need to change its current state when the processor finished their work for one specific entity

dawn schooner
wise sluice
#

With Mass you have aggregated ticks + multi threading and you avoid cache miss since the data is contiguous (aggregated by MassFragments/MassArchetype)

dawn schooner
#

the multithreading would be awesome, dunno if the component supports that

#

thanks a lot for the input, I'll look into it

#

is there any docs or references on how to implement it?

wise sluice
#

Don't hesitate to check the pin in #mass

dawn schooner
#

I only could found about component setup

dawn schooner
wise sluice
#

I'll do a screenshot for how does it look

#

here it's in the transition scope
So you see the log are outside of any state/task

dim lynx
#

Hello, why does NavLink Reached run on all actors?
when the NavLink references are different

#

2 actor, different NavLinks

#

but if AI enters 1 of them, the signal goes to all of them :/

#

(from reference)

#

is this some kind of BUG?

#

I had to restart the Editor

#

weird

slow bobcat
earnest musk
#

Maybe a dumb question but I am following 60 min tutorial for StateTrees and this basic setup is not working properly:
MoveTo task constantly fails, then sometimes characters start to move, then stuck again.
I was able to make it work by removing Success condition and adding Delay ask in Idle, but it feels like a hack.

still crypt
#

Anyone know of a way to get a thread pulled path length? The methods the nav system exposes seem to skip it for perf reasons, but that means they sometimes give a value that's longer than expected/accurate

slow bobcat
# earnest musk Maybe a dumb question but I am following 60 min tutorial for StateTrees and this...

Find random location and move will run at the same time but that doesn't guarantee the random location will be ready when the move to calls. The first one calling FinishTask, will invoke the transitions.
I know... Mental.
Ideally you will leave the random location task as Running, then keep running hte move to until you have a random location to go to. Then start the actual move to and only finish it when you finish the movement.
That transition you have to success will trigger if you are returning anything but Running from any of the 2 tasks.

slow bobcat
#

I recall soemthing in those lines

earnest musk
#

So no Finish task is being called, unless docs are outdated or missing something that has changed in 5.4 πŸ™‚

slow bobcat
#

Ok, then that part is figured out, but you still have the other part. That logic above runs at the same time as the move to task. And the order is not guaranteed. You need to create something that will keep the move to task waiting for the random location to be set before the call to the movement logic

#

My guess is that you are falling into a case where moveto tried to move before the random location variable is set

#

I might be wrong though. It's important to know why the move to is actually failing, I'm just guessing

earnest musk
#

Thanks, will try to look into that. Strange that it was shown as an official example πŸ™‚

#

I can only see that it is marked as failed in debugger and is spamming state reevaluation

slow bobcat
#

That example has some flaws, like the part where they suggest that you can disable a state so it doesn't evaluate unless you call an event to enter it. If a state is disabled, it doesn't work no matter what you do.

slow bobcat
#

Either the move to logic is failing or you have some logic to fail the state before getting into moving

earnest musk
#

Strange thing is that if I remove conditions on transition like failed or success and let next state with delay to start - it will magicallt work as intended

slow bobcat
#

Ummm so....

  • get random
  • move
  • delay (wait)

The you see movement, no matter if failure or success?

#

That would indicate that the movement is indeed always triggered and the state fails (or succedes) due to other reasons

earnest musk
#

yep

#

and I have same setup in BTs - all works as expected

slow bobcat
#

Then I think that you are triggering the finish task call without waiting for the actual movement.

  • look for location
  • move (you don't wait for the Movement to finish, you straight return success/failure)
  • back to root, repeat
  • override the move to order with a new one, effectively canceling the previous one, started the previous frame
#

Maybe you can show us the code of the move to task you use in that tree?

earnest musk
#

it is default one - comes with state tree

#

I think I found the reason

#

hm nope

#

seem only one case when RandomLocation was always called after Move

slow bobcat
#

You can make move to a sub state of random location with a condition where Moveto will only enter once the random location is set

slow bobcat
#

You will need yo figure out why the move to task returns a failure

#

The exit order makes sense

  • random, then move
    OK exit, evaluate towards the root.... Moveto, random
#

Then idle (next state)

#

Doesn't say why it failed when you expand MoveTo?

#

Seems you can still show info

earnest musk
#

Nope, only input parameters :/

#

Works in this setup

#

Maybe some race condition with assigning random location

slow bobcat
#

Definitely

earnest musk
slow bobcat
#

State trees are not production ready because of the this obscure shit happens all the time

earnest musk
#

first one fails always

#

and it looks like coords are not default

slow bobcat
#

Is that location valid? Within the nav mesh etc?

#

Is it reachable?

#

You are allowing partial paths but no idea if the move to task considers a partial path success or not (in case that location is within nav but not reachable from where the AI is)

earnest musk
#

it seems first location that comes is above floor

#

and all next ones are correct

#

as soon as actor moves for the first time + smooth sailing

slow bobcat
#

Ah... Maybe you are not projecting the point on the nav etc

#

And you don't have conditions checkign the move to will be done under safe conditions (point actually projected on nav) etc etc

#

But in any case, mistery solved. Kinda.

#

Welcome to epic state trees, labeled experimental for a reason

earnest musk
#

Waaaaaai a second πŸ˜„ arent they "GA" ? πŸ™‚

slow bobcat
#

Ga? What do you mean?

earnest musk
#

General Availability - they are not marked as experimental it seems

slow bobcat
#

Well... Seeing how much they are changing in 5.5, and how horribly bad is to debug them in any kind of build... I would ignore that ga tbh (I didn't know they weren't experimental anymore)

earnest musk
slow bobcat
earnest musk
#

I am confused a bit as I wanted to switch to ST from BT for large numbers of enemies and it just keeps on giving πŸ˜„

earnest musk
slow bobcat
earnest musk
#

More of a conceptual question: to me it feels that BTs lean towards handling state on a blackboard and StateTrees rely on an Actor to store it state even though usage of parameters can be blackboard substitute (from C++ with mutable refs to parameters). Is this a correct assumption?

tawdry zephyr
slow bobcat
slow bobcat
# earnest musk More of a conceptual question: to me it feels that BTs lean towards handling sta...

If you figure out how to write to a global parameter using refs, please post it here. Nobody here seems to know how. The only way I could do was to expose things like this:

  • a task reads a param (global/Evaluator)
  • the task do its thing and stores a value in X component
  • an Evaluator/global task reads the value in X component and exposes it copying it into a param

But there's no "task writes value in global param"

#

I tried different combinations and nothing worked

green epoch
#

Im having a problem where a blackboard key keeps changing back to self actor despite being set. Has anyone else ran into this problem and if so, know how to fix it

slow bobcat
tawdry zephyr
slow bobcat
# tawdry zephyr Curious why you'd change (downgrade?) from LD to ST

Not a downgrade, a different approach. We swapped because the goal is to depend as little as possible from third party plugins, specially if there's a plausible/usable tech provided by epic. The change worked very well because it was a simple usage (a layer controlling general states of ai)

#

Now... Replacing Bt's with ST's... That's a different thing.

tawdry zephyr
#

Fair call. I understand not wanting to rely on third party especially if it's a long term project

#

Esp if epics alternatives meet your needs

slow bobcat
#

Sometimes you even get lucky and epic buys the third party plugin you use (like what happened with Mutable)

tawdry zephyr
#

Oh good god I still have nightmares about that things initialisation issues

#

Basically unusable in MP. Hope they fix it

green epoch
#

but thats not really a long term solution

slow bobcat
vivid fern
#

sounds like something is mistakenly setting this key tbh, either a node has the wrong key assigned, or some external (to the bt) thing is setting it like a bp or code .. or maybe some corrupt data got serialized and initializing it weirdly. Have you stepped through the code or bps that interact with the key?

earnest musk
vivid fern
#

honestly would have been fun to bring that prototype to production, but the realities of the current industry climate caused us to change course

#

maybe in the future haha x_x

earnest musk
#

Dunno if 50 mobs justify going into mass yet. Want to iterate to get metrics first πŸ™‚

vivid fern
#

oh yeah our game was very focused on large herds so it was pretty warranted in that case

earnest musk
#

This default MoveTo is in StateTree looks like a mess 😦

#

AITask_MoveTo keeps reinitting task with flag Garbage

solid spire
#

Yeah I don't think it's getting cleared in the exit State so if you return to that state after completion it'll still be there but ready to be trashed

earnest musk
#

Then it gets into the loop that task cannot activate

earnest musk
#

Found a root issue - I was starting logic in OnPosess, which for some reaon worked on one AI Controller, but not on another. Now I am doing it during BeginPlay of a Pawn and suddenly all movement is correct. Dunno if there is a proper primer on how to initialize all of this in C++?

green epoch
#

It just kept returning 0

#

so I changed the number in btt

earnest musk
#

@slow bobcat

//InstanceData property decl:
UPROPERTY(EditAnywhere)
TStateTreePropertyRef<int32> RefToInt32; 
// In Tick:
FInstanceDataType& InstanceData = Context.GetInstanceData(*this);
int32* MutableInt32Ptr = InstanceData.RefToInt32.GetMutablePtr(Context);
(*MutableInt32Ptr)++;
UE_LOG(LogTemp, Warning, TEXT("[%d]"), (*MutableInt32Ptr))
#

Seems to work this way, but I have opted for same approach as AnimBP - Global task to evaluate environment/owner properties (Some on enter/ some on tick) and then let states to act on it + some event when AI sense gets triggered to ensure we exit idle/roaming ASAP.

slow bobcat
slow bobcat
green epoch
#

its not a major problem but if i ever want to the btt for other actors id like to be able to set variables

slow bobcat
green epoch
#

yeah i deleted it just bc i couldnt get it to work but ill reset it up

#

Its the close attack key

#

everytime i click on the bts it reverts back to self actor

#

instead of close attack key

#

ive never seen it do that

#

and its only happening when i set the blackboard key selector to the "close attack distance key" if I set it to anything else it keeps the variable

#

i think i got it working, upon deleting everything connected to that variable restarting unreal and recreating it, i got it to work.

slow bobcat
slow bobcat
green epoch
green epoch
slow bobcat
earnest musk
#

Yep - you have to bind it for global task from parameters πŸ™‚

scenic pewter
#

Got a really annoying issue with navigation meshes: I can't use static/prebuilt navigation in my project. The navigation mesh seems to disappear on play/simulate. Dynamic works fine though. Been pulling my hair out over the last day trying to figure this out!

#

Here's an example of editor->simulate for static generation:

#

And with dynamic generation, during simulate:

dense owl
scenic pewter
dense owl
#

I’ve seen instances where people’s world wasn’t at 0,0,0 so it caused all kinds of issues

slow bobcat
# scenic pewter Got a really annoying issue with navigation meshes: I can't use static/prebuilt ...

Do you have sub levels? If that's the case, you must have a nav mesh bounds volume in the persistent level. Otherwise, when the nav generates it will put the recast object in whatever sub level finds first during nav generation. Then, unless that sub level is loaded, you will not have any nav.
That or you might have done as suggested by NeoExcidius and have moved the recast object out of 0,0,0 after being generated

pastel moth
#

im making a tower defense game and adding automation to my turrets. Would it be cheaper to add AI sight to get the enemies or would it be better to just have an array of enemy references I could loop through and supply them to the turrets?

#

Im assuming AI sight is way more expensive?

obsidian delta
#

Your own logic would definitely be cheaper especially if you plan on having a ton of actors

livid dew
misty wharf
#

πŸ‘

livid dew
# misty wharf πŸ‘

I'm getting the type " does not match type X error with Output binding, though. Do you know if that's fixed?


//.h
USTRUCT()
struct FSelectNextPatrolPointTaskInstanceData
{
    GENERATED_BODY()

    UPROPERTY(VisibleAnywhere, Category = Output)
    FVector Destination;
};

//.cpp inside EnterState
FInstanceDataType& InstanceData = Context.GetInstanceData(*this);
...
InstanceData.Destination = Patroller->GetNextPatrolPoint()->GetActorLocation();
misty wharf
#

Are you binding to a property of something else? Like, Actor->Location or something?

livid dew
#

I'm binding that directly into MoveTask's target destination. Also tried with Actor.

misty wharf
#

Hm I recall this would usually occur if you were binding to a property of something instead of binding directly to the value (eg. Actor->Location vs. having Location directly as a vector to bind to)

#

It might just be an UI level issue though if it's what I think it is, and it might work despite the nag

livid dew
#

Ok, thanks, I'll check that!

livid dew
#

Argh, a full rebuild fixed it.

earnest musk
#

Trying to wrap my head around a problem, that probably has been already solved, but cant find any specific solutions:
I want to run EQS query in a state to find attack location. As EQS query is a latent action I start it on enter state and when it is completed, set it to output parameter. Thing that I am trying to understand how to pass this output to next state and if OnComplete is suitable here. Here are tow options I am trying to setup:

#

If SelectLocation and MoveToLocation are on a same level I cant use output parameters in latter

#

One solution I can come up with is to store results of a query on a pawn or controller, but I would like to avoid such dependencies as much as possible

earnest musk
#

Also a question about StateTree instancing. Does every controller get its own instance of a state tree and all the parameters are fully isolated?

slow bobcat
# earnest musk Trying to wrap my head around a problem, that probably has been already solved, ...

The way I solve this pattern:

  • your task needs an Out parameter to which the next (waiting) task will bind.
  • it also will have a Control Variable (more on this later)
  • start the latent action on enter. Here is where binding to delegates happen. OnEnter returns Running if you successfully launched your latent action, Failure if not.
  • have a member in your class that you want to check (it can be a bool, an array of query results, a string... Your pick). By default that member is null/empty. Let's call his a control variable. Reset your control variable on enter before launching the latent action
  • have a callback function for when the latent action finishes. Once you get the callback, write the value of your control variable (this is also a good time to unbind from your delegate).
  • while this happens, your task is Ticking. Tick checks the control variable. If set, apply values needed in your output variable (to which you will bind in the next task) and return Success. This will finish the task and jump to the next (and trigger transitions). If not set, return running and keep waiting for the latent action to finish.
  • your next state "should" be a substate (this you already have)

Once you return success, the bindable parameter will be available for the next state.

Careful when doing this in a Global Task: returning success from a global task STOPS THE TREE AS IT WAS FINISHED.

One main problem you will face and the reason of the control variable: most delegates you will use are made for you by epic (like the eqs). Your callback function will not retrieve as a function param the execution context of the tree, so you can't really do much there in terms of Tree Flow. That's why I use the control variable and handle things in tick, because there you have the context to do stuff

slow bobcat
earnest musk
#

Hmm maybe different approach - what if I make a combined task, like MoveTo but MoveToEqsLocation, that will run a task and then will start a move task as a part of a single state, so they can feed one another?

#

AFAIK there is an AITask to run EQS

#

Or have this data as a part of something like CombatComponent as it is needed anyway to feed EQS with active target via context πŸ€”

slow bobcat
slow bobcat
earnest musk
#

But merging them probably would be cleaner - Like TacticalMoveTo πŸ˜„

slow bobcat
earnest musk
#

Yep, seems like a solution. Would love to see more out of the box toys for statetree though πŸ™‚

past nexus
#

Hi, why are nav modifiers not working on UE5.4 ? I've set runtime generation to modifiers only and I added a nav modifier component to my DoorBP but the nav mesh doesnt get updated with the movement of the door

dense owl
past nexus
#

For everyone with this problem...To update the nav mesh along with the rotation of a mesh you can add and attach a box collision to the mesh. Set it to dynamic obstacle with area class to NavArea_Null and you should disable can ever affect navigation on the mesh. After thats it is working as a dynamic nav modifier

fervent fog
#

Anyone using state trees successfully for more advanced AI? I looked into State Trees recently and saw they are getting more updates in 5.5, but am kind of unsure, and there aren't many resources out there.

I am working on a systemic AI with pattern of life behaviors, more complex than your average combat driven AI. I was having luck with implementing this using BTs until the number of branches got sufficiently complex and then it became difficult to understand. I dabled with executing sub-trees, but the problem remains, just more obfuscated.

I like State Trees because they are simply easier to understand and I believe could be used like a hierarchical planner, where the ST selects a task and then as sort of a hybrid can executes BTs for more complex individual behaviors, which are easier to implement there.

This is a high level blockout of how I need my AI to function, and would appreciate any feedback, suggestions you may have.

Note: colors below have to do with NPC types, green if they have military training, etc.

solid spire
#

I've never heard of pattern of life behavior, what is it?

ivory rune
fervent fog
#

Smart Objects and Mass are a really big step forward for Unreal, but it looks like State Trees (which obviously don't just apply to NPC AI) seem to be quite early and from what few examples I can gather they are very much not ready for production yet.

#

Mass is also quite technically complex, so not as usable for most developers without a team

slow bobcat
# fervent fog Anyone using state trees successfully for more advanced AI? I looked into State ...

We do have complex ai. In the lines of what you are doing. We have a state tree to decide on a very high level (idle, Caution which is your search, Found which is your move I guess, Combat, Patrol etc), each state runs a different bt where we actually handle the meat and vines of each. We also have several state trees running in parallel (not suported until 5.5 but we have our own implementation since months ago, we couldn't wait) where we check for other things (ie: do some special behavior, react to something etc). Those send events to the main tree to jump into special states that can only be accessed by events. We dynamically set the bt to run in each case within that special state.
My advice is to combine state trees and bt's. For example, your patrol. In our case Patrol would be a sate like yours, but anything under it would be in a patrol BT (look for target, find patrol point etc etc). The ugly part? You need to invent how to run a bt from the state trees (not difficult since you have direct communication with the AI controller)

#

You also can use sub trees if that helps to simplify things

ivory rune
fervent fog
# slow bobcat We do have complex ai. In the lines of what you are doing. We have a state tree ...

Hi Bruno πŸ‘‹ That's exactly what my research told me would work best based on several papers and GDC talks, and it makes a lot of sense. Good to know at least someone else has tried it in UE5.

Is there any more specific info you can share on running BTs from the State Tree?

This is kind of where I started hitting some soft road blocks in terms of how to properly manage data, etc. Since BTs rely on BB, how do you properly tell the ST that a task is complete, etc?

I have not been able to find even a simple example of how to do this that makes a whole lot of sense, but maybe I'm missing something more simple here. It would be really great of anyone with more knowledge to put together a very simple example on GitHub or something, could be extremely benificial and maybe help shape how Epic improves State Trees going forward.

fervent fog
slow bobcat
# fervent fog Hi Bruno πŸ‘‹ That's exactly what my research told me would work best based on sev...

There aren't any examples or support put of the box.
To run a bt you just need to call RunBehaviorTree from your BehaviorTreeComponent. It will tΓΊ in looped mode, which doesn't call the OnBehaviorTreeFinished, that you will need to handle manually by checking if you are pushing a new tree (different form the one before) and calling a callback to your state tree component. If you run the bt in single run mode (for this you need to copy/paste the code un RunBehaviorTree and change the flag passed, amazing this is not exposed), you can register to the engine's delegate for when the tree finishes, but theres a bad thing: single run bt's are not Instanced and the instance kept. The engine will create a new instance on run and destroy it on finsh. Careful with that, it's more expensive in cpu than one would think.
For the BB part I ended up doing a St Condition that can check values on the BB. Basically made a class that inherits from the interface that allows you interact with the BB. The class has a parameter for which BB to read from and which BBK to use (you can expose the bbk's in a BB, just check how the engine does it in their Blackboard decorator). Then, in your condition, have a parameter with is an Instanced pointer to that class. I can't share the code sorry, it's an in development project, nda and what not.
With those two pieces you can now run bt's or not from your St based on BB conditions

#

I might put something in a github as you mentioned. Just need to find the time

fervent fog
fervent fog
# slow bobcat I might put something in a github as you mentioned. Just need to find the time

Honestly this might be really huge for the community especially if we could get some eyes on it. AI is one of the areas I think there is an extreme lack of resources and samples from Epic, and one I've been hoping the community steps up to fill. If you do find the time even to do even an extremely basic example project to share, I would be very interested in contributing to help flush it out more as a community resource. Please let me know if you do!

slow bobcat
slow bobcat
rich pendant
#

I'm not sure if this is the correct channel but does anyone have any ideas on how best to handle the nav mesh for areas like this? Characters can walk up the 'steps' and is wide enough but the nav mesh doesn't detect it. Any suggestions?

slow bobcat
#

Does it change if you modify the altitud of the last step so it is like the first one?

rich pendant
fervent fog
rich pendant
fervent fog
rich pendant
dense owl
rich pendant
vast wigeon
#

Is it somehow possible to set blackboard variables on a BT before it runs?

dense owl
vast wigeon
# dense owl You can set the Blackboard variables themselves from the AICon with GetBlackboar...

thanks for your response. i checked and there is indeed a 'GetBlackboard' function. however its input is an actor, and its unclear to me how exactly i could use this to set a blackboard value on a BT that has not yet run. ive also realised there is a blackboard component, and so now im actually quite confused as to where blackboards actually live. my understanding was a BT has a blackboard assigned to it, and so to get a reference to the blackboard you would need to go thru the BT somehow. is this not the case?

in this image is basically what i wish to do... i am creating a BT from a soft class reference, and before it actually runs on the AIC i wish to set a blackboard variable. is that possible somehow? πŸ€”

dense owl
vast wigeon
#

by 'setting' a BT i mean i am assigning a new BT to run on the AIC at runtime

dense owl
#

I don’t know why you’re so confused. You’re showing unconnected nodes instead of actually connecting them and trying it out

vast wigeon
dense owl
#

Try UseBlackboard

#

I think that was the node

vast wigeon
#

I see, thank you that seems to be a promising direction. i will see if i can get what i need with this

#

@dense owl

merry abyss
#

Hi, is there somebody that as played with statetree and smart object with the gameplay interaction plugin ?
I wanted to know if it's possible to get a reference to the gameplay interaction statetree to send a statetree event to him. I dont seem to find how to do it, so i was asking my self if it's even possible.

misty wharf
analog linden
#

How to trigger transition in state tree from a global task?
I want to interrupt whatever is going on in the tree.
I have a global task that sends an event, but it doesn't trigger a transition!

merry abyss
merry abyss
analog linden
#

would it trigger if the current task is in mid tree?

merry abyss
#

it should i think but not sure

analog linden
#

it seems to be working thanks, i will debug it to check if it triggers in the same loop or the next one

slow bobcat
#

That said, the 1% doubt comes from a bit of code where they handle events triggered in between ticks as a by product of transitions happening

analog linden
#

so in another word it is 99% executed on the same tick the event is received!

fathom sun
#

Hello, I've got some crows in my game that use MoveTo to walk around the map. I'm trying to make so that they wouldn't enter certain areas so that they don't get stuck.

I made a custom custom navigation filter I assigned to the DefaultNavigationFilterClass in the crow's AI controller. I also made a custom navigation area that would be treated as unreacheable by that filter, but I don't see to make it a thing.

In the navigation area I can only set the navigation cost which wouldn't help at all since I don't care about reaching a path a certain way: I don't want to consider certain areas at all. I can add a certain navigation area in the navigation query filter, and it has a flag IsExcluded which I thought means "don't consider me in your navigation", but apparently it means something else (the property comment doesn't specify anything).

I see that there are some navigation flags that I can play around with, but in the navigation area it says SupportedAgents All, and it doesn't allow to change it at all in the BPs.

So my question is -- does anyone know how to make a navigation area that would make a certain query filter treat it as unreachable, whereas others would not be affected at all as if the area is not even there?

fathom sun
#

An alternative solution is to put an invisible wall only those agents can bump into, but I would like not to

misty wharf
#

using excluded in the nav filter should make it so the area is not traversable when the filter is used

fathom sun
#

Oh, yeah, it actually does. For some reason it didn't work last time. Trying that again worked just fine, maybe I missed something last time πŸ˜…

sacred stone
#

What are people's opinions here about Behavior Trees vs State Trees? Which do you prefer and why? I personally prefer and have used BTs, but would like to see some more opinions.

solid spire
#

Little state tree question.

Is a pointer to instance data reliable as long as the task is running?

I'm asking because I'm trying to set up a delegate callback from a tasks instance data but it seems to be corrupted when it's called. However in the tasks actual tick I see that my instance data is still there and valid

slow bobcat
#

I don't know how, but I'm guessing there's a way to get the instance data of a task externally. The state tree component has the instance data of the tree. I guess it's a matter of research how the execution context gets it

slow bobcat
#

What it's not reliable is to store a pointer locally from the execution context instancedata, because the ex. Context is changed and destroyed constantly

dusk condor
#

Is anyone aware of any Unreal specific AI up rezzer?
I'm trying to reproduce a Blueprint from a 720P Youtube video tutorial.
Much of the text is illegible but I would imagine that any Unreal specific AI tool could easily 'sharpen' the text and make it legible.

slow bobcat
rancid mural
#

Hm. If using states in a BT is just full stop a bad idea, I feel like I should be changing over to State Machines ASAP. Since even just trying to keep a grip on what unintended transitions a BT might spit out with its colliding priorities and considerations within a particular state, i.e. combat, feels like way more work than manually setting up every intended transition; at least I can see the end of that process.

dusk kelp
#

Hi there, guys
Maybe someone had this problem before

I have a custom actor without MovementComponent
And when Im calling FindPathToLocationSynchronously it makes a path that is too close to the walls
Is there a way how to make an offset from the walls when calculating a path?

radiant path
dusk kelp
unreal inlet
celest python
#

Quick question, what is the equivalent of FThing& A in StateTree parameters? I want to pass a specific parameter to a task and let that task set a value to it

#
void MySTTask(FThing& x)
{
 x = ...
}
radiant path
# celest python ```cpp void MySTTask(FThing& x) { x = ... } ```

I'm not sure about the question, but I think what you mean is having an Category = Input property inside the InstanceData that you then modify? I'm not entirely sure if modifying it is possible (using a reference there). But you can probably have another property with Category = Output bound to the same object which you then write to (equally I don't think this property is a reference either, but would need to look into it).

livid dew
#

Hey!
I'm running a EQS query from BP (within a State Tree task). That EQS has a circle generator that uses data binding to get values from the query.

Well, it all works as expected with the circle radius using Set Named Parameter, but trying to set the number of points makes the editor freeze completely. I triple checked that the name of the parameter is correct. I'm guessing if that could be because the number of points is an integer and Set Named Parameter only accepts float, but then what could the solution be?

Thanks!

hot moss
#

is going from behavior trees to state trees big perf gain if i have hundreds of npcs? or do they tick the same way and its just about structure/readability

hot moss
#

ok seems they tick the same way xD

celest python
#

Output variables are not for writeback

slow bobcat
unreal kernel
#

Anyone have experience fully implementing the orders-abilities project from Daedalic?

final loom
#

Has anyone ever made a spherical/planetary pathfinding for AI?

dense owl
#

Sure, some people have

#

They would’ve had to create their own custom solution

slow bobcat
ivory rune
#

https://www.youtube.com/watch?v=ei2YR7UR9DE
Someone did this, apparently.

Test performed with nativize blueprint enabled containing pathfinding function blueprint
Test Pathfinding at event tick for stress test
The screen displays the time it takes to find the path in milliseconds
The pathfinder in the video is limited to water, but you can add and or remove any type of surface from the search
There is line trace suppo...

β–Ά Play video
green epoch
#

I am having a little bit of trouble with my nav mesh, im trying to have it be modified by specific actors, but every time i set an actor to be a modifier, while they are spawned in mid play, the take up a much larger portion of the nav mesh then they should. As you can see below the one on the left which was spawned mid game is nullifying a massive portion compared to the on the right. Does anyone know why this would be happening?

placid halo
#

Hey! I must be missing something incredibly simple but I can't figure out what. I'm setting up a new very simple State Tree in a new project on 5.4.3 and the Delay Task is not playing at all. I've added a breakpoint in FStateTreeDelayTask::EnterState and it hit 5 times before any task, but there is no hit on FStateTreeDelayTask::Tick.

#

The State Tree is completely barebones:

#

In another project I originally had something like this:

#

but the behavior is the same (all states get called 5 times, then there are 5 MoveTo tasks on the AI Controller)

final loom
#

I assume default pathfinding always assumed Z down for gravity

solid spire
#

Anyone have any experience or any talks/articles on attaching AI to combat areas (or any kind of "areas"). The goal would be to define where the AI is allowed to go, or prefers to go. At what point it should leash back to it's "home" or where it should be allowed to pick from for idle wandering.

I feel like a sphere or a circle would be the cheapest and popular solution for this. But I'm wondering if there's not a solution that supports more complex ideas like being able to define the inside of a building or even a certain floor of a 3 story building

placid halo
# solid spire I would assume you have another task in that state that's failing or succeeded i...

But that's the weird thing, the MoveTo state has only a "Move to Location or Actor" on Enter State. It still fires up 5 times. I've found out it's because of this in FStateTreeExecutionContext::Tick:

        // This helps event driven StateTrees to not require another event/tick to find a suitable state.
        static constexpr int32 MaxIterations = 5;
        for (int32 Iter = 0; Iter < MaxIterations; Iter++)```

I also realized the Delay Task in the old State Tree that worked fine in 5.3, but the Delay Task in that same State Tree does not work in 5.4. I guess is giving up on ST and going back to BT/BB's then? 😦
solid spire
#

You can debug state trees with the visual logger to see where things are failing. There's also logs for what happens with your move request to see if they're failing or not

rare ruin
rare ruin
#

Use the debugger to know which one is ending your state
And make sure the tasks that you want to run doesn't call finisTask, you could have a "run forever" parameter that prevent that

#

It's not multithreading tho (just sequential parallel)

#

Ah crap, I didn't scroll

placid halo
rare ruin
#

You call finish task when the request failed or when the move ended

#

It's ok but it means your move to failed?

placid halo
#

sure, but it always succeeded (the find random location radius is 6 meters around the character, and it's just an empty test map with a huge navmesh)

rare ruin
#

Do you have access to c++ n

#

?

placid halo
#

yes

rare ruin
#

Else check the visual Logger navigation

placid halo
#

I was trying to debug it, but we can't change the engine, so it would be kind of useless anyway

rare ruin
#

You should investigate the move to code step by step to know what's happening

The visual Logger should show you navigation etror

placid halo
#

I checked the logger, there were no navigation errors. On the ST debugger I get all 5 transitions:

#

besides it actually triggering the EnterState of all valid states 5 times (even though FinishTask is never run on the MoveToRandom state), it never triggers the transition to the Wait state:

celest python
rare ruin
vague hollow
#

Hello there, in a state tree any idea how to transition from a state to either one or another ? I tried to set a transition with random threshold on 2 different other states, to no avail, as i've also tried to transition to a group and add an entry condition with a random threshold, same result. Could anyone give me a hand here ? (See pics for an idea of what I'm trying to do)

lunar cedar
#

for UAITask_MoveTo, why are these not public -_-

harsh storm
#

They may have a getter

#

But you could also get a reference to the path following component and hook into those delegates.

#

Should be on the AIC

lunar cedar
# harsh storm But you could also get a reference to the path following component and hook into...

thank you that worked quite well as a test

void AZombiePawn::TrackPlayer()
{
    TArray<AActor*> FoundPawns;
    UGameplayStatics::GetAllActorsOfClass(GetWorld(), APlayerPawn::StaticClass(), FoundPawns);
    MoveToTask = UAITask_MoveTo::AIMoveTo(GetController<AAIController>(), FVector::ZeroVector, FoundPawns[0], -1.0f, EAIOptionFlag::Default, EAIOptionFlag::Default, true, true, false, EAIOptionFlag::Default, EAIOptionFlag::Default);
    
    if (UPathFollowingComponent* PathFollowingComponent = GetController()->FindComponentByClass<UPathFollowingComponent>())
    {
        PathFollowingComponent->OnRequestFinished.AddUObject(this, &AZombiePawn::MoveFinished);
        UE_LOG(LogTemp, Warning, TEXT("Found path following component"));
    }
    MoveToTask->ConditionalPerformMove();
    UE_LOG(LogTemp, Warning, TEXT("Tracking: %s"), *FoundPawns[0]->GetName());
}

void AZombiePawn::MoveFinished(FAIRequestID RequestId, const FPathFollowingResult& Result)
{
    UE_LOG(LogTemp, Warning, TEXT("MoveFinished"));
    FTimerHandle Handle;
    GetWorldTimerManager().SetTimer(Handle, this, &AZombiePawn::TrackPlayer, 3.0f, false);
}
misty wharf
#

:p

#

That should have been a non-pinging one sorry :D

lunar cedar
slow bobcat
random jay
#

Why not just subclass opposed to a full engine fork

tawdry zephyr
#

I've had to PR a few things for AI but the AI team are really responsive so its not as painful as animation programming stuff

#

If you give them a clear use-case they'll generally accept exposing something

slow bobcat
harsh storm
still crypt
#

Hey All, I'm having some trouble with the default BP move to node when moving to a target that is also moving - since the moving actor is only observed at a fixed tick the resulting movement is somewhat stuttered. How should I go about resolving this? I first thought is to write a custom node that handles movement outside of pathfollowing if there is a direct path to the target (determined via a nav raycast). Is this a reasonable approach?

slow bobcat
still crypt
dense owl
#

There’s also some turn rate and acceleration/deceleration options in the CMC that can help

still crypt
#

I don't want to have the focus set in this case, since that would mean the NPC would face the target even in the event of the path being longer/ around corners ect. Setting it for the last portion would be okay though I guess, just need to poll that somewhere

slow bobcat
slow bobcat
still crypt
#

Alright that seems reasonable. Where do you do this, Path following comp?

slow bobcat
#

Yeah

still crypt
#

Alright, great. Thanks for the help you two, appreciate it!

slow bobcat
#

Good luck

serene fern
#

Out of interest how would I path a ai to where it can sense if there's a blockage that it can move along it's path, say a door it can open ?

#

Would I just have it sense what's infront of it and when it sensing a blockage it can move to stuff to move it and then carry on or would have have to do additional stuff ?

slow bobcat
serene fern
serene fern
slow bobcat
#

Not necessarily. The nav link will ensure that your path is calculated through the door but the movement will stop as soon as you get into the trigger

bright wind
#

How to parametrize Smart Objects with gameplay behaviour? I using Smart Objects wit AI Behaviours (as per https://dev.epicgames.com/documentation/en-us/unreal-engine/smart-objects-in-unreal-engine---quick-start). I want for NPC's to look for random "Idle" object, go there and perform animation. I did that, by creating definition SO_Definition_Idle, assigned to smart objects, which references behaviour SO_Behaviour_PlayMontage. It works, but the montage played is "hard coded". I want designers to easily choose an idle animation, different for a chair, couch, bed etc. Is there an option to maybe expose the "animation" parameter of SO_Behaviour_PlayMontage to be editable in the level editor?

cursive ibex
#

Hi everyone, I want to customize the NPC Path do you know where should I do this?

fathom sun
slow bobcat
#

Guy behind state trees gave this talk at Unreal Fest Prague. He's not at Epic anymore, but the info still stands
https://www.youtube.com/watch?v=YEmq4kcblj4

In this presentation we'll have an in-depth look into what State Trees are, how they work and can benefit your work.
As we'll walk you through the UI, we'll showcase how efficient and flexible this tool can be for both designers and programmers. We'll cover the core functionality, useful features and of course the latest coming out in UE 5.4 and...

β–Ά Play video
cursive ibex
misty wharf
strong gull
#

hi, is there any way to limit how far from an agent the navmesh generates vertically? there is an option to limit it horizontally, but i am making a level with multiple floors and its generating the navmesh for all 11 floors and its not really performing well

cursive ibex
#

Also the character doesn't follow modified points.

slow bobcat
rapid birch
#

How to stop AI character stopping moving temporarily? AI blueprint logic is in AIController class based BP.

rapid birch
#

ty, tried it but it was something else that was causing problem πŸ˜„

dense owl
#

What problem? You asked how to stop moving a character lol

final loom
#

Is there a way I can reposition the pawn sensing component?

harsh storm
#

You shouldn't even be using it

#

You should be using AI Perception

final loom
#

Yeah. I think you're right. Just confused why there is both I guess.

#

Don't think I can change AI perception location either though, which gave me a problem when the feet of a character were obscure but the rest of them wasn't.

#

So I made a component or something with a transform and AI stimuli and attached it to that and made it detect parents that way too.

harsh storm
#

You can customize where the sight is traced to

#

GetPawnEyeViewPoint or something like that

nova trout
#

does anyone have any knowledge on how to replicate Half-Life 2's combine or Metrocop AI using blueprints or c++ or anything?

slow bobcat
#

You will need to define which behaviors does it have in game, what does it do, then design it

#

Maybe there's some video somewhere with a behaviors' analysis

nova trout
sly musk
#

does anyone know how to change the default gamepad button. is currently the (A) button for xbox controller

slow bobcat
honest mulch
#
bAutoRegisterAllPawnsAsSources=false```
why when add this to config the AI can't move
misty wharf
#

If that causes them to stop moving, then it sounds like your movement is only triggered by sight

summer hazel
#

Hey I know there is an event on pawn see but is there a way to check when the pawn doesn't detect any other pawns ?

#

Basically when the enemy does not see you

misty wharf
dense owl
#

Get perceived actors ?

summer hazel
#

Oh so I can just check if the player is one of them?

summer hazel
misty wharf
#

Since only pawns are perceived by default

jade haven
#

Hi all, I'm working with melee enemies in my project and I've had this issue where they seem to pile up on each other. Is there a way to have them navigate to the same or similar direction without bumping into each other?

frigid gyro
#

Master AI Locomotion with Behavior Tree in Unreal Engine 5.4! πŸš€

In this tutorial, you’ll learn how to set up basic AI locomotion using Behavior Trees in Unreal Engine 5.4. Whether you're new to AI or looking to enhance your game’s NPC movements, this tutorial covers everything you need to create intelligent, responsive AI characters.

πŸ”§ What Yo...

β–Ά Play video
stoic cove
#

Hello. Is it normal that sometimes the AI move to node will return success when it finds a path to the target location and at other times it will return success when it arrives at the target location. I'm getting both results from the same AI Move To node and I have no idea why? It doesn't make sense to me. Why would the success output cover two different conditions?

#

What am I missing here?

iron roost
#

Question:

I keep getting Nav Ai move to error aborted and blocked from my npcs. But it's pretty much a flat plane. I don't understand what they are hitting

They will start moving at the target then stop after a short while and error out. Once in a while if the target is close they will do it just fine, then on the next move to go a little ways then error saying aborted or blocked. Yet nothing is in the way.

It's a boat moving across the water from 1 dock to another.

mortal crater
#

hi guys, I just started studying State Trees, so I ran into the problem that I have a state in which the AI has to go to a location or actor. It is implemented through the AI Move to node. The problem is that the Finish task is immediately after the Fail and Success pin of the AIMoveTo node, but the tree constantly enters this state again. A new AIMoveTo begins, and the old one is aborted and ends with a fail. How can this be fixed? Maybe there are some State Tree settings for this, or some special function/state is needed?

fluid ingot
#

Anyone happens to know why my Recast Nav Mesh resets its properties each time I open the level? It doesn't save my edits and it is not taking the properties from Project Settings neither.

dense owl
#

Try making custom nav agents

fluid ingot
dense owl
#

Alright then don’t try it

solid spire
# mortal crater hi guys, I just started studying State Trees, so I ran into the problem that I h...

I'm not sure what desired result you're looking for but here's some things to keep in mind:

State tree will try 5 times to find a valid state to enter when it fails to find one (I'm simplifying a bit here, be this is why the tree re enters the failed state)

AIMove state tree task does not clear it's failed request on exit. Which means if it's immediately called again, it'll re use the failed task and stop immediately. I consider this a bug because the behavior tree equivalent does handle this property.

lunar plover
#

I've got a behavior tree with a TargetActor blackboard key, in My service I am finding a target and setting the TargetActor then I'm calling MoveTo with the TargetActor, initially the ai will follow the player but it will suddenly spas out and the BT is jus flashing the MoveTo node over and over without moving anywhere even though the TargetActor is set.

It's like MoveTo is grabbing the initial location off of the TargetActor and then never updating it even when the Target moves... is there some special setting or something that needs to be enabled on the move to node?

cursive ibex
#

Hi friends does anyone knows how to create custom path for our agents? I want to create a custom path instead of the path is created by navigation but I don't know where should I do this, I will be appriciated if you help me to solve this issue, Thanks in advance.

nova trout
#

I’m trying to make a gun centric npc Ai for my half life 2 ue4 project my think I want to make is smart Ai like combine soldiers or metro cops that do certain things in combat I don’t know a lot about unreal Ai but any help would be appreciated

slow bobcat
slow bobcat
cursive ibex
#

Hi @slow bobcat Thanks for your answer, But I am really doing that but that is not working, I've created my own recast class and override the FindPath function I am simply adding a point to the PathPoints to see if it has effect or not, Although the Point is added but my character doesn't follow the points goes from the shortest path still, I don't know how my character chooses shortest path, I am using CrowdController for my character I believe that shouldn't edit my main points!?

misty wharf
#

Also check that your recast class is actually being used, I vaguely recall there were a few hoops you have to jump through for it to do that

summer hazel
#

Hey I was wondering is there a way to check how far the player can see? Because I'm using the exponential height fog so I can limit player view and create atmosphere and I would like the enemy to stalk my player just barely at the point the fog starts. Can I get the distance between the camera and the fog ?

cursive ibex
# misty wharf Your point might be getting filtered out in the string pulling phase... I don't ...

Hi @misty wharf Thanks for replying, Actually I already tested my recast class is being used, I also realized the problem is comming from CrowdFollowingComponent of the controller that overrides the points I am using without Crowdcontroller it was working as expected, But now I don't know exactly which part of this component overrides my Path! Does anyone knows where should I look for this issue, I will be appriciated if you help me to find the right place, Thanks in advance.

slow bobcat
livid dew
#

Hey, people!
Has anyone solved the need to wait for a GAS Ability Task to finish inside a Behaviour Tree Task?
Thanks!

summer hazel
summer hazel
summer hazel
#

Oh wait I just realized when using ai move to you can use a float to limit how close the ai comes to you

cursive ibex
livid dew
# cursive ibex Hey <@245854680066949120> , I already did.

Can you give me a hint of what your solution looks like? πŸ€—
I think I'm close enough by creating a custom ActivateAbilityByClass that returns the instantiated Ability and having a delegate in it that will be invoked when it's finished. Then the BTT binds to that event and only finishes its task when the Ability Task is effectively finished.
But that may not be the correct approach.

light void
#

Greetings,
I have a smart object here. I want two NPC to be at each side and trigger an animation if there are. How can I check in the Gameplay Behavior if both slots are filled?

#

They are the same smart object, just two different slots, but I don't know how to check if another slot is currently in use.

misty wharf
#

There might be some way to communicate through the smart object component itself as well but I've not looked at that, but at least it seems like something that could work - I do recall there are ways of getting more info from the SO you're interacting with, but you might have to create your own code for interacting with the SO, as I recall the builtin one somewhat lacks in the regard for advanced stuff

light void
#

Thank you, I'll check it out

marsh swan
#

Who else here using state trees?

I'm trying to figure out best practices when it comes to transitioning between states on complete, failed or success.
It becomes so confusing with how one can run multiple parallel tasks in one state. There seems to be no setting for waiting to see if all tasks are completed, succeeded or failed, it only checks the first one, if it has completed and then if fail or success.

Anybody know of a good way to handle this stuff?

rich pendant
#

Is anyone able to shed any light on why move to location or actor behaves as if it working, (The NPC starts to move) but they then stop and a few seconds later, triggers the on move finished pin despite not reaching its location. The location is reachable on the nav mesh.

fiery glacier
#

Is it possible to create non replicated ai's on clients and make them follow the local player? When I try AI Move To node, character rotates to target but can't move. Is there any setting I need to play with?

misty wharf
misty wharf
fiery glacier
rich pendant
misty wharf
#

Ok that's not it then... Check in Visual Logger if it outputs anything useful. It usually shows more information on move failures there

marsh swan
misty wharf
#

Yeah

marsh swan
#

All right, it sounds interesting.
I suppose the doer task can't execute before the getters if it takes in variables from the getters?
Or could it and then it just gets the defaults? πŸ€”

misty wharf
#

if the getter tasks are asynchronous then the doer can execute before the data is available

marsh swan
#

Seems then it's necessary to make it synchronous to avoid this possibility.
But by default all the tasks within a state are asynchronous.
So one has to set up the synchronicity manually?

misty wharf
#

by async I mean if it doesn't make the data available immediately when it executes

#

iirc as long as it does that then it should be fine

marsh swan
#

Oh you meant it like that, ok then it makes sense that it works, since getting stuff should be really fast and doing stuff should usually take some time (eg, move to target or such would take some time).

rich pendant
misty wharf
marsh swan
misty wharf
#

iirc yes

#

They do all run on the game thread, so they would get ran in some order

harsh storm
#

The reason it moves on the client when the server does it, is because it is replicated.

#

There may also be an AI on client setting in the project settings. Can't remember.

marsh swan
fiery glacier
marsh swan
#

and for that link to those notes, they seem usefull in other categories too :D

fiery glacier
harsh storm
#

You go into your project settings. Search for the setting.

#

That is it

fiery glacier
#

Oh also in the project settings, okay let me check them

#

Well it's already checked though

#

This one I believe?

dawn schooner
#

Hi! I wanted to ask about Navigation in a bit of a lower level: In our RTS game, we have a custom movement system, in which unit avoid each other and also avoid/collide against buildings etc. We're researching how to "hook" to the navigation data information so that we can also treat non-navigable areas (mountains, rivers, etc) similarly to how we treat other static gameplay objects.
Basically we need to get the non/passable area polygons to process them with custom logic

slow bobcat
slow bobcat
#

Through that same api you can check if a point in the nav is within X area

dawn schooner
slow bobcat
dawn schooner
slow bobcat
# dawn schooner Yeah, we have the pathfinding setup already <:alex:330044263201112066> But maybe...

Ok, let's see if we can be on the same page.
What I mean by "That's how the path finding works": when obtaining the path between A and B, one of the steps is to check if the next point calculated can be trasversed. For that, the engine (using the detour recast logic) checks the flags.
The same way the DR library reads the flags of the poly involved in the calculation, you can read them too.
One easy way is using
/** Get up to 256 polys that overlap the specified box */ NAVIGATIONSYSTEM_API bool GetPolysInBox(const FBox& Box, TArray<FNavPoly>& Polys, FSharedConstNavQueryFilter Filter = nullptr, const UObject* Owner = nullptr) const;
but if you need something faster, just keep digging deeper (debugging that function) until you get to the low level code in the DR library

#

That call is part of the API exposed by the engine to read navigation data from the world in RecastNavmesh.h

#

another good one is
NavNodeRef ARecastNavMesh::FindNearestPoly(FVector const& Loc, FVector const& Extent, FSharedConstNavQueryFilter Filter, const UObject* QueryOwner) const

#

there's a 1:1 conversion between unreal types and detour types. You can do this kind of stuff

NavNodeRef nodeRef = FindNearestPoly(FVector const& Loc, FVector const& Extent, FSharedConstNavQueryFilter Filter, const UObject* QueryOwner);
const dtPolyRef polyRef = static_cast<dtPolyRef>(nodeRef);
uint32 areaID = RECAST_DEFAULT_AREA;
areaID = GetRecastNavMeshImpl()->GetPolyAreaID(nodeRef);
#
uint16 currentPolyFlags = 0;
dtNavMesh * detourNavMesh = GetRecastMesh();
detourNavMesh->getPolyFlags(polyRef, &currentPolyFlags);
detourNavMesh->setPolyFlags(polyRef, currentPolyFlags |  (1 << node.MyCustomFlag));
#

that's what I meant by the API the engine exposes.

#

Everything goes through the infamous FPImplRecastNavMesh* RecastNavMeshImpl;

#
/** 
* This is a pimpl-style arrangement used to tightly hide the Recast internals from the rest of the engine.
* Using this class should *not* require the inclusion of the private RecastNavMesh.h
*    @NOTE: if we switch over to C++11 this should be unique_ptr
*    @TODO since it's no secret we're using recast there's no point in having separate implementation class. FPImplRecastNavMesh should be merged into ARecastNavMesh
*/
    FPImplRecastNavMesh* RecastNavMeshImpl;
#

if you have your own find path implementation (I understand you do), you definitely came across this kind of stuff

dawn schooner
#

I really appreciate the thorough response πŸ™‚

slow bobcat
#

no worries mate. All this stuff is quite abstract and undocumented.
Once you get the jist of it, you will be able to do cool stuff.
Some examples we do:

  • we post-process the nav on cooking and flag corridors to know the width they have, so we can filter out units that are too big for that (this allows us to have dozens of enemy types and just one nav data)
  • we post process the nav after creating it (we use dynamic modifiers only mode) to purge islands and unreachable polygons (what is usually called Nav Mesh Flooding). This allows us to clean up the nav data so it makes sense without forcing us to place hundreds of nav volumes. Just one per sublevel and then clean up.
dawn schooner
obtuse igloo
#

I might be experiencing a bug? But I’m going by this tutorial https://youtu.be/gsyZdKYAT_4?si=Dlm5kcKQ253SgaTG and I have my noise event on a tick on my character atm that reports noise event while the velocity is over 0 and they’re not crouched.

The ai is perceiving this fine and sending the stimulus for hearing the event but when it switches to investigate, the behavior tree just doesn’t go through at all until the character stops sending events, THEN goes to the noise location?? Anyone have any ideas lol I’m confused

In this Unreal Engine Game development Tutorial you will learn the following:

  • AI Perception: How to setup the AI Perception component
  • Sight: How to get the enemy to attack when seeing the player
  • Sound: How to get the enemy to go investigate a location where sound came from
  • Damage: How to get the enemy to respond to getting damaged and at...
β–Ά Play video
#

I’m thinking it might be because the noise event is being called too frequently for the ai to react but would that pause the behavior tree? Dunno

uneven moss
#

hey all. I have a 4x4 infinite tile grid, where basically if i move into border tiles, the tiles of the opposite direction reposition in front of them. The 4x4 grid system practically 'moving' as the player moves. How would you setup navigation on it for ai agents to follow the player?

I thought about setting its bounds equal to my 4x4 grid and reposition the navmesh when the grid repositions. Is there a better way i could do it?

slow bobcat
slow bobcat
summer hazel
#

Hey im trying to teleport my ai a specific distance from the player or more, i know i can teleport it within a set radius from a location but how do i teleport it to any point that is a specific distance from a location.

dense owl
tribal lintel
#

How often are small machine learning models used? I am not talking about neural networks but simplier machine learning model made with a few hundred 1000 observations.

summer hazel
summer hazel
dense owl
#

No

#

Environment Query System

#

look it up

#

there's some pinned videos here too

summer hazel
dense owl
#

specifically the EQS Querry Context part

summer hazel
simple ginkgo
#

Has anyone used NavLinks with the Detour CrowdPathFollowingComponent? I found that when using that specific component it doesn't actually generate a path that uses nav links, rather it just seems to treat the path as a direct path between areas connected with nav links.

#

This is what that path looks like when using the default PathFollowingComponent

#

This is what the path ends up looking like when using the CrowdPathFollowingComponent

azure bloom
#

Can someone help me? This is in my AIController class, and on play it runs a behavior tree, but when I play the game it tells me it cannot access none of property CallFunc_GetBlackboard_ReturnValue

#

Please ping me here if you know what's wrong

#

Nevermind, needed to define the bool name

obtuse igloo
# slow bobcat Sounds to me that you are retriggering your "go investigate" logic every time a ...

The trigger is the AI perception On Perception Updated event, which switches the AI to Investigation State upon getting a Sound event, so maybe because I’m using that event, it keeps updating too often but idk I’ll have to tweak this tutorial I’m following.

In the video he only does an example for when the player jumps which only triggers a noise event once and not multiple times like I am while the player is moving

azure bloom
#

Anyone know how I can tell the AI to play random audio on sight loss? Is that something I need to do in the tree or?

slow bobcat
slow bobcat
# azure bloom Anyone know how I can tell the AI to play random audio on sight loss? Is that so...

You use the API the Perception system gives you to check if you lost the stimuli your where previously detecting and then use the sound API to play the sound. Plenty of tutorials on how to do both online. Whether in the tree or somewhere else, completely up to your needs. No wrong answer there. You could check in a tree service or in the tick of your perception component and send an event

neat hatch
#

how could I possibily make the ai walk off the edge dynamically?

#

so that I can make the pit detection system

neat hatch
#

not from the "Variables" category

hoary raptor
#

I am not sure if this is the correct place to ask. But does anyone have experience with Smart Objects with Zone Graph?
I do not understand why I get this Error on level start, that is coming from the ZoneGraphAnnotationComponent->ZoneGraphSubsystem:

Error: Ensure condition failed: TagToAnnotationLookup[Index] == nullptr
Annotation at index 31 is already set to SmartObjectZoneAnnotations.

31 is my SmarObject tag. If I have one smart object in the scene everything is fine. If I add two Smart objects in the scene, the error is triggered. Why is this an error then? Of course it will try to add the SmartObject tag for each new Smart Object in the scene, or am I not understanding this whole tag thing?

neat hatch
neat hatch
neat hatch
#

this should do πŸ‘

#

here is what is happening behind the scenes

#

I'm using a box collision that is set to block Pawns, which makes the navmesh generate over it

summer hazel
#

Hey I know I can use a trace test in my EQS to filter out any points seen by the player but how do I filter out only the points not seen by the player?

summer hazel
azure bloom
#

With this setup, how can I play audio once per sight gain/loss?

neat hatch
azure bloom
neat hatch
azure bloom
neat hatch
#

If on sight, do once, if not, reset

#

You need a branch to do this logic

tired glen
#

How could I make a simple "chase the player" AI without stimuli

#

All the tutorials I am finding are doing it with AIPerception but i dont need it

harsh storm
#

Single player?

tired glen
#

What I want is the enemy to run to the character (No matter where he is)

tired glen
harsh storm
#

Make a task to get the player pawn - simple "Get Player Pawn" and store the result in the Blackboard

#

Then have a Move To task and set the key to be the key in the BB that represents the target

tired glen
#

Ok, I will try that

#

@harsh storm How can I store the result in the blackboard?

harsh storm
#

Create a BB key variable in the task
Drag that out to the graph and pull off it and search for "Set value as" and then select the correct type.

tired glen
#

Like this right?

harsh storm
#

Yeah. Mark it as success as well.

#

Or else it won't go to the next task

#

Obviously you want to handle fail cases as well, but just getting things working - this is fine.

tired glen
#

I cant select the Player location key in "Move to"

harsh storm
#

Make it a public variable

tired glen
#

In the blackboard?

#

I've already done it inside the task

harsh storm
#

Show what you're trying to do

tired glen
#

So, I have this

harsh storm
#

And click on Move To, then change the BB key

tired glen
#

Yeah, that's what I am trying

#

But only SelfActor appears

harsh storm
#

Take a screenshot of your entire screen

tired glen
#

I've selected where I'm trying to change it

harsh storm
#

Go to your blackboard

#

And add a new key there

tired glen
#

I've already added it

#

idk if its that the type is wrong

harsh storm
#

Should be fine. You can't really select "actor". Like, you can expand the dropdown on the type and select actor.

#

Try restarting the editor.

tired glen
#

I've already done that too πŸ˜…

hearty bluff
#

How would you guys work with navmesh on a RTS with procedural map, I'm using dynamic navmesh with invokers but it's bad, if I want to send the character to go somewhere far I need to do some workarounds building several points with max distance of the navmesh, it's so much stuff that it seems I'm doing it wrong... (probably the case)

dense owl
#

And for a large map I think people use level streaming

hearty bluff
#

@dense owl what you said is what I have, using invokers with dynamic navmesh generation and it's bad.
Streaming is used for small/mid size maps, not massive open worlds. What brings me to Partition Map that I don't know how it works with nav meshes.

sacred marten
#

Hey guys! Is it possible to make AI ignore each other in perception? Whenever my AI chases player, they start to interfere with each other and losing sight of player because he is being blocked by other AI

#

issue can be described like this

hearty bluff
# sacred marten issue can be described like this

I believe there are several approaches for this, I would use a grouping mechanism with event dispatcher to alert all AIs from the group (could be like: guards in 5 meters) and disable the perception once this happen. When player gets too far, reset the AI turning everything on again.

#

Another possibility is to store the last time the line of sight hovered the player and force the AI to move there

#

This would make the player able to run in circles of an object and run away easier, since AI will go to the last place it saw the player

sacred marten
#

Currently I have a setup where AI stores last seen location and goes there, but it doesnt help much, as the last seen location is also being blocked, so he tries to seek for a player and randomly might get a chance to see him again if a gap between AI's that already chasing players appears but it doesn't work really well

#

it's really strange that I can't feed some class to perception system to completely ignore it (ai base class for example)

#

and if I disable perception system, how can I track that AI actually lost player due to obstacles, if perception system is disabled, wouldn't it always chase the player no matter what? Because losing player out of sight is being drived by perception system also

hearty bluff
#

Did you check the collision channels to try to filter the line of sight?

harsh storm
#
  1. You need to set up the team stuff. That is in C++.
  2. When the perception event happens, check if they're the player. Only register them as a target in your BB if it is the player.
sacred marten
#

yeah I tried different combos (visibility is first that I tried) and nothing helped really

harsh storm
#

You can do one of those two things

sacred marten
#

but it still block other AI vision by any AI

#

its pretty simple setup to filter player only

harsh storm
#

And how do you clear the target value?

sacred marten
#

here I clear it

hearty bluff
#

so if the LOS gets interrupted, it clears things but you already saw the player and never really finished your move

#

seems to be a state problem, you don't have the player set anymore, so you just go for idle/searching instead of waiting the AI to get to its destination and than change

#

I'm not a pro, just trying to help tho πŸ™‚

sacred marten
#

thank you πŸ™‚ hm, but I don't really know any other way to handle this

hearty bluff
#

You can have an additional state, that could be called "investigating", if you don't have the player set and this bool True, it doesn't change to idle/searching

#

whenever you see the player, you set this false, when you lose the player you set it true, when you reach the position, you set it false

sacred marten
#

I'm also thinking about something more stupid, like if Stimulus sucessfully sensed becomes false and it goes to last seen location, I can just throw trace to check can it actually directly hit player and if yes - set it again in BB as target

#

like here, check it with trace and then if it's hit - set target, if not - then it really lost sight of player

#

ofcourse with custom trace channel to actually ignore other AIs

hearty bluff
#

I believe that would work, but if you don't have the investigating state, at some point you'll need it anyway πŸ€”

sacred marten
#

I do have it, and it works whenever LastSeenLocation is set

hearty bluff
#

oh got it

sacred marten
#

so AI start to investigate last point where he seen target

#

like so

#

so he basically goes there, randomly wanders around for 5 times and then resets if nothing found

hearty bluff
#

nice

#

So yeah, line trace should work

sacred marten
#

will try it, thank you for the help πŸ™‚

dense owl
solar oriole
#

Hey guys! I'm having trouble with my AI navigation in Unreal Engine 5.
I've got an alien character and some walls that should let him pass through, but the AI MoveTo keeps failing. The NavMesh isn't blocking the walls, and I've already set the walls' collision to ignore for the alien, but the AI still won't move. Everything else (NavMesh, collision settings, and movement component) seems fine, so I'm stuck.

Could anyone hop on a voice call so I can screenshare and show the issue? Would really appreciate the help!

dense owl
solar oriole
dense owl
#

Hit Start to begin recording, then run your game until you experience the issue. Stop both and then click on each of the AI Controller's frames and read the output log

#

the problem one may or may not be highlighted in red

solar oriole
#

ok, i guess its working now? i dont know what i did but its working and doing what i need it to

dull plinth
#

Hey peeps, a general best-practise question. When I have a custom 'move to' and 'rotate towards' function. Would it be better to add this functionality on the Controller instead of the Actor?

slow bobcat
harsh storm
#

No one reads pinned messages anyway

tired glen
#

So, I did this code so that a npc follows the enemy at any moment

#

In the Behavior tree

#

Then I tell the AI to move to the character, but i cant change the key in the move to for some reason

#

any idea why?

dull plinth
#

It only allows vectors and actors

#

I have another strange question. Why is it designed that the AIPerception Component should be placed on the controller and not on the actor(s)? I would think that I might have several different actors with different (perception) stats and only one general controller. But now it seems I need different controllers for different actors

#

Why is APIPerception Component not like the movement component for example

tidal lichen
#

Hello, I have a bit of an issue with my AI.

I have a deer AI which is meant to run away when you come near it and spook it however it just freezes in place. We checked and it seems to get stuck looping it flee action in the behaviour tree.

But this only happens for me. Not anyone else working on the project. I have completely redownloaded the project and double checked Im in sync. It even happens in our steam version of the project but again only for me.

Also this only happens on our main map, we have a test map where it seems to work fine.

Anyone have any pointers to what the issue might be or things I could try? Thanks!

misty wharf
misty wharf
raven stone
tidal lichen
raven stone
#

GOAL:
I want enemies, when searching, use EQS to only go to places that would logically be in the (pathfinding) direction of "searchpoint" relative to "searchstartpoint". So if room a is in front of them, and room b is behind them, and search point is in roomA, never validate eqs items in room b because its impossible.

The way i'm looking to achieve this is by using "dot" to compare
the first direction the ai would go when PATHING to the sound location
to
the first direction the ai would go when PATHING to the eqs item

PROBLEM: for the "policeruntoitemeqs" context, i need the current eqs item referenced as a vector IN the bp. I don't know where i can get that, or if i can get that

attached is the eqs test, and the bp of the context that IS working, "policeruntosearch". all i want is to replace "search point" with the location of the item

raven stone
#

well you know for sure that its only an issue with your setup, so id say the next logical step is to find any possible differences between your computer and your teams that could possibly impact the code. my suspicion is it may have something to do with timers, delays, order of execution etc

misty wharf
#

Finding the difference isn't really that useful, you need to identify the thing that is actually happening regardless

#

So you just need to start from the usual debugging steps being identifying why it isn't working and you can work it out from there

raven stone
#

Facts

dapper spear
#

Do you disable tick on ai after death for optimization, both character bp and anim bp? I am using the enable tick events set to false on both bp. Some also set the anim bp to null as well

undone rune
#

for flying AI should use navmesh or something else and if should use navmesh what is required setting

tidal lichen
#

Just not super familiar with the visual logger so taking me a bit of time πŸ˜…

misty wharf
#

click record, play game, look at the little markers in it to see what happens, it should show in the log panel further details on what's going on with movement, BT, etc.

tidal lichen
#

So if I understand this correctly it cant find a proper destination? and then it just keeps trying and get stuck?

misty wharf
#

Yeah looks like that's the case. If the move fails, the BT node will fail, and depending on how your BT is structured that could certainly cause it to repeatedly try it

tidal lichen
#

Think on investigating its something to do with this part as the behaviour tree makes it try to run this every half a second and the result is meant to be the flee location which never appears.

proud plume
#

does anybody know if statetree binding works with structs? I can't bind FGameplayTag

proud plume
#

nvm, it's because the supposedly output is not accessible at that state, my bad

undone rune
#

how can create a flying AI and waht should i do...?

lyric flint
#

I didn't start coding any AI logic yet in my unreal project for the enemies in my game but I would need some insights about it, should everything be done in BP with behavior trees or some specific part in C++? I also don't know where to start with it.. (can GAS be used lol)

brisk palm
#

Hey everyone, I was wondering if anyone has tried using state trees in a game they have shipped or are planning to ship

narrow mason
neat hatch
#

I noticed that the ai turns back after jumping

#

this happens during the Move To behaviour

#

I think I need to make it keep going towards the last front facing direction while in air

#

yeah so if the ai is too high, it starts getting lost and tries to go back to the last known position when it was grounded

#

this messes with the obstacle detector and makes it jump for no reason

dense owl
#

Well yes, the navmesh is made for ground based navigation

#

To make something fly you either have to fake it, increase the projection to navmesh distance or build your own custom solution

neat hatch
#

I think I have an interesting workaround for it

grave meteor
#

Hey, I'am completly new to AI Stuff. I want an NPC (animal) that follows the player. However, not stubborn, but who sometimes gets lost in other interesting things or is distracted by triggers. can someone tell me which "topics" I should take a look into?

narrow mason
#

Its not really a complex topic unless you also want to learn how to implement other behaviours

#

Your first branch in the behaviour tree will do the distance checking and evaluation. If that's what takes priority

still lark
#

question, why my task doesnt stop? even if i run Finish Execute all the nodes still runs. basically it should pick a tasks number, run the timer and then timer reaches >= 1 pick another task. what i am missing with this?

Edit: firs image task runing, second image task still runing then it reaches 1, third image my BT

pine spade
#

Is there a reason why AISense_Damage does not trigger a Successfully Sensed = false update event when its Max Age has expired? It works with Hearing sense. Does damage behave differently?

#

Talking about this event and struct

pine spade
#

I also can't get the GetKnownPerceivedActors function to remember any actors that inflict damage. Hearing and sight seem to work fine.

#

The damage perception event is correctly registering my player pawn as the damage instigator. Damage sense lifespan has been set at different float values and also 0 (infinite)

dense owl
solid spire
pine spade
dense owl
pine spade
#

I'm on 4.27, if that matters

dense owl
dense owl
brisk palm
# dense owl Why

Im interested in using it in my project and wanted to know what other experiences with it were.

trim bone
#

So I have this weird bug where either sight perception isn't working or traces are getting block, but only in the release build. Anyone have any ideas what could be doing that or have some good ideas on how to figure it out?

slow bobcat
trim bone
grave meteor
#

I will dive into some videos πŸ™‚

slow bobcat
# trim bone it does have c++. When you say "test build" what do you have in mind? (sorry if ...

When you make a build, it can be:

  • debug: all code is unoptmized so you can debug it fully (even the editor/engine)
  • debug game: like above, but only for the games' code
  • development: highly debugable but some code will be optimised
  • test: most debug tools will not be available, code is optimised but you can still debug it (like in development)
  • shipping: no debug tools, no debugable code
#

You could try and see if you bug happens only in shipping or if it happens in test too. If it happens in test, you can always check code and print logs (I think logs are still available in test)

summer hazel
#

Hey I'm kinda new to ai so this might not be the optimal way to do it but I have a task that randomly selects if my enemy is gonna retreat attack or stare at you when spotted, if I were to make the stare retreat and attack logic inside other tasks can I execute them based on the outcome ? Or should I try to do them inside the task(which might get a bit messy)?

neat hatch
#

changing this value to something else other than the default setting bugs the ai for some reason?

#

Tile Size UU

#

actually changing anything in the recastnavmesh makes the pathfinder become bugged out

dense owl
neat hatch
#

yeah but I need the max step height to be as high as the jump height so I can make the ai reach the destination quicker

#

really don't get why everything has to bug out for no reason....

#

so far the most effective solution is to remove the recast and rebuild the navmesh

#

after that I can freely change the max step height and stuff

#

baffling that epic hasn't done any fix for this

slow bobcat
neat hatch
#

the recast

slow bobcat
slow bobcat
# neat hatch the recast

Yeah, bad idea. Because you change those settings in the recast, regenerate and they are gone. Try changing them on the project settings

#

What kind of bugs are you experiencing?

neat hatch
#

ai simply not moving anymore

#

what made me think it won't bug out is cause of how the setting for the debug objects is shared between the project settings and the recast

slow bobcat
#

Then try that: change them in the project settings and double check your movement component settings make sense with what you are getting (so AI actually can move)

neat hatch
#

so I was thinking maybe changing the settings in the recast would also be changed in the project settings aswell

#

but now that I'm checking those settings in the project settings editor, they did not change

dense owl
#

Why would you think that

slow bobcat
#

No, the recast object in the scene is an instance created using the project setting

neat hatch
#

I see

slow bobcat
#

Honestly, certain settings are accesible in the instance because... Reason XD

neat hatch
#

right...

slow bobcat
#

But that doesn't mean they are intended to be changed in the instance

dense owl
#

Changing stuff in the blind just broke things for me πŸ˜€

slow bobcat
slow bobcat
#

Changing things blindly is somehow a default mode of development in unreal it seems

dense owl
#

Prly because there’s no actual docs besides the source code

neat hatch
#

now that I think more about the settings...
would there be a possibility to have different ai's be able to pass through certain obstacles?
like, this ai is able to double jump so it can pass through taller obstacles while the other ai cannot so it needs to go around it

slow bobcat
#

Yeah... Kinda. It would be a mix of nav agents, nav areas and smart nav links for the example you wrote

neat hatch
#

without nav links tho πŸ˜„

slow bobcat
#

That's gonna be tricky, but doable. There's some info here in this long chat about that

#

But honestly, easier to create a BP of the obstacle and set some smart nav link components

neat hatch
#

hmm

slow bobcat
#

Either that or... "welcome to the nith ring of hell: vaulting mechanics"

neat hatch
#

I myself was thinking more like having different navmeshes that have their own recast settings

slow bobcat
#

It's not that bad, but it takes time to nail it down so it doesn't look uber buggy

neat hatch
#

this recast has its agent max step height to 200 and this recast has its agent max step height to 50

slow bobcat
neat hatch
#

but I suppose there's no option to make ai controllers use specific navmeshes?

slow bobcat
#

And nav will be generated on top of objects etc. Gdc talks about death stranding AI are pretty good for that. Also horizon zero dawn talks

slow bobcat
#

Careful with that because memory usage goes up, specially in big games

neat hatch
#

hmm

slow bobcat
#

Imagine you need 10 different nav datas. If you generate all over the map, you get your nav x10

#

Ideally not all your levels will have all the nav areas. Unless you can have every enemy in every corner of the map, you only need nav data for the enemies you have

neat hatch
#

hmm, looks like its impossible to have more than two recasts tho

#

this takes away that idea

slow bobcat
#

If you watch a HZ talk, you will see they handle big and small robots this way. They show a big rock split in too. Big guys go around, small guys go inbetween

slow bobcat
#

Nav agents in nav projects settings

neat hatch
#

no like

#

having two navmeshes with the same dimensions, same place

#

and attempting to duplicate the recast nav mesh does nothing

slow bobcat
#

Can you explain more?

  • you have 3 nav agents with different settings
  • you place a nav volume that generates for all
dense owl
#

Yeah, it’s not how it works

slow bobcat
#

And you only get 2 out of 3?

slow bobcat
neat hatch
slow bobcat
#

From this moment on you have homework: read how navigation generation works in unreal, there are tutorials and docs. Keep an eye on nav agents

slow bobcat
# neat hatch

You don't need more than one volume for what you want

neat hatch
#

I see

#

also I'll be busy for quite some time as I'm currently on my way to making the ai less broken when it jumps

slow bobcat
neat hatch
#

when it jumps, it leaves the navmesh and becomes confused as it does not know where it is

#

so it turns back

#

this place for example

#

here is where its scripted to double jump

#

and that moves the ai upwards alot more

#

if I would've moved that platform a bit further away, and the ai turns back

#

into the void it falls

slow bobcat
#

That's what nav links are for. Not saying you can't handle islands and jumps in between any other way, but nav links will help you

#

An about turning back, makes sense because it thinks it can walk (there's nav), then the CMC says "oppps.... No floor mate!", and off it goes

neat hatch
slow bobcat
#

Yeah, there are other good ways.

neat hatch
#

reason why I'm avoiding nav links is because they are required to be placed in specific areas, and it makes the ai go to the specific place that could allow it to pass through an obstacle

#

how to make the ai be less specific? more nav links

#

you see where this is going? πŸ˜„

#

oh! so having separate nav agents is actually that simple! nice πŸ‘

#

I only needed to watch 2 minutes of that video

#

:))

slow bobcat
#

Yeah, I get why you have the volumes. For me the problem is more in the lines of "I don't want to place a nav link because of what you just said, but also don't want to place a volume that will need to be adjusted when the level changes".
If I was in your position, I would do soemthing like a special navlin that has both, the nav link and a volume. The volume simply marks an area with a special flag "jumping". Post process the path, upon finding a nav link, find a point within that area in both sides of the nav link, replace the nav link start/end points with those. Then OnTakeNavlink do the jump stuff I need (animation or whatever). I would probably check other things when deciding for the entry/exit points within my jumping area, like other pawns present

#

If the code of that feature allows to tweak the nav link class spawned, a way to mark in the asset and in the levels where to generate them, that's all you need

neat hatch
#

I do have my own nav link system which is more dynamic πŸ˜‰

slow bobcat
#

But haven't checked. If it also has a way to group them when generating (like the nav area, but for the group), that would be awesome

#

With a flag line that I could tweak what area they generate based on level conditions

#

Are those physics line traces?

neat hatch
#

first its a multi line trace which will detect up to 2 surfaces

#

if it has detected only 1 surface, its an obstacle that can only be jumped over, if it hits 2 surfaces, the ai can also choose to go under it

#

but only if the space under the obstacle has a minimum space that fits the ai character

#

if its lower than the minimum specified space, that area will be skipped

#

and the ai will only jump over

#

after the multi line traces, single line traces will be fired from the ones that returned a hit under the obstacle

#

thats how it reads the space under the object

#

if one of the line traces has its start and end too close to each other, the space under the object would be too small for the ai to fit under

#

of course, this is just a prototype

#

I can already see the cons in this as what I have made is still incomplete

#

I'm also making sure the obstacle detector does not fire every frame

#

I'm using a Timer for it

trim bone
slow bobcat
# neat hatch I'm using a Timer for it

I have 2 questions:

  • how do you calculate a path in between islands? Are you able because of the image above, the volume allows for nav creation?
  • when are you firing that trace thing? How do you calculate where/when to trigger it?
neat hatch
# slow bobcat I have 2 questions: - how do you calculate a path in between islands? Are you ab...
  1. yeah, I'm using a box collision that is set to block pawns, and then is set to overlapp all dynamic upon starting the simulation
  2. First it reads the ai's location, then it is multiplied by the forward vector, then offset the Z location by the max possible jump height, and if the hit location is higher than the max possible single jump, the Z spawn location is subtracted by a small number to correct it because of a restriction I put before double jumping.
    And to make sure this works well with complex meshes, the line traces will start a couple cm towards the ai for a more accurate obstacle reading
#

the left side of my brain is smart, but my right side that does the talking is atrocious, sorry about that πŸ˜…

slow bobcat
neat hatch
#

Once it detects an obstacle that can be jumped over or slid under, it then goes through a few loops

#

First two loops creating those rows of line traces

#

And storing the data in arrays

trim bone
#

so I sort of figure it out... seems in the built version the AI don't see me as an enemy anymore and I had the perception set to only detect enemies... weird... any idea why that would be different in the build?

lunar cedar
#

i think im overcomplicating this. basically what im making is the old school COD zombies barricade. zombies walk up to the barricade with 3 of them being positioned close enough to pull boards off, the rest wait behind them. the way i have it setup now is a barricade actor that has billboard components (lets call these positions) for positioning. these positions are either marked as zombie (position that pulls boards off the barricade) or wait (waiting for a zombie to die at the barricade so it can move to that position). when the zombie spawns it gets set a target barricade which in turn links the zombie to one of the positions. when it is linked a position the position is considered used and no other zombie can use it. so if 4 zombies spawn, the first 3 will go to one of the zombie positions (the top 3 in the picture), the rest will go to one of the bottom ones and wait. when one of the zombies in the zombie positions dies, it broadcasts a change which all zombies targeting this barricade are bound to which will perform a check. if the zombie is in a waiting position, it will move to that newly opened zombie position (its kind of first come first serve). once all the boards are broken off, all the zombies go to the root of the barricade, once reached they will perform a vault montage (root motion) to enter the play area.

this works but has its own set of issues such as sometimes a zombie may get turned around so when it goes to vault, it vaults away from the window instead of through it. likewise each zombie kind of bunches up when its time to go through the window, im not sure on a good approach to make them kind of go in an orderly fashion (one after the other cleanly). im fairly new to ai, im not using behavior tree or state tree for this since the actual zombie logic once they get into the level is dirt simple. everything movement is done with AIMoveTo

harsh storm
#

Sounds kind of like a smart object setup to an extent. Either way, this is kind of common. Sounds like you just need to build a queue. So when they claim a spot, they get put into the queue. Then whoever is next, you just grab it from the queue and when they get to the window, they check what they should be doing. Climbing or removing a board.

#

So, they all don't get to go at once.

placid silo
#

question about behavior trees: when you have a selector with 2 children, for example, the child on the left performing a task and the child on the right having a decorator that "Aborts Both" when the condition is satisfied. If the one in the left keeps returning true, when will it actually be interrupted by the one in the right? Because it seems that even the condition in the decorator should return true, that decorator isn't even evaluated.
After asking Chat GPT, it said that something needs to trigger a re-evaluation of that decorator so it can abort the higher priorty (the one in the left). And a re-evaluation is triggered by whether the blackboard in the decorator changes its value? Is that the only way to get the tree to evaluate that decorator? What other ways are there to do so?

lunar cedar
velvet siren
#

Hello,

I want to make a combat system where the Ai reacts to their opponents hit direction. So if the player hits left then it blocks in that direction. If they attack left but a bit lower, the blendspace would blend according to that. My problems are:

How do I dynamically pass the changing hit direction to the enemy when the player moves their camera, strafes, jumps, gets knocked back, whatever would change the angle of attack so that the Ai could react dynamically during the swing of the sword? I have method of tracing the sword but it doesnt predict the future swords path, which I'm not sure if would be necessary or even a good solution.

How do I implement a blendspace that could blend according to the dynamically changing vector?

Even if you don't have a solution, advice would be helpful, thanks.

harsh storm
lunar cedar
rancid surge
#

Can someone please help me, I feel like I'm losing my mind. I remember pretty well that some time ago I managed to visualize the path my AI was following with some balls on the ground linked by a line. Nothing crazy, but very useful, however now I cannot manage to visualize it again. Can't find anything like this on the internet neither. Did I dream about this or is it just pretty hidden?

still lark
#

i have some questions about AI controller and behavior trees, so i have 3 different spiders who are child of main AI actor, can i reuse same AI controller and behavior tree for them? or do i need give separate AI controllers to all of them? my all AI logic was in AI actor and its controller, but want to get to behavior trees and bit expand my knowledge.

echo lark
#

Bot start at point A goes to point B. I start immediately start looking for new path when at B. There is significant delay before bot start moving again.
Is there some log or sth, which show how long is pathfinding taking ?