#gameplay-ai
1 messages · Page 67 of 1
hey, sorry. Forgot to reply.
Ignore everything I said. Since I did all this (3 years ago aprox), there's been changes in NavLinkCustomComponent.
You now have this method to check that kind of stuff
allows you access to the querier and, from there, you can access the data
the one thing I still think you can't know is the direcctión in which the nav link is being taken, which was a must for us: some AI's can go up and down, others only down
So it was not just a matter of the height of the navLink but the direction too
that's said, maybe there's a new way to figure it out
that's helpful, I'll see what i can come up with
thanks!
wish the docs for this stuff were better...
I had to do this pretty much (plus the engine mod where the function is called).
The upper part is what the engine offers (which calls the function mentioned in the reply above)
Our engine calls our custom function in the engine
would be nice if future versions of the engine could pass a struct wrapping all the data of the path request assessing for the nav link in question
Really digging State Trees.
Have some thoughts that hopefully those who have spent some good chunks of time on them with can answer them for me, but first I want to give a tidbit of context.
I am very comfortable with figuring out what the AI needs to know in order to enter a state. That is not a problem for me to document and structure out before coding.
With that said, the primary thing that has me in a loop is knowing where data should be processed.
I feel like "baby's first state tree" would look something like this (ignoring the patrol section):
But what is getting at me, is that I can't figure out what would be the most efficient way for the State Tree to determine to switch to a new state?
Possibilities are massive with these.
-At the end of each task, evaluate a state change
-On a evaluator, evaluate on tick if state is changed based on variables
-Global Task to execute constantly determining new state
-Only check if you enter a new state at the end of state tree groups?
I have pros an cons to each of these but I am really not sure what direction to head with them. I think I dislike the thought of having the end of each task check even though it would be a more immediate switch (sort of, barring the task itself doesn't have delays) because it doesn't feel as manageable in the long run (debugging would be a pain).
this
So what I would do then is override NavLinkProxy and replace the NavLinkCustomComponent with my own subclass in the constructor of the proxy?
Do I understand that properly?
SmartLinkComp is private in ANavLinkProxy so I'm not sure how I can replace it.
How could I make it so that an enemy follows the player (Without sight) and when he is on range (And nothing blocks him), he starts shooting the player?
In a behavior tree
Yeah. Exactly that
Ummm really? I could swear I saw someone here overriding it
From what I can tell, the navigation system registers all INavLinkCustomInterface instances automatically so could I just create a new component and attach it? That seems super messy and I would obv rather replace the built in one.
Ok the pointer stored is private, but where it's created... Is that something you can mess with?
that's fine then. You can use the object initializer to assign a different one in your child-class constructor. Something like what the shooter character does in the project example
AShooterCharacter::AShooterCharacter(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer.SetDefaultSubobjectClass<UShooterCharacterMovement>(ACharacter::CharacterMovementComponentName)
)
do that, but with the UNavLinkCustomComponent
Awesome, thanks!
Just posting for future reference. Again, thanks a bunch @slow bobcat
Super(ObjectInitializer.SetDefaultSubobjectClass<UMyNavLinkCustomComponent>(TEXT("SmartLinkComp")))
{
// Don't need to do anything.
}```
No worries. It's weird how the usage of the Object Initializer is one of those spoken secrets. Back in ue4 that was the way to set the crowd component
Hi friends, I'm trying to learn, so I have a simple solution to my issue, but I know there has to be a better one
I have an AI with enum states for MoveTo, Attack, Stunned, and Dead--I'm using some tick to check states, SO when I enter dead, it eventually changes states again so that the AI jumps up from dead and attacks before it disappears. I could lower the timer for when it disappears, but I like the amount of time the dead body shows on screen--and I know I could do a bool for "IsDead," but there has to be a more elegant solution?
IS there some way to let the Blueprint know I no longer want it to run the tick function, for example, or to tell it to disable the enum state changes by removing the state from the character, etc.?
you are using behavior trees correct?
instead of checking tick why cant you send out events?
I'm not, because I need more customization than behavior trees allow for
Oh, right, I could try to figure that out
PrimaryActorTick.bCanEverTick = false;```
you can also set bCanEverTick to false
Oooo okay, this might be the easiest for my skill level! Thank you!
np see if that works
I been mesing around with state trees and they seem to offer some more customization, check into that approach as well
I must have a bigger issue cause it did not lol
send a screenshot of where your logic is at
if you are running logic in the tick function which should be reccommended in my opinion the best you can do that i can think of is just hace boolean checks, check for the current state fist of all if [state] == death
where is the become deceased function getting called at?
i dont see the pin connected from the switch
this is where im looking at
Sorry, yes, I am super new, and this has been built over the year using different tutorials/tutors, etc.
just to keep everything simple i would just check to see if the ai is dead before you even perfrom any logic related to attacking, moving or etc, because im assuming that receive attack function is called in event attack function
so i would first have a branch that checks if the state == death first and on true perform your logic, then false would hook up onto the next branch
or you can move this death check to the event tick, check it first
Thank you! For now I went in and added that check before ever changing the state, it worked--I think there might be some places where I've over-programmed it so it was changing states when I didn't need it to, cause even with that check just on tick, it was still changing after death, so I'll also be going in and trying to simplify
This has been re-uploaded, not sure why. Maybe a better edit? Would be nice to have it in the pins
https://youtu.be/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...
<@&213101288538374145> ^
Hi I have a problem with Learning Agents, should I ask here?
can i use query enviroment system to make the ai work like minions in league of legends?
the query enviroment system can avoid the ai? is this system for that?
can i use envoriment query system to avoid the ais taht they dont block each other?
Hi. Only the first EQS execution does a frame freeze and warning is throwned out: LogEQS: Warning: Query EQS_FindTargetPlayer_SingleResult (Owner: C_MeleeBright_C_0) has finished in 569.90 ms, exceeding the configured limit of 25.00 ms. Execution details: Total Execution Time: 569.90 ms. It seems that it loads up without cache and after the first execution just caches EQS.
Did remove EQS and frame freeze was gone (obviously because it's due to EQS), changed EQS by removing parts of it and even at the base line of just "Get actor of class" it still was freezing. So it looks like that it's nothing related to Actors perceived by Querier node.
What could be the reason and how to solve it? Seems some kind of load needs to be done initially or something else, got no idea.
This means your eqs is doing a lot of things or just a few that are very expensive on cpu. The freeze is your game thread being stalled. Get actor of class is expensive because it will loop all actors in the level and check one by one if they match your type. The more actors, the lower it will be
Also never seen a query with 2 generators doing two things at the same time
I don't think that's a good idea
But it only happens once at the initial execution. First AI actor that runs EQS get's this warning and for the result of the game loop there's not a single freeze of EQS.
Even with a single one it still freezes up
It's just the first execution, like it's loading EQS in general up and then freezes
Oh... That's odd...
Could it be because you have 2 generators depending from the root?
Have you tried to just have one thing?
Just now tried this and it froze up for that single execution
It's just the first execution that causes this
Default node, nothing added to it
With profiling, average is fine-ish, but the worst one is just ... That one freezing execution seems strange
If you open Visual Logger, what does it say about the eqs? 634ms sounds like your querier is perceiving lots of actors
In vis log you will see how many are being gathered etc
This one is just a circle around the querier, that should be super fast
Okay I'll take a look at it
Yeah that's the thing, even nothing like that freezes up for that one first execution
How are you running the eqs? Can you show us?
What I would do in your case is to check VisLog and, if that doesn't explain anything, I would make a build (development should be OK) and run insights on it with statnamedevents and cpu traces
Filtered by EQS, I'm not seeing anything there aside of that warning. ANd by graph doesn't show up anything? Haven't really used vislog that much. Second image dropped with BT just in case.
But what could be the reason why it's so slow only for the first execution? Because it never occurs again afterwards.
No idea. The generator, is it a custom one or a vanilla generator offered by the engine?
Also, can I see the service that runs the eqs?
You could do a test: remove that service, run the eqs from some BP begin play for example, see if you have the same issue. If you don't, it might be something related to the bt
If none of that helps, I recommend you make a build with project launcher and use unreal insights to see what is really happening
Vanilla generator, nothing custom there.
Alright I'll try out running it without BT and check it that way.
It really seems like a bug in the Sight Sense logic where it's caching the initial position and not counting it until I move. I'm trying to dig through the C++ but haven't figured out exactly whats going wrong yet.
A couple other things I tried:
- Setting MaxAge = 0.5 to force a refresh of initial detection / clear caching
- Setting AutoSuccessRangeFromLastSeenLocation to like a million
- Setting StartEnabled = false on my NPC AIController and turning on after a 2 second delay
Also note the InRange versus OutOfRange doesn't change between the two. The sight sense is correctly finding my player, it's just not triggering the perception event until I move.
but there's one thing I still haven't seen and I suspect that might be the problem
OnTargetPerceptionUpdated is a delegate to which you have to bind. Can I see where are you binding to it? You mentioned the Event Grapgh, but where/when?
you have these event to subscribe to
OnPossessed in your AI Controller, grab the AI Perception Component
From there, look for Bind To On Target Perception Updated
like this
isn't this supposed to automatically bind for me?
i will try this though just to see
not sure. In code we handle like how I show you. Worth a shot. If that doesn't work, it's something else then
testing a new build now
in code it's pretty clear that you need to bind to it or it will never fire
yeah i saw that
unfortunately that didn't help.
i'm 99% sure the blueprints has an automagic binding when you click that + button to create a new blueprint event handler, because it's the only place I'm setting the blackboard Target value to the AI behavior tree, and it's triggering. just not until I move.
i guess my next step is to get a debugger on this and step through whats going on in the engine code.
yep. I would set a breakpoint in that piece of code.
When your case happens, is your player just spawning in idle and in sight of the AI or is the AI walking towards the player and not detecting it?
so in this case the player has spawned a while ago and NPC is newly spawned. the player is within the sight radius upon spawn.
the AI is moving towards the player and not detecting it
{
SCOPE_CYCLE_COUNTER(STAT_AI_PerceptionSys);
if (!IsValid(&Listener))
{
UnregisterListener(Listener);
return;
}
const FPerceptionListenerID ListenerId = Listener.GetListenerId();
if (ListenerId != FPerceptionListenerID::InvalidID())
{
FPerceptionListener& ListenerEntry = ListenerContainer[ListenerId];
ListenerEntry.UpdateListenerProperties(Listener);
OnListenerUpdate(ListenerEntry);
}
else
{
const FPerceptionListenerID NewListenerId = FPerceptionListenerID::GetNextID();
Listener.StoreListenerId(NewListenerId);
FPerceptionListener& ListenerEntry = ListenerContainer.Add(NewListenerId, FPerceptionListener(Listener));
ListenerEntry.CacheLocation();
OnNewListener(ListenerContainer[NewListenerId]);
}
}```
there is definitely a fork here in terms of what this does on first registration of a new perception component versus future updates.
try calling RequestStimuliListenerUpdate from your AI as soon as it's possesed after swpaning, out of curiosity
it's a function in the perception component
yay thats exposed to BP let me try
sadly didn't help. i am somewhat convinced what is happening is that it's caching the target in NewListener without firing an event, and then thinking it's already fired on every update
That delegate doesn't fire constantly, only when things happens
thats what i mean
First detection, when the target moves etc
It's super weird you don't get the very first one. If you set a breakpoint in the code for the very first call, does it stop?
if i'm forcing the UpdateListener through the RequestStimuliListenerUpdate and it's not firing, it must mean it thinks its already fired
yeah i need to give that a try
unfortunately my PIE and local server flow is broken since i did a platform orchestration integration 😦 need to fix that before i can get a debugger on this server side
maybe it's time for sleep heh
thank you so much for all the help so far dude
no worries... let us know how it went
/job\
-+<job>+-
can i use EQS for minions dont block each other?
Hi, I have a EQS related question:
Is there a way to run EQS on client?
I'm using EQS out of AI context, I want to run my EQS locally around the vehicle to generate location where my player will be placed when he exits the vehicle.
I've setup all the logic, but after debugging I found out that FEnvQueryRequest::Execute returns
UEnvQueryManager* EnvQueryManager = UEnvQueryManager::GetCurrent(World);
if (EnvQueryManager == NULL)
{
UE_LOG(LogEQS, Warning, TEXT("Missing EQS manager!"));
return INDEX_NONE;
}
Seems like EnvQueryManager exists only on the server, as AI is mostly driven by the server.
if you already have logic to modify a calculated path (you could use post process path I guess), you could use a custom eqs to check if you path goes to close to an AI, calculate points around said AI keeping some distance, then returning those points from the eqs and add them to your path (through that logic that modifies the calculated path). You will probably also keep track of the AI's that affected your path so you can re-path whenever they move. Will make path calculation expensive (will take long), but it's a start. Not sure how you will deal with the issue of re-calculating paths every time an AI moves and check if said AI's location is worth the re-path+eqs. I can see that logic triggering non-stop. It's doable, still better to implement stearing behaviours.
I'm building a game that is stage based (there are rooms and the camera moves to each room upon completion). I need to have a navmesh in each and it needs to spawn the navmesh at runtime. I can't spawn an ANavMeshBoundsVolume and scaling one in the level doesn't work for us. The stages (actor) are also spawned at runtime (via button) so it needs to spawn with the actor. Any insight on this would be greatful.
If you make each room a sublevel, you can have a nav bounds volume in each.
Then build the nav with all the sublevels visible (I'm assuming you are using Static or With Modifiers Only)
Whenever you stream-in a new level, the nav will stream in with it (and the other way around when you stream out)
I should've lead with this portion of the game is for the level editor for players.
so... you have a level editor that should "automagically" add nav volumes to cover the entire level?
Not the entire level, but each room.
do players use some form of construction block for the floors? like a tile or something?
No, they just press a button to spawn the room and then they place things in it. When they press the button we're wanting to have the nav already in it.
Basically like this. 3 rooms and the nav would only exist in each room.
ah ok... um... you are forced to use dynamic nav generation then. Can they scale the rooms? or are they predifined by you? as in "rooms are always 3x3 or 2x2 (depending on the "model" selected)"
They can scale the rooms, but only at creation time.
Then, whenever they finalize the setup, I'm guessing they have some accept button they need to click. It will be at that point where you will need to grab your nav modifier volume (either spawn it or grab one you have wich every room, that has the default size of the room) and scale it to fit the size set by the users. Since you will be using dynamic generation for the nav, as soon as you start playing in the room, it will generate nav for your volume
can't say tbh. The only part I could see being a problem is the scaling of the nav mesh volume. The rest is just adding a nav volume to the levels you use as rooms
Create BTTask_RunStateTree and BTTask_RunDynamicStateTree that allows the execution of state tree in a behavior tree
Interesting 🤔 (5.5 changelog)
Nice. Nav stuff is being decoupled from the current movement components.
what the best way to make ai dont block each other? and run around the other ai? which the perfomance dont cost much etc? waht is the best and easiest way? can someone tell me?
The easiest way is to just make them not block each other in collisions
By far the eaiest.
Sounding like a scratched record, but here I go again, for the shake of helping:
- what you want to do is not easy
- crowd control does it as in it resolves them not getting stuck against each othebut they will always touch each other. It's an avoidance technique so, in theory, you could tweak the avoidance radius (I failed to get good results just with that in the past)
- your best shot in terms of results will be to apply stearing behaviors that will make AI's move around each other deviating from (or rather approximately follow) a pre calculated path.
- other techniques imply path modification around assets, like marking nav areas etc, which for AI's is very expensive
I looked out of curiosity what you meant by lol minions in YouTube and loos to me like a flocking behavior (aka steering behaviors)
Oh but silvers doesn't want that. He wants AI's crossing paths to avoid each other elegantly without touching. You see what is wanted following the 10 times that the same question was asked, specially the first 4
Like a combined solution of crowd control + flocking
Right
Well, if that is too hard to understand as it sounds like, at least an alternative which is actually easy is available :D
Crowd control does that, silvers applied (there's a video of it) but it's not enough. So I passed videos, talks, docs online, a github repo... All to get the same quesiton a day after. It's a lost cause until the pain of learning has been endured
From what I’ve seen in other channels, the learning part never occurs for them, so better to just ignore and focus on helping others, so you don’t get caught up in their insanity 😁
maybe by asking again and again someone will give you the magic bullet MakeGame()
waht is easy avaible
Make them not block each other in the collision channels as I said
To be clear Silvers: this will cause enemies go through each other as if they were ghosts
Tempting but... I've been tedious due to me asking the same thing again and againg by not understanding how much I didn't know and someone had the patience to show me and forced me to pay attention and learn. And I'm thankful for those instances, so I should try become that person. Getting Balder that's for sure
What? No... You see all of them but there isn't any physics collision among them
I mean, sure, we’ve all been there at some point but in this case I don’t think any of the information is going in, ever. But hey, it’s your hair 😆
Yeah...
if i change colison? they dont block eac toher ? o.O
You reaaaaaaallly need to sit down in front of the pc and understand what physics are, why things "block" each other, how movement is handled... For real. You need a certain base 9f knowledge to, at least, know what to ask and look for. You clearly don't have that. Which is fine, it comes with time.
They will not block each other but they will go through each other, not around, through each other.
thorugh? through the mesh?
Yes. Imagine you see 2 ghosts, they run towards each other and... They just passed through the other. That's what Zomg is suggesting
Many many games are fine with that. Others use Crowd Control (or rvo) to get that but without croshing meshes
I was using crowd in mine until it started getting on my nerves how it had so many random small edge cases where it behaved erraticly
then I just got rid of it and changed the NPC's to not collide with each other :p
It's an approximation. Hard to get right in every instance. My experience is that it works combined with other techniques. By itself... Hard sell
Age of empires style. Works for 99% of the games
i dont udenrtsand what you mean
if they go trhug another
they have no collisonn?
they they will all go 1 line?
They have no collision toward each other
That will depend on how you handle the movement but, mostly, they will overlap in one position. Do the test, put them in a line next to each other facing forward (like the start of a race) and make then all go to the same point. They will end up all overlapping at that one point
thrat totally not wah ti want
the need to run avoid each other
if the go all forwad and then stop on distance 400
they will stat all at 1 place
its like you see 1 ai but there are 100
Yeah we know, but you keep refushing the reality of what needs to be done
no collision -.- wtf
Hahahaha
no collision they jsut will run forward
You are a case to study
all through each other
@coral widget this is the solution to your problem
For the Nth time
you same dont know waht are you talking
Bahahah
ai dont block eac other
every game need this
why noone know about this how to do this
I hope you succeed at some point and I wish I could pin this and be here for when that moment arrives (if)
Sorry, forgot to mention it’s the kind of “idk anything so I keep asking for help but I think I know better anyways” delusion
Trust me, most games don't do it. Check, you will be amazed.
Yeah I'm pretty sure Bruno has answered this a lot already lol
This is complicated, there is no checkbox you can set to make it work
:P
bMakeGameWork == True
Tbh, stearing behaviours would be a nice thing to have in unreal
Yeah
Don't forget "onlineSupport == EMagic::Enabled"
how can i make minions like league of leegnds
anyone ehre know it?
just give me idea or something cause there is no turoials in internet
nothing not any 1 tutorial
Stearing behaviors.
There's your idea
which part of "this is complicated" do you not understand?
no one is going to be able to give you a step by step guide for this
he literally gave you an idea and you started mocking him
I’m guessing we’re talking about steering tho
Ah touche! That's the issue. My lack of English
lol
Sorry, my bad
Must have been the issue. Now silvers (probly an ACat alt) will understand, for sure
This are all tools for things you combine. I guess:
- c++
- blueprints
- behavior trees to handle movement states
proceeds to point to the video that shows what silver wants with a link to a github with code about how to do it
#gameplay-ai message
Have you put the time to make the github project work as I pointed with instructions + links to how to?
Because your most detailed answer, tutorial and help is there
You can also do like me: buy books (or pirate them, all the same), study them and, when one offers a solution for a problem you have, you put time to do the implementation yourself, applying everything you know about unreal: code, bp's etc etc. When hitting a wall of knowledge, stop and learn that one thing you need to continue
See... We all had to sit down and read, learn and code. Not everything has a bool in unreal
yeah
you tell me thing si know when i was kid
when you ask me how can i change scale of mesh in blender
i can say you read learn and use blender
cool
i think you know nothign about coding
Being a jerk to people who try to help you is a great way to get more help
the first question is when you satrt unrela is how to avoid ais
first quesiton every game seu this
if you dont know this... you know nothing
sorry -.-
he cant help me?
omg
he only can say waht chat gbt say or google say
Why are you being a jerk even if he can't help you?
he dont need answer me
when i ask here question
maybe someone another guy here know how to do this
That isn't an excuse to be a jerk
Yeah nobody is going to help you if you are a jerk when people try to do that
if someone here can help it would be nice to tell me
Good luck with that lol
For real? OK, I officially drop the towel. I honestly don't kneo what do you expect. At some point you will reach a solution and you will realize I gave you the answers you seek from post one. Good luck with your games my friend
i will never realize that
for suere you give right answer
if someask here somehtign i can say use c++
🤣
it would be right answer
if some ask me how to cahnge mesh
i can say use blender
its right answer of cousre
men lets stop talking all the time the same
i know i have to coe in blueprints and c++
Just a small question: have you read through a deep explanation of steering behaviors and tried to implement it yourself? Because that's literally all you need to do
maybe someone can help me here
Considering Bruno already gave you the answers you needed to solve this problem I don't think anyone can help you lol
Ok ok I drop it. I'm kind of getting addicted and polluting the chat. Sorry people
Just add a nice note to their profile and block, life is much easier this way
Discord did a great disservice hiding that note box behind another click in the user profile
On mobile you just scroll down
Nah no need. Desperation is your best companion as a programmer. Silver will jump to the keyboard and work in learning. You will see.
Yeah I don't think that's gonna happen or if it does he sure as hell isn't going to come here and admit to being an asshole for no reason lol
You’ll be waiting for that a long time lol
What's an "ACat alt"?
I vaguely recall a user with that name but I don't remember them being a jerk
A Simple 2D AI system for Flock Movement of Birds/FishCraig Reyonds published a conference paper that described the movements of flocks in a set of 3 simple rules. The members of a flock tends towards its centerThe flock aligns its rotationThe flock tries to not overcrowd its selfThese were referred to as Cohesion, Alignment, and Separation resp...
maybe this can help me?
Yep, that's what I have been suggesting all this time. You are on the right track
That's soemoen that read about steering behaviors (a paper by creig Reynolds to be precise) and implemented it
You know it's refreshing to see someone who wants to still help even if the other person is making it difficult... don't really see that happening much online in particular
Man I'm not the smartest bulb in the tree. Had people being nice to me in my worst days. If anything, we all should learn that
Yeah
It’s someone that hangs out in other channels and tries to make people go insane with their questions without retaining anything, all while pretending to know better. They got banned but are currently evading said ban. This silvers guy could be a completely different person but at this point it’s the same to me
lol
It gets old fast
Yeah I usually stop at the point where they start being dicks
I used to but my patience array index ran out of bounds
Nah I come and go from this server. When I burn, I just don't reply. You can't do that at work hahab
If only lol
There was/is (?) another user on #cpp who most people seem to think is an elaborate troll but honestly it seems they just have a different way of thinking from others lol
A complicated and not intuitive way to anyone else but it seems to work for them from what I've been able to glean
Aye, some of these folk are actually capable of building stuff, just annoying to socialize with lol
Aye, so using the ARK: Survival Ascended DevKit to make a modded creature.
Currently have a basic "IsFollowing?" Deco that the creature will stop and stare at the player once they aggro onto them. Though, they stay stuck like this. (it's a recycle of an existing Deco that Wildcard made, that I copied and reworked)
Was wondering on how I can make the "IsFollowing?" Deco a temporary one, where after X-amount of time, it'll deactivate so the normal aggro function of attacking the player will continue.
So doing it via invokers works.
AAAH of course! I completely forgot about invokers! Good one
Hello everyone, Im learning behaviour tree atm and I want to use the bool thats in my BTTask so I can trigger an animation, but im not sure how do you get that since it always show "warning", Thank you o7
Are you going to show all of them on screen? Do you need to simulate their movement when they are off screen?
Is it 3D or 2D like VS?
Ummm then, for sure:
- you will have to handle movement your own way since movement component is gonna be way too expensive. If it was 2D is easier to do, 3D will be slightly more difficult. There are probably examples out there.
- use a imation instancing. The anim BP tick is expensive. At least you will be saving that time
- definitely switch off everything out of screen when possible
You cannot reference a task in the animation BP, you should save that state on your pawn as a variable or a gameplay tag and then reference that in your BP. But this way you at using behavior tree to manage state which...could be tricky!
Also watch out, don't execute code after calling Finish task, I don't think that it will be executed
Hi guys, I'm making a AI enemy which chase the player using sight sense. When the enemy see it, change the max walk speed. With the system that I made it works, however is there another way to change the character movement of the AI without using the "Cast to Standard Enemy" but using maybe the Blackboard? Is there a better way?
Thank you
"Better" would be very subjective here but sure if you wanted to change it from the blackboard you could add it as a BB variable and read it on tick in the base enemy class and no casting would be needed. Highly subjective if it's a better or worse solution though.
You could also use any class that all enemies know of that you are also able to easily fetch inside your setwalkspeed task that has a delegate and broadcast that event with the enemy and new walkspeed
@pine steeple sorry for ping but I've been trying to understand if it a bug in your code or is my understanding on how Decorator work is completely wrong
https://github.com/KaosSpectrum/KaosGASUtilities/blob/main/Source/KaosGASUtilities/Private/BehaviourTrees/KaosBTDecorator_IsInRange.cpp#L96
Here we have
== IsInversed()
and
!= IsInversed()
Which effectively ignores the inverse condition checkbox (?)
At least for me it doesn't detect when the object is out of range, only in range
More than that, when observer aborts is both is aborts everything every frame
Related:
Just to confirm something I've learned recently, for Decorators that do not observe a blackboard key, are they still able to abort other ongoing behaviors if their condition changes? Because the option is still there in the properties. From my tests it looks like they don't unless I explictly call ConditionalFlowAbort.
That's how it works. If you look at the bbk decorator, it calls conditional abort flow based on the test results, but you can have your own test (I have a decorator that listens to a g.tag changes. If the tag exists it enters, if it's removed after, it aborts)
that is what I thought from my experience. I was looking recently, however, at this guy on youtube https://youtu.be/tSt52XWI_vU?t=1523 and he just makes a couple of decorators in blueprints and then sets them to abort when the condition changes. They don't observe any blackboard key.
In this episode we solve a number of common AI navigation issues: jumping over simple obstacles, how ensure the AI keeps line of sight on the target, and AI still being able to move toward the target when the target is floating in air or outside of the nav mesh in some way.
00:00 Intro
00:16 Today's Goals and Key Concepts
02:07 ISSUE FIX 1: A...
and at 26:19 it looks like the AI agent actually reacts in real time to that? Unless the first MoveTo child of that selector finishes its thing, the tree gets evaluated again, the decorator gets checked again and it realizes the player is flying and then checks the next child node. Maybe that happens for him?
You are correct.
bruno
i found a easy solution for my problem?
and you code 10years? :D:D:D:D:D:D:D:D:D
Thanks
Hi all !
Should I use NavMesh for AI Navigation ?
Or is there a more performant way ? Like linetraces or something to detect obstacles ?
What are your advices ?
Build, test, optimize
Hello, folks. I'm going to make a simple squad AI like if one member in the squad is attacking, other's just do different behavior except for attacking. So the question is, I want to do it with state tree and is there any recommended method to do with the state tree features? Do I still need to create a , for instance, subsystem to manage all those thing? Thanks.
[2024.11.15-08.01.07:563][244]LogWindows: Error: === Critical error: ===
[2024.11.15-08.01.07:563][244]LogWindows: Error:
[2024.11.15-08.01.07:563][244]LogWindows: Error: Fatal error!
[2024.11.15-08.01.07:563][244]LogWindows: Error:
[2024.11.15-08.01.07:563][244]LogWindows: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0xffffffffffffffff
[2024.11.15-08.01.07:563][244]LogWindows: Error:
[2024.11.15-08.01.07:563][244]LogWindows: Error: [Callstack] 0x00007ff7b572eb3f UnrealGame.exe!FNavigationDataHandler::RegisterElementWithNavOctree() []
[2024.11.15-08.01.07:563][244]LogWindows: Error: [Callstack] 0x00007ff7b57477ca UnrealGame.exe!FNavigationDataHandler::UpdateNavOctreeParentChain() []
[2024.11.15-08.01.07:563][244]LogWindows: Error: [Callstack] 0x00007ff7b5742df5 UnrealGame.exe!FNavigationDataHandler::UnregisterElementWithNavOctree() []
[2024.11.15-08.01.07:563][244]LogWindows: Error: [Callstack] 0x00007ff7b574678a UnrealGame.exe!FNavigationDataHandler::UpdateNavOctreeElement() []
[2024.11.15-08.01.07:563][244]LogWindows: Error: [Callstack] 0x00007ff7b570657b UnrealGame.exe!UNavigationSystemV1::CalcTimeSlicedUpdateData() []
[2024.11.15-08.01.07:563][244]LogWindows: Error: [Callstack] 0x00007ff7b5747cc7 UnrealGame.exe!UNavigationSystemV1::UpdateNavRelevantObjectInNavOctreeStatic() []
[2024.11.15-08.01.07:563][244]LogWindows: Error: [Callstack] 0x00007ff7b5744a20 UnrealGame.exe!UNavigationSystemV1::UpdateComponentInNavOctree() []
[2024.11.15-08.01.07:563][244]LogWindows: Error: [Callstack] 0x00007ff7b5de83c3 UnrealGame.exe!FNavigationSystem::UpdateComponentData() []
[2024.11.15-08.01.07:563][244]LogWindows: Error: [Callstack] 0x00007ff7b57b2087 UnrealGame.exe!UNavLinkCustomComponent::SetEnabled() []
[2024.11.15-08.01.07:563][244]LogWindows: Error: [Callstack] 0x00007ff7b599949b UnrealGame.exe!ANavLinkProxy::execSetSmartLinkEnabled() []
@crystal hatch
Calling UNavLinkCustomComponent::RefreshNavigationModifiers()(directly or indirectly) in PACKAGED (non-shipping) build crashes every time. In editor there is no warning, error or crash. Tested on fresh ThirdPersonDefault.
It does NOT crash on shipping builds, only with development or debug. See the BP graph, calling that in packaged debug/development build on active NavLinkProxy will 100% crash the game. This didn't happen in 5.4
Nice. Care to share? Let me guess: a plugin somebody else did?
I would recommend what is usually called AI Director approach. It's what Left 4 dead uses for example. Basically a main command center that gives instructions to your squad members. There are 3 types of communication messages:
- orders from the director to the units (ie: move here and wait, attack this thing etc)
- info given from the units to the director upon request (ie: do you have a target? What's the closest door you have nearby) <- some systems skip this message and have the director running the eqs when needed. I find it better to make the squad member run them themselves, that way you can paralelize info requests curated for each unit
- info units send between each other (ie: I'm going to shoot the target, you are in the line of fire, try move away) <- mostly for more advanced behaviors (at least in my personal experience)
Usually you can just start with the director and check if you actually need the rest
I think there are replays of Bobby Angelov speaking about the choice of system design for cooperative AI.
I have done exactly all the things he said to NOT do and my life is a nightmare today for my game 🙂
https://www.youtube.com/watch?v=5ZXfDFb4dzc&t or https://www.youtube.com/watch?v=G5A0-_4dFLg&t it's one of them (sorry for no Timestamps, I seen it a long time ago)
thanks bruno for all your answers. I don't have the problems of the answers' context. but just reading them is a great source of learning.
Uuuh never seen this videos. Thanks for sharing. Weird I can see the links but, when I open his yt profile, they are not there. Will watch them
It's in live category and not video
Aaaaah. That explains
I discovered it because 11 bit Studios Linked it in their talk at the Unreal Fest 2024: https://www.youtube.com/watch?v=a3bHkVDZuYU&t=5s
In this session, 11 bit studios will present a case study on designing and implementing a flexible framework for AI characters in a TPP stealth-action title using Unreal Engine.
They will go through how they approached each stage and the different challenges they had to overcome, focusing on why and how to combine different AI techniques lik...
Hopefully they learned how to do async saving while they were there 😁
Ah right. Yeah I was there! From that talk, my favorite bit was how neat the ImGui debug tools they have looked and that they use imNet so the debugger can be a separated app from the game if needed
not yet among the people experienced enough in my company to be send there but Yeah, I loved the talk. I used this talk to push the Visual Logger into the QA's process. So my life is a little easier since.
Oh my company didn't send anyone... I booked holidays and paid for the thing myself.... I still hold a small grudge about it. Since it was just me, lots of talks missed in other areas
Small advice about that: you can easily do a small hack in the engine so visual logger works in builds. You can use the cheat manager to enable/disable visual logger in builds. It will produce a VisLog file that you can later open in the editor. That helped me great deals when qa found weird combat bugs in the game. They would record and send me the file to analyse it.
Second unsolicited advice: hide every VisLog debug behind a CVar. For example, let's say you want to record debug for your attack bt task. You declare a CVar like CVarEnableAttackDebug that looks like "myGame.AI.EnableAttackDebug".Then in the code, in every place where you want debug do something like
#if ENABLE_VISUALLOGER
If (CVarEnableAttackDebug.GetValueInGameThread)
{
// your VisLog code here
}
#endif
Note: writtign from memory in my phone, macro might be different in reality
The when qa (or anyone) needs to debug that, they will first use the console command myGame.AI.EnableAttackDebug and then record with VisLog. There reason for this is that, if you don't do it, every time you open Visual Logger to record everything vis log related in the game will record. That makes things polluted with lots of info you don't really care at the moment. That and that having many many things recorder/being visualized will tank VisLog performance/fluidity. It's not a very optimized tool when it comes to debug drawing things.
This talk is really good too for visual logger appreciation
https://youtu.be/hWpbco3F4L4
The Visual Logger, built into the Unreal Editor, is an incredibly useful tool for recording, visualising and tracking objects, locations and data in gameplay, but it’s rarely used outside of AI. Let’s change that!
In this talk by Rare's Principal Gameplay Engineer Andy Bastable, you'll discover practical tips and examples from Sea of Thieves, ...
Well, debug drawing is not usually meant for use outside the editor so you can’t blame them for that 😁
No no, I mean in editor. The vi's log enabled in builds refers only to recording and producing gthe file. That's fine. It's loading a massive file what doesn't work well
Ah
I thought we’re talking about draw debut perf cause yeah
But aye vis log is great
Wow, didn't know that, I will investigate this in my future. The not available in build part in build was for me the biggest flaw of the Visual Logger
I have some Navigation issues to manage first And I post pone it to 5.5 update but we won't be have it because too much issues (RAM exploded, Navigation Issues and crash random in Chaos initialisation). something like on 40 000 tiles. I have between two or eight tiles who got offsetted on the XY plane
Thanks for the source
Yeah that sucks none the less. We have debug tools for runtime that draw stuff and uff... You can't get crazy. Same as when you draw skeletal meshes in visual logger... Can't go crazy or the editor tanks
i have exact the same behavior like lol
Thanks for reporting this. I'll notify the authorities 😄
But how did you achieved it?
you have to learn much! its very hard! EQS grid path... behavior tree
when ai is near other ai... take another path
etc
you learned wrong... 10 years... you have to learn new 10 years FROM BEGINNING
that i can say you
i dont give 1 click solution or my codes sorry
Cool. Never to late to learn. Let me start with your approach: are you using a stearing behavior or a more nav-data based approach?
You do realise you are being an utter asshole right? we (mostly me) provided you every known solution used in games with code, book references, articles, YouTube videos and advice over existing plugins. At least have the decency of share your way with others that might need it, specially after seeing yourself how tedious is to navigate the multiple options available.
You might want to double check a bit on that friend
The more you talk to this guy the more he comes off as someone who expects to be fed solutions without doing anything huh? :P
This is exactly the type of people I always tried to dodge when doing interviews. I don't care how good/bad you are as far as you show effort, interest and partnership.
i answer all your questions???
i tol ya waht to do
i can show you tutorial videos?
but i dont give you my codes??? no 1 click solution
we all have to learn and udnestand... and its hard to find solutions...
i tell you again
EQS grid path... behavior tree... and then many code... its not easy
but with tha you can do all with the ai
follow path change path when near enemy etc etc
there are many plugins... you have to udnertsnd them
you can buy 3 different plugins look how they did that! then combine all 3 plugins... take the code you need
its very much code
but i told ya how to do that...
with this system you can do everythign with ai you want!
everything!
You know man that you maybe just be an idiot ? Game industry is small (Game AI world even smaller) and when you will ask for a problem this will be in your history ?
So... You didn't use any reference materials others can follow? Gotcha. Amazing work my buddy. You might want to apply to Epic, their ai team is on fire lately, great moment to join and provide your talent to them
Seeing you did all from scratch
Just... Skip this one for your own sanity
Hey guys! Super curious how heavy a single unit of AI is in a game. I am wanting to make an AI wasp however I can also steer away from it. I want to do it tho withoiut comprimsing the performance or having massive FPS drops.
This depends entirely on what your AI does and how it does it
it will be super simple Drone Ai thing (I think Gorka has a tut on it) with maybe a if cannot be seen retrurn to drone pathing or just recon mode
nothing crazy
or at least i dont think it is
If you're just gonna have one of them then chances are it will not have any impact whatsoever unless you're doing something completely crazy with it :)
Then don't worry about anything. Have something working you are happy with and, if performance etc becomes a problem, then worry about how you did X or Y. The important part is to start rolling
ofc its just it's a project i know nothing abotu ai so i asked
thank u for the heads upo
you mad?
i told ya everything?
i dont give you my solution my codes?
my game is big full of codes
i never show any code
about minimap .... not even about my anim montage
i show nothing?
everyone know this here? 😄 if i have question about my minimap
someone will help me... want see my code
i cant show thats my answer all people here know this?
people say to me allaways we cant help you if you dont show any code
and back to your questions
i told ya all you need!
with this what i told ya you can do everything... with ai you want
i can send you tutroails i sued
i can send you assets i bought
but i make a mix of all... not of thta will really help you
caus eyou have to learn from the beginning!
you leanred nothing in 10 years
if i sned you video you will nothing understand etc...
EQS Grid path there are many tutorials in youtube
BEHAVIOR TREE there are many tutorials youtube
the boid plugin what i showed you you can buy! i learned alot from them! i i take some code from this plguin... only the code is relevant for me and i need
i dont give you my codes. never. nobody! not even my parents ^^
Ok so, can someone help me explain how to get rid of those seams in the navmesh? It's 1 big dynamic navmesh with 1 agent
The problem is the agent will not cross these
It treats the "section" that it isn't on like it isn't there
on different heights they happen on the same y and x
but not everywhere
I had to place navlinks on a flat ground to allow it to walk through(??) but it's not ideal solution ofc
if you understand this all systems ! you can do waht ever you want with ai!
A Simple 2D AI system for Flock Movement of Birds/FishCraig Reyonds published a conference paper that described the movements of flocks in a set of 3 simple rules. The members of a flock tends towards its centerThe flock aligns its rotationThe flock tries to not overcrowd its selfThese were referred to as Cohesion, Alignment, and Separation resp...
this can help you to very much... behavior tree etc... when ai is near other ai...
you have to udnerstand all this system ! EQS Grid path... behaviro tree...flocking etc
if you understand this all and you learn much... you can do everythign with ai....
then you only need to optimize cause someof this take much performance
That answer wasn't even for you. You are picking a fight with someone else now
??????
i jsut want help you?
i told ya all you need
its complex and much code.... but you can do this...
That's super weird. Looks like the terrain is on different levels, but it's a flat surface right? Never seen that on flat surfaces
the only problem you will have this much code... cost so much performance...
so could i help you? with my answer?
if you have specific questions... ask me
I'm those conflicting areas (where the chair is etc), if you delete one asset (the chair nearby the weird area) and build, does the problem persist? Can you start removing assets one by one and see if, at some point, the problem is gone? My theory is that there might be a problem with one of the assets. Is there a connection like "everywhere the problem exist I use X element"?
AI Grid Path Finder - Dynamic Web WayYouTube: OverviewDocumentation: LinkExample Project: 4.25, 4.26, 4.27, 5.0, 5.1, 5.4Discord: LinkThe plugin includes:1) A customized real-time path grid generator for the movement of bots or displaying a short path to the goal in hints, or for use for any other purposes.2) Queue manager for getting the path.3...
look for this! that help you very much
can someone tell me maybe? hpw i can optimize my performance?
i have many ai and its so hard lagging...? can soeoen tell me why its lagging and what can i do? -.-
Your best tool is using Unreal Insights on a build. A development build will suffice (even though it will not be representative of the real performance of a released game, it will help a lot). Run unreal insights with statnamedevents and cpu traces. Then check cpu peaks in the game thread and you will see what takes time
waht is unreal insight
someone told me the same
waht is this? how to use this?
at 100 ai the game is unpalyable the editor freeze
i need 200ai? and this is not even much why my game is laggin?
I do have questions:
- how do you handle the end locations? Do each bot use one or do they all use the same?
- if the same location, do you calculate different paths to it for each bot or a single path and deviations from it? If different locations, how do you handle crossing paths?
- following the one single path for all to a single location (ignore the question if not the case) : do you apply forces to separate the bots and resolve collisions like RVO would do? In that case, how do you deal with bots pushing each other towards objects and/or outside the nav or the map? Or do you use a crowd control approach where nav is considered to avoid it?
As you can see it also happens on the first screenshot with no chairs, and even on stairs.
I've got a multi-floor building with navmeshes on every floor if that changes anything. And funny thing is it wasn't happening before
my english is bad sorry i dont really understand your questions
but I ignored it for a long time, so I can't backtrack to when it was working
my ai follow path until they reach enemy
but my game is unpalybale at 100-200ai?
200ai is much? why my game is unplayable?
Ah... Ummm I think you might have a bad config for your nav generation and have the slopes being too conservative. As in: your nav doesn't consider planes with so much inclination and has to split it doing the best it can to cover for it
This explains a lot of things. We should have started there
I was changing a lot of agent settings so that the enemy can walk up these stairs with no problem. Still a pain in the rear
you might be on a right track
200ai is much?
at 100 it become unplayable
total lagg
at 150-200 its freeze cant do anythign anymore
I also got multiple navmodifiers to render some areas at high resolution but i doubt it's that
Looking at that ladder, you might need to use a higher tolerance for slopes + tweak the cell height etc. There isn't too much documentation about these settings unfortunately. Trial and error + some things here and there in YouTube, code comments...
Usually for ladders nav links are the best option, the tweak the nav generation for your general flat surfaces, ramps etc. If somethn is too much for one and too little for nav links, maybe reconsider the map design to adjust the levels to your constraints
Thanks for some direction! I'll post these just in case end experiment a little. If you see any problems with these let me know, but I can't force you to look through someone's wall of variables 😅
You need to tweak the other settings XD. There are 2 places. If you select the recast object in your level, you will see what I mean
It would be very hard to change map design at this stage, so I'm looking for a solution
But do not tweak on the recast object itself, but on the project settings
is it normal that my game got laggy at 100AI and at 150-200 AI its freeze? is this normal? is 200AI much?
The recast uses settings settings from the tile generation shown on 2nd and 3rd screenshot no?
yeah I know
I'll fire up a second project and see the defaults for these 
Yes. If you use pathfinding, character move component etc, even 30 cna be problematic in any modern console
Good luck mate.
what? how they code games with 10000ai?
without laggs?
Not using Unreal
Also I don't think there's a 10k units game, but I get your point.
Amazing how your English varies in quality BTW.
my english is bad? didnt i told ya?
there is many games...
100ai every game had 100ai
or 200
every game -.-
why my game become unplayable i dont understand this? cause i use laptop?
Unreal insights is the only thing that can give you the right answer
Not really no. Maybe the Saber Interactive engine etc. You rarely have so many on screen and, even if you do, only a few will run
every rpg has up 500 ai in sight and 1000 another palyers in town where the shopa are
i think other players cost more perfomarnce then a ai!
in rpg there are 1000 players in a point???
and 1 player cost more eprformance then 10 AI? i think
ai have codes
player can use everyhting
ever game has 100layer or 100ai?
if ther eis a game with 5 palyers then they have many ai
call of duty handle 1000 zombies? in zombie mode
with nice graphic and no laggs
nooo laggs! not even 1 with 1000ais ... -.-
men you only walking wrong things 😄
i dont discussion with youa bout game
ever ygame has 200AI+
every
dont talk about it anymore!
can you tell me why its lagging? is this normal????
Prbably normal, we don't know how are you handling things. For the last time: use unreal insights. It's the toom that will let you know what is expensive and why
for example
city asset from amrketplace
matrix cit sample
full city wiht 10000 AI in the best graphics i ever seen in my life
why its not lagging?
1000 cars 100 peoples... best graphic
its not lagging
i only have max 200AI and at 100 AI it become laggy and at 150 ai it become unplayable
there is nothign i can do only watch unreal insight? and see what cost much performance? o.O
This uses mass. There are entire talks about how it's handled
i cant understadn this call of duty is 20 years old 😄
high graphic 10000zombies without laggs
You might want to head that way, learn how the matrix demo uses mass and try to adapt it to your system
we are in 2025 and it salggy with 200 ai? o.O
Because those 1k AI's are not running everything every frame. They are not all on screen at once, they use tricks like animation instancing.... Many techniques combined. Also that engine is not unreal
so i can only watch unreal insight and see what take much performance?
Your game lags. I have done a multiplayer game with up to 30 AI's in screen in unreal and took a great deal to optimise for series S and ps4 for example. Performance is the trickiest thing in the book
Exactly
The link from. Before that you didn't notice
https://letmegooglethat.com/?q=ue5+unreal+insights
Then with that info, you visit each expensive system and try to optimize it doing things differently
If you have time, try to reply some of this. Many people will be interested
i know many people will beinterested
i search for this foor weeks 24/7 ...
i already explained all -.- if someone have specifi question i can give answer
i cant give my codes sorry -.-
Those were specific questions that do not require code or anything. Just explain your approach.
i did?
run from a to b find enemy when in range... make grid path eqs behavrio tree.... like flocking etc
Aaah OK, flocking. Yeah makes sense. It's the common approach. So the plugins you linked are you using both or did you just took pieces form there here and there?
i take pieces from all
i already explained you all
eqs / grid path/ behavior tree/ some plugins flocking etc
i told ya tha i took the codes i need from all
and now i can handle my ai like i want!
its jsut the eprformance they use
its total laggy... thtas my problem now
Good job mate. See? You just needed appointment to the right places and work a little
You got this
but my performance... the game is unplayable -.-
Don't worry, check the performance tool and you will start seeing things. You can start by having just one single AI in an empty level, optimize it the best you can. Then place 30 or whatever number you see fit. And start again
Gonna take time and re-do things, apply techniques etc. Would be a good idea to start checking for gdc talks of games you like that dealt with similar problems, see how the organize things (gdc, unreal fest, tutorial online, books)
Game AI Pro books are free online and they have few chapters that might help for ideas
I am geeking hard every day the more I work on State Trees. I love this system so much
you dont know a solution atfer 10 years?^^
Ask that to from software XD 30 years and games run like.... Yours more or less hahaa
I was on your team. Now I'm divided. Will see by next year
It think they both have great and horrible things
you dont know what cost much performance?
why this happen that my game so laggy
Without looking to insights impossible to say, specially without knowing what you do. But imagine you had 200 guys without your logic, just moving with what ue5 has, biggest offenders will be:
- Character movement component
- animation
- physics (traces etc)
Add your logic on top (which is probably using at least 2 out of 3 in that list) and... Say good bye to your cpu budget
It's just business
I am just really not a fan of the flow of ST's personally.
Constructing them is all fine and dandy. But the actual flow. Ehhhhh
Insights will answer this better than me. But mostly physics
Depends on what you do I guess. You can't turn off physics perse, but you can not use things that relay on physics much. As soon as your enemies have capsules, they move around using the character movement component, you use physics. If you do lines traces, triggers, overlaps checks... You use physics. Hit detection is usually handled through physics too
hm then every game need physics and character movement?
how they handle it? when it causes laggs? and youc ant turn it off?
every game need it then.
Each game in a different way I guess. No way to know for sure. People profile their games and see what things they can skip, do less often, check what's more expensive, if X or B. That's very personal to each game
how d you handle combat
player ... ai move to... on succes play anim montage and apply damage thats all?
On a very very basic level, yeah. Then things escalate from there based on your game needs
Still indulging the guy patronizing the people he’s asking for help from eh? 😆
I blocked him to be able to read the channel at all
Same but kinda wish blocking would make his msgs disappear completely so we can pretend Bruno’s lost it and is talking to himself
you mad?
I have a StateTree, and the states only have transitions as the result of events. However it seems like it is still going back up to the root and trying it again.
This is making it so I have to add condition checks to each state and that seems like wasteful CPU cycles, I was expecting it to stay in the state until the event was emitted, or an evaluator or something else changed, but that doesn't seem to be the case, is this a bug? (In 5.5)
Essentially I am using a state tree to control flow through a quest, determining what objective is active and transitioning to the next objective or whatever action.
The first state should assign the first objective, and then wait until an event is emitted before transitioning to the next state. But instead it was activating the quest on every tick, even though the only listed transition is an event tag.
I had to add the condition check there to say don't select this state if the objective is already active, and now it has to do that check every tick. Did I setup something wrong? Or is this expected?
I'm so glad you confirmed you all can see it. Ufff not crazy
Hmm... I have a simple issue that doesn't seem to be supported.
Here's my btree. There's a Simple Parallel that causes the character to walk towards the player as its main task, while shooting continuously in the background. The problem is that:
-
If Move To acceptance radius <= collision distance: the AI will smash into the player at full speed and come to an instant stop, sending hair cards flying everywhere. If the player then gets hit by the shot and pushed back by the root motion hit animation, the AI will keep pushing in a jittery fashion as it tries to catch up with the moving collision capsule every 2 frames.
-
If Move To acceptance radius > collision distance: the AI will correctly slow down gradually and stop out of collision range but will then complete the Move To task, thus also killing the background shoot task and stopping its attack.
The obvious solution is to replace the Move To by a selector that either Moves To or stands still depending on distance... but you can't do that, the main task must be a singular individual task.
What is the solution here? 🤔
brunoooooooooooo 😄
Last time someone was an asshole with an unknown potential candidate that didn't know better (good or bad), the dude took a different path. Just because no one was patient enough so he could see his frustration came out of fixable ignorance. The dude was an Austrian painter.
Let's all have just a better judgment for the shake of the expirement
brunoooooooooo 😄
you mean hitzlerrr?
he was something 😄 after his dead the people will talk about him in the next thousand years?
and about you who will talk? ^^
dont be envious
the only thing in your life is coding 10 years of your life? 10 years for what? 😄
all you know .... about coding... everyone will know after 1-2months ^^
and that is the true 😄
and we all know the true hurts ^^
You know, I was gonna answer but I think I can rest my case now based on the above 🤣
watch tyson vs paul kiddies
@slow bobcat So, over the weekend, I'm going to dive in again with ST's. Last I used them was 5.1. Editor was very buggy back then for them. Constantly losing prop bindings and it was still highly in flux. Did always prefer writing a ST task over a BT one. Started poking around tonight and already found some bugginess and annoying crap.
The Root wasn't automatically transitioning to the first child state. Had to add a transition, play the game, exit, and then remove the transition. The StateTreeAI Comp's start logic automatically doesn't work. Have to call start logic in OnPossess (which is fine, you do that with a BT as well), but it can be frustrating when it isn't obvious that is the problem. I imagine it is because the context's are fully set up yet due to the controller potentially not having a pawn.
I also still have concerns on some potential race conditions for certain scenarios when a state has multiple tasks and one task relies on data from another.
I'm printing this for the bad days. Dude hahaha no filter
Yeah, the above is not happening anymore (at least for me), but the later... Maybe? I don't build logic with tasks depending on other tasks
My furry friends
The easiest example being a Move To task needing a location or actor.
Yeah, you can raise an event, I guess. But bleh in some of those scenarios.
Right... I have a different approach. The way I build things is more... A state tree decides on high level stuff (can you react to this, do you have a target meeting X considerations etc) and, if conditions met, run a bt. Within the BT we decide locations to move to and what not. For me (us) state trees are amother layer to split the problem
Funny, I would end up doing it the other way around most likely 😅
Where BT decides what to do and ST decides how to do it
Yeah, totally valid. It's funny how everyone uses them in different ways. That's what I find the most interesting about St's. Add the fact that they are not tied to AIController or pawns... Marvelous
Hi guys, I'm new in the Behavior tree; I'm trying to make an AI enemy behavior tree that have a specific patrol path, but when see the player it starts to chase it. However if the player is in the bushes, the AI moves to the lastknownlocation and come back to patroling.
I'm trying to find a solution for this system.
Somebody could help me please?
I'm trying to think of other ways to use them honestly. But I don't want to have a bunch of ticking state tree components. Need to see if the state tree still processes events even if it isn't ticking.
Don't know in 5.5 but nope. St's are tick dependant. To be more precise State Tree Execution Context dependant
That's wack
(insert it's what it is gif)
The gist is pretty much, when your AI loses sight (perception gives an event for this kind of stuff) you just move to the last known location of the player. To get the player to be "hidden" by the bush, you could make it where the bush blocks AI line of sight.
Yes but I don't know how to make it🥲
this is the decorator
ok guys
i cant fix the laggs
how can i make a game when everythign is lagging -.-
no of you had any handle 200ais?
in years of coding?
when i code 1 month i handled 500ais 😄
no one handle 200ais here?
what the tricks? to fix performance???
By using perception. Your perception will trigger an event when it loses sight. Then in there, set up the BB key that you need.
THis is my AI sight perception
Like this?
?
I struggled getting 30 being on screen, performant and reactive few years ago for the previous gen of consoles. 200 is just ludicrous to me
Could folks confirm that the default use of EQS does not expect the query to complete during the same tick, but instead it's almost always expected to return on the next frame or beyond?
There's a function in C++ (not accessible by default to BPs) called RunInstantQuery which seems to rturn right away, I think, but the comment warns you not to use it for understandable performance reasons.
/** alternative way to run queries. Do not use for anything other than testing
* or when you know exactly what you're doing! Bypasses all EQS perf controlling
* and time slicing mechanics. */
AIMODULE_API TSharedPtr<FEnvQueryResult> RunInstantQuery(const FEnvQueryRequest& Request, EEnvQueryRunMode::Type RunMode);
AIMODULE_API void RunInstantQuery(const TSharedPtr<FEnvQueryInstance>& QueryInstance);
I can confirm. Queries are added to a queue and processed the next frame. Results given through the delegate on query finished
How games like AC Origins can have so many AI characters? Do they spawn as player nearby or they are always there but with very low tick and hidden mesh?
It really depends on game, if it's just filler characters to make places look lively, they most likely only exist near the player long enough for it to look believable
They have enemy and animal AI which can interact with players
I'm not sure what the question here is :)
You can have quite a lot of them in UE also but it needs a lot of work
Yes, hence the "a lot of work" part
I think Mass can help with it but I'm not familiar with it myself so can't say for sure
Also depends on hardware
Plenty of optimizations to do
What is 'many' in ac origins ? Cant recall ever seeing any decent amount of actual npc/animals
In this 2018 GDC session, Ubisoft's Charles Lefebvre discusses the creation of Meta AI for Assassin's Creed: Origins and how its objects could be virtual or real, in formations, in conflict, be part of a mission or autonomous, and how they can have a persistent inventory.
Join the GDC mailing list: http://www.gdconf.com/subscribe
Follow GDC on...
Chapter 20 in the 1st volume of this book series is a general setting for AI optimization quite common in games. Volume 3 has another chapter to handle spawning of AI's in games through the handling of Spawners (objects that handle spawning data). If you combine both approaches you will start with a very good base to achieve such results. Then add a layer of unreal specific performance fixes (physics, animation simulation, character movement component etc etc) and you are in a pretty good spot. Tons of work and learning of the engine itself, but not other way to handle it.
https://www.routledge.com/Game-AI-Uncovered-Volume-One/Roberts/p/book/9781032343235?srsltid=AfmBOorHee3KILGN3p5z5V1PAmpsuhadBb3KfTVNbF5V-zNKtaeS4o12
The book series are being released bit by bit, very worth the money
Game AI Uncovered: Volume One kicks off a brand-new series of books that focus on the development of artificial intelligence in video games. This volume brings together the collected wisdom, ideas, tricks, and cutting-edge techniques from 20 of the top game AI professionals and researchers from around the world.
The techniques discussed in thes...
Not saying "this is what AC does" but I bet it's a very similar approach
When using a StateTree transition, it works fine unless I tell it to delay the transition by any amount, then the transition never happens, is there something specific that needs to be done to support that?
It's an Event Transition, and was hoping, Event happens -> some configurable delay -> transition to new state.
Can anyone link a BTT where an enemy runs away from player character when it sees/hears him?
I cant for the life of me find a guide or make a BTT with a fleeing AI
How does the StateTree Move To task work, will it instantly succeed or only after the destination is reached?
I don't know video with a Behavior Tree in it for fleeing AI (I assume BTT is for BT). but it's actually not really hard to prototype a behavior like this
If you have a functional PerceptionComponent,
you can Set Boolean Value in an AI's Blackboard to enable a Behavior Tree branch for Get a Fleeing Location and then Move to (in this case, your AI need to have a Behavior Tree running)
Or, just Ask to run a fleeing Behavior Tree when your AI Raise a PerceptionComponent event.
To get a fleeing Location for proto, you can Get a random location on Navigation or put Actor in Level to have an Actor Array of existing fleeing location for a more scripted behavior.
I don't know your wanted behavior but a basic fleeing Behavior would be a sequencer with 3 or 4 Tasks like
- Play surprise animation
- Get Fleeing Location
- MoveTo
- Play Scared Animation or Rotate to face threating Location ?
i need all ai i need all tick event etc
i cant take osmething off
and its lagging?
so waht can i do now? -.-
i dont have even much code... i just have 200ai tick event etc... tahts all and its unplayable
You could batch them. So... Basically tick 10 AI's each frame. It will take 20 frames for all of them to tick. That will help a lot already. Then analyse what your tick does and see if there's anything you can remove into an async operation making things as event driven as possible. Then analyse your game with unreal insights and see what things are most expensive, how can you make them cheaper (it will depend a lot on your game's code)
I have never used or checked delays in transitions, curious abut it too. What I would have donde is to delay the FinishTask(true) call in the task that triggers the transition
Watch this recorded session from Unreal Fest Seattle 2024 that explores the development of ‘Goner’, a survival game with dinosaurs.
You’ll get an insight into how developer Black Shamrock gained extensive experience with State Tree, the new system for supporting AI development in UE5 and how they developed a set of tools and best practices for ...
i have clean project
without code
i have 15 fps???
you don't need to have a big project to have performance issue.
Lets Say, I draw a debug sphere on tick on a given location, I will have a performance issue without any AI or Character in the level and just one blueprint node in a level blueprint.
You need to decrease your AI tick (Behavior LOD could be a potentiel Start or Batching Some tick to ticks AIs only for a given time each frame to don't pass under a certain framerate)
or if Each AI compute something, you can try to compute the thing for all the AI one time. (for example, if each AI run an EQS with pathfinding test in a behavior each frame. you can try to run the EQS one time and save the result and each AI will use it)
But as Bruno Said, Performance issue is really game specific and you need to find where the bottleneck is.
Maybe the resolution and project settings are too high? Use stats commands to check if you are cpu or gpu bounded (check Google how to use them)
which settigs do you mean?
Scalability settings. You might be running things for a beefy pc in your laptop
when i set scalabilit ysttings low i have 25 fps -.- and its lagging... why does i have so many laggs is this normal????
Check insights. You can use it with the editor too. It will let you know. Have you use the commands I mentioned to see if you are cpu or gpu bound?
Out of curiosity: specs of your laptop? Maybe it's just a bit week for unreal in general.
This empty project, is it a template from the engine like the 3rs person character template or something you set up with a few of your own things?
how can i have low fps on clean project?
with no code?
create a new project top down and tell me waht fps you have?
you must have 60! not even 59! it must be60 on clean project!
Well... I get 120fps because I cap it to the monitors refresh rate . It's probably way more, but that's because my office pc is beefy as fuck. Hence my quesiton about your hardware. What cpu/gpu do you use?
so why i have clan porject 25 fs??? this is impossible?
Yeah that's what I ended up doing initially, but then I realized my problem. So I had a left over Delay Task there, and when my event would come through, it would immediately transition if I didn't have a delay set, but if I set a delay, then I think it was getting "cancelled" by the delay task finishing which essentially re-tried transitions.
Removing the delay task, and keeping the delay on the event transition itself seems to work.
Perfectly possible if your pc is not good enough. Post your hardware specs, let's see if it's reasonable
It's and old-ish i5 with a 3050. Shouldn't run that bad I think. Could it be you are using the integrated gpu instead of the dedicated one (the 3050). I think there's a setting in the nvidia control panel to force it to use the 3050 always. But this topic is not and AI one, so post your issues in the right one (no idea if there's a hardware channel)
why i got 25 fps on clean project?
did you knwo difference bewteen game and clena project?
clean projcet dos ahve any code?
1 litlte ltitel map with 1 character wihtout code
why i have 25fps it simpossible
25fps = lagg on clean project
But there's something definitely off since I have develop an AAA on a Intel i7 10 series with a 2060ti and it run projects with simple levels at 60fps
i even set scalabiltiy low
how can i have 25 fps
can you test 200ai? you should not have laggs with 500 ai
im sure thtas the reason why i ot allgs at 100ai
im sure you dont get laggs with 500 ai..
so my laptop is to low for unreal??
i think the 200ai is not the problem with laggs and fps
on clean projcet i have 25 fps ...
the problem is anotehr thing but idk what it is
my ram is on 70% and my cpu is only on 20%
why my fps is so low when my cpu is on 20% -.-
This is a hardware issue. Please use the right channel. Almost sure you are using the integrated gpu in you cpu instead of your nvidia gpu, but you need to use the commands that show gpu stats
Try at #profiling
I know you’ll disagree but imo it wouldn’t be a huge loss if they quit UE because they couldn’t run the engine anymore 😁
Check if your wall hast the "can ever affect navigation" set to true
Hi guys I have two questions:
- what is the difference between Radius and Acceptance Radius?
- what are their unit in the real world?
Radius - this is how big of a radius you want to search for a random point on the navigation mesh
Acceptance Radius - how close to the target destination you get before it is considered a "success"
All units are in cm in UE
my hardware should be enough
i have gaming laptop
on clean project i should have easily 60fps
easily ... it cant be ahrdware
here gpu stat
Again, wrong channel. Go to #profiling so you don't pollute the AI channel with unrelated to AI stuff please
nothing to do with #gameplay-ai , stay on topic
ai take huge performance
did you ever make a game with 500ai?
did ever code soemthing?
can you tell me if it slagging for you?
AI does not run on your gpu.
and you need to learn proper #profiling to determine the actual cause of your bad perf, as you've been told many times before
no, it's you trolling every channel you can find with your nonsense
you've been warned many times
can you tell me if you ever code something?
500ai for example?
is this laggs normal?
wait i show you video
Hey guys, in today's video, I'm going to be pushing Unreal and my PC to their limits! In a celebration of 5000 subscribers, I'm going to be spawning in 5000 AI's into UE4.
Thank you all so so much for 5000 subscribers! It really means a lot to me, thank you for all of your support :)
#Ue4 #UnrealEngine4 #5000AIs
_______________________________...
look exactly this
at 5k ai he got 5 fps and the game freeze?
and this is ecatly my problem
but i got this at 100-150 AI -.-
exactly the same... i drop to 5fps and its freeze
with 100ai i have 8 fps... full of laggs
it's not necessarily the AI, it can be anything from movement component, to animations, etc. on your actual characters/pawns
hence the need to do proper #profiling
you're taking wild stabs in the dark
event begin play---> ai mvoe to location
you will never build anything that works this way
do the work as you've been instructed or stop asking
here is ai channel?
cant you answer me if its normal taht 200 ai laggs?
did you ever code something? o.O
200AI is not much
its jsut normal... to ahev 200 AI
it can very well lag yes
yep
you profile.
men.
i dont ave code
i jsut have 200ai
begin paly run to lcaoiton
thats all
i can only delete character mvoement... and mesh 😄 thtas all i have
i ddelete all code!!!
tehre is no event tick nothing
just begin play-----> ai move to location xxxxx
its impossible that it laggs -.-
and i have gaming laptop... it simpossible -.-
@dense owl There is a clear language barrier issue here as well. If you cannot get through to a user, then just stop conversing with them.
Some, sure, but if you look at their entire message history, you'll probably notice this is not the main issue. It could be a health thing tho, for sure.
They are on their second strike, so if they continue after this, they are gone.
Id recommend you just not talk with them in the future.
tbh I had them blocked, but decided to answer that time, for some reason, so that's mb 😅
hes probably using mass or vertex/bone animation
or turbosequence
@coral widget 3 days ago (and since then, multiple times), we told to use Unreal Insights and to move your questions to #profiling.
From that message I'm replying to onwards, I replied with several recommendations and explanations about why your game might be lagging. Please follow the suggestions, move to the right channel and stop polluting this channel.
Stop asking about 200/500/5000 AI's until you have profiled please.
You can't even run an empty project at 60fps. Figure that one out first.
Also: "I don't have code" but... You have a move to call. That's code. You have animations? That's code.
Update: very low ram (16gb vs the recommended 64gb) causes a lot of cache operations, forcing the cpu to swap data in between ssd to ram to L-caches and back constantly That can impact performance massively
Last warning: move to the right channel or face reporting every single message about performance of your oc/project in this channel as spam.
That barrier is fictional. The person in question understands perfectly well whenever the answer is interesting for them. It's mostly a problem with being polite, having good manners and try the solutions before asking several times the same quesiton like a frenetic person. Happened with their first problem and it's happening again
I found this in the search as I am running into the same issue in 5.4 lol
UE is sitting right now at 44.7GB of RAM usage.
Hi guys somebody knows why my navmesh flickers when AI enemies move?
Any chance you can record a video? What you show in the images is not neccesarely bad/wrong. It might just be the debug draw of the nav. Some relevant questions:
- what type of nav config do you use? (static/dynamic with modifiers only/dynamic)
- have you checked if your re-build nav process is being triggered when the ai moves? It if does, can you check if your AI has any component with the "can ever affect navigation" flag on?
There should be some Z fighting going on. It's just a visual error
I think I am being too conservative with ticks for EQS Queries.
If I have an AI who is alerted to where the player is, to keep track of the player location, I have it update the location every 2 seconds rather than a much lower number rate...
Am I being too strict with the numbers? I know it is a loaded question and I can test with my own project, but do any of the others in this channel have stuff like location updates ticking every 60th of a second?
Bruno my gpus is on 10% my cpu 25% only my 16 ram is on 95% ? so only my ram is causing this laggs?
i have 16gb?
somehting is totally wrong?-.-
my gpu and cpu is on 20% max
Reported as spam.
I do. It's very rare that AI needs constant updates. Usually players do not notice decision changes within +-0.5s. My approach is to set things as low as possible (2s as you do) and, if nobody complains, leave it like that. There will be cases where you need immediate actions, like blocking a hit or something
??? when my gpu and my cpu is on 20% how can i ahve laggs its impossilbe? -.-
you told me its gpu ?
but tis on 10-20% o.O
Reported as spam
why? can you check your fps on lyra game maybe bruno?
Reported as spam
The explanation
#gameplay-ai message
okay i have 3 fps on lyra starter game i cant even move...
im happy the laggs come from antoehr problem liek i told ya....
so my game should not lagg the problem is 100% another
my hardware is strong enough for this ...
3fps on lyra starter game is impossible
Unreal Engine will use resources based on what it needs to run the game smoothly. Obviously you are experiencing some issues here; it almost sounds as if your system is running the game using the background lag. Usually when you are tabbing out of the engine or game, it reduces the resources it is using significantly. Perhaps this is triggered w...
he got 50fps i have 3 fps
i have same hardware...
i have better graphic card
its impossible that i have 3 fps
(Machine translating)
Dies ist eine maschinengenerierte Google-Übersetzung:
@coral widget vor 3 Tagen (und seitdem mehrmals) haben wir Sie aufgefordert, Unreal Insights zu verwenden und Ihre Fragen ins #profiling zu verschieben.
Ab der Nachricht, auf die ich antworte, habe ich mit mehreren Empfehlungen und Erklärungen geantwortet, warum Ihr Spiel möglicherweise verzögert ist. Bitte folgen Sie den Vorschlägen, wechseln Sie zum richtigen Kanal und hören Sie auf, diesen Kanal zu verschmutzen.
Hören Sie bitte auf, nach 200/500/5000 AIs zu fragen, bis Sie ein Profil erstellt haben.
Sie können nicht einmal ein leeres Projekt mit 60 fps ausführen. Finden Sie das zuerst heraus.
Außerdem: „Ich habe keinen Code“, aber ... Sie haben einen „Move To“-Aufruf. Das ist Code. Sie haben Animationen? Das ist Code.
Letzte Warnung: Wechseln Sie zum richtigen Kanal oder zur Gesichtsberichterstattung.
Anmerkung des Übersetzers: Bitte senden Sie mir keine Nachrichten. Ich spreche kein Deutsch. Sie wurden gebeten, Ihre Hardware zunächst mit dem Unreal Editor zu überprüfen. Gehen Sie zu #profiling
its not insight its not profiling!
its nothign of them and i happy about this
cause my game should not lagg the code is ok.
the problem is 100% another but idk what
i dont need insight and profiel im happy about that agian. cause my game should not lagg i dont have to chagne the code
the problem is 100% another.
maybe someone can help me? to find the problem ...
i even have 1fps on lyra starter game
you can run lyra game on a pc from 1999 and it will work. for sure
i have 1-10fps on lyra.... that is impossible!!!!!!!
For real, I'm this close to report your discord user. Stop asking performance stuff here. Go to the damn Profile channel. If you ask for advice there, they will gladly help you an explain why things happen
Holy shit dude... I'm usually patient but you are a special case
lyra : 1-10 fps my game : 15-20 fps so im happy
my game have less eprforamnce then lyra.
and lyra dont have laggs
so im happy ... its not insight. its not profiling. it snot change code
but how is this possible... anyone know here?
anyone can help me?
You aren't listening. Ask in the #profiling.
Whatever you think it is or isn't, you haven't asked yet. Don't type 5+ messages saying it's impossible or comparing FPS. Just go to the channel and ask. Or saying your gaming laptop or 50 AIs or 15-20 FPS or saying its impossible isn't helping. At this point, everyone you're seeking help from is going to block you for just spamming. Don't reply to me, just go to #profiling and at least pose the issue there.
HI! What is the best way to become an AI developer without a computer science degree?
The same way as anything else. Build shit.
oh my god
i lvoe you brunoooooo
i had 1-10 fps on lyra
now i have 60 fps!
sometimes 59 fps but mot tiem 60 fps without any lag!!!!!!!!!!!!!
brunnoooooo i love youuuuuuuuuuuuuuu
yes but is it possible to be competitive in the industry?
Yeah
Just don't suck
The big challenge is getting through HR filters
Because there are places that won't even see your application because you don't have a degree
but need c++?
Of course
Programming AI only with blueprints doesn't go very far, right?
Not if you're trying to get hired
what does a junior AI programmer do?
Junior stuff. You won't escape C++ if you're trying to be a programmer in UE.
Small stuff and features with an overseer checkign everything you do (a senior or a lead). You are expected to not know jack shit, but to put enough interest and effort that you will get things done bit by bit. Then reaoonaabilities will grow while you get the jist of team work, how production works, meetings, soft skills etc
it's easier to get an AI dev job with a good AI knowledge but basic c++ knowledge or good c++ knowdlege but with low AI knowdlege? @slow bobcat @harsh storm
Learn 👏 C++ 👏 if 👏 you 👏 want 👏 to 👏 be 👏 a 👏 programmer 👏 in 👏 Unreal 👏
Stop trying to figure out the shortest route.
Build stuff
Stop talking.
Build
Go build a custom state machine in C++
Go build a heat map in C++
Go build a behavior tree in C++
Just. Build. Shit.
Having all the knowledge in the world about AI means jack if you can't actually build the AI
Thank you for your clarifications, I'm not looking for the simplest way, I'm looking for a specialization after years of generalist
you dont need c++ ^^
smh
Hi guys, do you know how is the better way to make a horde of enemies not run in a straight line, when the follow the player?
If you have also a video is good
Thanks
Try the DetourCrow Ai controller
IT WORKS 🥹
Thank you, now I read the documentation
There is not a lot of documentation for that... Do you know soem good tutorial or page for it?
Anyone have to work with the new NavigationElement class they added in 5.5 to navmesh generation? Ported our project to 5.5 and things are pretty smooth, except nav mesh generation explodes because the geometry validator (non-shipping only) is complaining about trying to resolve a weak pointer on a non-game thread. However, the entire stack (on the background thread) that blows up is engine code and not our code.
Obviously its something specific to us or more folks would be complaining, but as far as I can tell we simple did some different tile sorting in a recastMeshGenerator and thats about it
My guess is maybe bDoFullyAsyncNavDataGathering and editor time don't get along anymore
hi guys, in case I want to make my own path finding algorithm, what is the best practice to access navigation graph data structure? is it using nav mesh data? or is there any better UE nav data I can utilize to achive this?
What Durox answered. I was a programmer in java for stuff not related to games, then I did a masters where we had to build our engine and a game on top with c++. That was hard for me because I had never did c++ before (did C in my studying years tough). Knowing c++ not only allows you to be an unreal dev, but you can be a game dev everywhere (there are tons of companies using their custom engines). Learning AI is a matter read, try, repeat.
Please don't give this kind of advice. That's not true if you want to join any profesional game dev role as an AI programmer.
This one is tricky.
Basically you have 3 elements in unreal:
- the PImplRecast class, which overrides and calls functions from the Recast Detour library. This is where the data is processed (paths calculated, string pulling, operations to get the closest poly to a location etc)
- the RecastNavMeshObject: this is where all the nav data is generated stored. There are also functions for nav operations (mostly exposing things from the above)
- the nav system, which connects gameplay to the nav data (with functions to get paths etc etc). It's the highest layer of the puzzle.
There are other related things like the path following component or the move requests (which contain the path info), but those are used once you have a path mostly.
Now, your main problem is that you need to either create/override functions in PImplRecast or in another class of your own to override what the detour recast library does. And that's not convenient because none of that was built in a user friendly way, aka: you need to modify the engine source code and maintain changes when upgrading it.
All that assuming you want to keep thing in the same place as they are.
But, if you just want to use some other class with your own logic, everything you need is in the Nav Recast object in unreal, the nav data.
Man, thanks a lot, this is surely reduced the scope I need to dig in. I will take a look on this PImplRecast implementation
If by any chance you find a not very intrusive way to replace that file for a custom one, please let me know. It's something I'm very interested into
Is this not common thing on ai dev? I am not sure if I can actually. basically I need to generate a guide for my AI for some action. and this involved nav mesh, because it is not possible for me to trace everything on the map from stratch, I am taking a look on EQS too, it is awesome feature. I think it would be more flexible if I can find a way to read and play around with nav data
Cna you describe an example of what are you trying to achieve exactly? Maybe I can help/advice/suggest soemthing. Or at least I can be your rubber duck
Silly reason actually, I use GameAnimationSample for my locomotion. On UE 5.5 update, It doesn't work with AI move, but when I move the character manually using add movement input, it works. So I was thinking why don't I create my own path for this purpose and move the AI manually
Ah... You don't need to. Just use the default path calculation and use it. There are functions in the navigation system class to get a path from A to B. It will return a FNavPath with all the points and info. Then you can do whatever you want with it. I would even argue that just might need to mess with the AIPathFollowingComponent
Man, sorry to troubled you, I am too eager to create my own 
This one right? I can even access it on blueprint
Yeah. Check if you can use the Async version. Unless you need the path in the same frame, it's better to use the async, cheaper on the game thread
Is it possible to have two nav meshes present in a level?
One which is a static, low res, and permanent navmesh which is built in the editor. (This is what I want)
And another one which is a fully dynamic high res navmesh which it built at runtime using nav invokers? (This is what I have, but I also want the one above)
Because what I want to achieve is a way to make my npc travel across very long distances but with my current setup ***(A navmeshbounds that covers the entire level and a dynamic navmesh with generation only around invokers) ***it's not possible for the npcs to pathfind across long distances since the navmesh isn't generated that far.
this people never code somehting 😄 this people neve rused 200 ai wtf 😄 in 10 years 😄
this guys talking me about profile insight when i have 5 fps on lyra 😄
i can ask a kid 5 years old theere answers would be better.
planet is full is this senselss people dont know anything
You can have multiple navmeshes but not entirely sure whether one can be dynamic and the other not. This is kinda obscure/deep knowledge, I would look at whether the dynamic rebuild setting can be somehow applied on a per navmesh basis for starters
I don't think you can have them be different types. It is a project wide setting.
You can customize which actors affect the navmesh generation, so maybe you can use that to make it so only one of them is affected by the actors you want to affect the dynamically generated one https://zomgmoz.tv/unreal/Navigation-System/Customize-which-actors-affect-navmesh-generation
I've used this in my game to create a secondary navmesh which is used to perform some additional reachability checks, where it ignores certain kinds of things for it
but in my case they are both still dynamic
You can't have two types mixed. That said, epic sneakely released a experimental feature for long distance navigation. Basically a data tree that connects areas. Can't recall the name. Will Google it / ask around. It's pretty much what dead stranding uses
Keep in mind that two NavMeshes, as nice as that sounds, also eat quite the chunk of performance/RAM.
We had 2 on The Ascent and I was so naive to add a third one, for again different settings.
:D We undid that pretty quickly.
That reminds me I should finish that game sometime
Me too
Yeah cos it's kinda buggy still?
yesterday i had 60 fps on lyra
lol
I know... I just can't seem to figure out how to do long distance travel
after i delete all clean all laptop reinstall widnwos etc
i have 5 fps again -.-
what is causing this?
Beats me. Think our contact ended shortly before release.
heh
yesterday i did make the gpu make high performance formg arifk and it workde then
totday it dont work anymore -.-
Yeah I mean we ran into a few issues with mp but for the most part it's fine :D
I never got myself to try it afterwards. I played too many random missions and had earworms of Poon telling me about showering in shit.
is onedrive? the problem why i have low fps?
Found a much better way to deal with that. One day will prepare a talk about it.
If you are using a Laptop, you might have a dedicated GPU that UE is not utilizing?
Ah, Bruno Bruno
Don't. For your own good, don't even answer. Check the last 4 days with this person and how problem and you will understand why
Man you need a profile picture dude
Heard that somewhere else haha
There you go
This is not the profile performance channel
It took me way too long to connect the dots of a Bruno being in an AI channel.
it dont work -.-
Please post your problems in the right channel Silvers
pls bruno ... if you cant help me let other peoples help me!
Silvers has 2 active strikes. Pretty sure this will quickly solve itself.
They will help you in the correct channel! People who know about performance issues will not be on the lookout for such issues in the AI channel.
That's me. Literally