#gameplay-ai
1 messages · Page 106 of 1
It’s sort of workin...
He’s now stopping in the corner facing the wall contemplating all that went wrong in its 2 day lifespan
and you checked the eqs and whats it doing in the gameplay debugger?
I did check it’s stats and I thin fixing the staring at wall problem
But he keeps stuttering when moving and it looks always
(Also how do I debug with this thing?)
what stats?
use the gameplay debugger
press the ' key
click on the AI
and use numpad keys to select which info to display
K
does anyone know the best solution for doing an EQS trace test against visibility but AI character also blocks visibility so the best choice point is not an actual hiding point with respect to the player? My AI character blocks visibility and i use that for other trace tests in blueprints so i don't want to define a whole new trace channel for my AI character but I really only want the EQS to return visibility blocked traces and exclude characters/pawns from the trace .
Are there any better ways to get the AI to climb vertically up a surface? i'm currently using navlinks but that doesn't work without me tilting the shape slightly, creating a launchpad effect(also, why does that happen?)
im confused
navlinks should link the mesh to the mesh over an obstacle
or mesh to another mesh
@void cloak so your ai approaches the obstacle and should climb onto it?
yeah, no fancy animation, just simply jumps up onto it
you using smart links?
smart links?
create a navlink proxy blueprint
and there is an event called on smartlink reached
it returns the end position of the nav link
i mean it has the end position of the nav link
then you need to lerp your character up the obstacle (can use a timeline)
i see
or apply jump and a forward force
thx
if you need any help with it let me know
smart link is a single link (left and right points) same as a normal nav link but disables pathfollowing whilst using the link and you can do whatever needs to be done, then renable path following
@void cloak if you get stuck i actually have a small project here doing exactly what you need
How do you die?
Is it possible for there to be a test/decorator that only lets the EQS task activate when it’s within certain proximity of an EQS pawn?
I barely know anything about it
Does it set up the environment for the EQS task or is it just a debugging tool that tells you which areas are more fitting?
debugging tool
Oh
I see now. Removing them didn’t change anything
Still, it’s annoying it keeps stopping to get a new vector
Also I want to make it use EQS when it seems like there’s only one path to go
Anyone know how to fix that?
Any Ideas what would cause "MoveToLocationOrActor" to succeed without actually moving? I have the acceptance radius as 5cm.
it adds pawn's overlaps by default
which can include stuff like WidgeComponents
and if you're close enough that one of your overlaps is within 5UU...
also, stopping previous MoveTo will return success iirc
With EQS, how do I keep him from standing in corners like some a little kid who farted in mom’s mouth?
Also how or what can I do with the Query Config thing?
you need to debug why he has stopped
whats the BT doing? what is the eqs query saying?
and the config is for changing EQS query values at runtime
or per AI
(How do I click on the AI in debug mode when the camera is connected to the mouse)
@tropic lily If you look at the top of the blueprint (on the line with the Play button) you can select which instance of the actor in the level you're watching for debugging.
Hi folks. Having a really strange/frustrating issue with pathfinding. I have a pawn class that's set up to turn around and run directly behind them when they register a stimulus. On the move to, I have "Use Pathfinding" unchecked.
When they register the stimulus, they turn around and run in the opposite direction of where they were looking, but most of them appear to still be using pathfinding
You can see below their initial starting positions and then at the bottom where they ended up. Ones that didn't pathfind ended up in the over-turned porta-potties, and ones that did are to the side or behind them
I am 100% sure that it's because they're still using pathfinding, because when I delete the navmesh, they suddenly behave as intended
I've tried every setting on the moveto node and also tried turning off RVO avoidance to no avail. Any ideas?
Upon a little more tinkering, it seems like it's because the ai I'm using is a child of the detour ai crowd controller. Is there any way reason that would use pathfinding when it's explicitly told not to/any way to turn that off while still gaining the benefits of it when you do want to use pathfinding?
With Unreal Engine’s boundless capabilities in the world of graphics, you better have some hyper realistic shit flinging in a porta potty game
They're not really the focus, but I do have a decal that slowly spreads outward from the porta-potty once it falls over. You just can't see it here because they're placed incorrectly. And yes, I'm definitely an adult.
Same. I’m just more open in how disgusting I am
Speaking of disgust, at least in the intellectual level, I need help
Hi there! So if I'm working on AI in a 3D space game, what would "replace" the navmesh? Would I have to brute force most things or are there tools?
@woven pilot here is a free 3D pathfinding plugin if thats what your looking for https://www.unrealengine.com/marketplace/don-s-3d-pathfinding-flying-ai
Thanks! Although I think this is overkill, my game will have the odd asteroid field and half a dozen ships in combat. The motion also is steering based so it's smooth, not just movement in a straight line like in that plugin
Hey how do I make an sequence skip over a task if certain conditions are not met for that task?
I want it to skip over it and not get stuck because a key isn’t set
that is what decorators are for
I know but which decorator is it?
I tried the blackboard one but it just got stuck waiting for input
Why do my Ai act like T-Rexes? if I don't move..they don't seem to know i'm there. melee guy runs up, attacks me, and if I'm not moving, despite being right in front of him, he thinks I've disappeared and runs off to do patrol stuff.
So what appears to be happening is that after my AI sense sight sees the player. The AI moves to the player, performs a melee attack, and despite being right in front of the player, the AI controller is then losing sense of the player. The range on the sight is 1000/1800 with an auto success range of 500. If the player doesn't move the AI just seems to fail to sense them with sight. https://blueprintue.com/blueprint/q13p2mmh/ There is a full copy of the BP, easier to see...but I'm failing on the print node "Failing Successfully sensed" Is there some minimum distance that sight doesn't work?
i know in my case, the eyes for my enemies are attached to a socket on the mesh
when they perform certain attacks, the animation can result in the socket going behind the player, resulting in sight being lost
like when the lean/lunge forward
But when the animation is finished the sockets should go back to their normal place right?
In my case the AI performs the attack, stands in front of the player for several seconds , then just wonders off
how often does perception update?
I just timed it there now, it's about 9-10 seconds after the attack before he fails out and wanders off
i don't know the frequency for sight updating, and my enemies do re-capture sight of the player when finishing the attack once the animation has finished
sight should update faster than that
are you aware of the gameplay debugger? it can show the sense of your perception component
I also have my AI sensing on hearing and damage.
I've seen that
but..
I can't get it to work if I deposses my controller
my pawn
It only seems to show details when I'm actually in the player pawn.
so if I deposses to get a better view of what's going on, the overlays and stuff disappear
same here
let me try it though..it's uhm... ' to enable it right?
I've already been standing in front of him for over 10 seconds now.. he hasn't failed yet..but still not really doing anything
perception says your still in sight though?
That one did
I moved around, he started to attack me again
then the next time he failed out
even though I was right in front of him
It's hard to see from the first person view
were you still in his sight during his attack the whole time, or did he lose sight?
I'm trying it again, I seem to have better info on this one.
This guy has wandered off
I still seem to be in sight
but he's doing patrol
he's only supposed to do patrol if the enemy key isn't set.
but it should be set, since he's sensing me
are you using decorators to abort pending tasks? cause it might wait until it finishes patrolling before it tries to attack you
I had that issue when making it attack
so as soon as you move, it then acknowledges you?
As soon as I shot that cactus near him, he changed behaviour and came at me.
Because i made a noise
and he reacts to sound.
but after one attack he just stands there.
and then goes to patrol again.
despite me being in range
if I move around him, like strafe or whatever. he'll just k eep attacking over and over like he should
stop moving and I'm a ghost.
let me try to take a quick video
Okay so you can see it here. When I unpause, he's already attacked so he's just standing there. If I move he reacts. I circle him, he keeps attacking, but then I stop moving and he stops. https://youtu.be/LzaM8VRD-2E
Here are the settings from the AI Controller
how long does he wait once you stop moving, or does he just stand there forever?
Once he stood there a long time, but usually around 10 seconds
this time he's standing there indefinitely
But it's failed several times
I have a bunch of log messages from that check failling
i noticed in the video that the green sphere for sight isn't tracking you like it does for my character
do your characters have stimuli source components?
the is within range decorator is aborting both self and lower priority
I've been running range AI for months now without issue, just today trying to set up melee
they always seem to see and pickup the character
the only stimuli generator I've set up myself was making a noise when the gun fires and where the bullet impacts
ok
and a noise when the player lands from a jump
but with range AI I never stay still
so I wouldn't have noticed this issue
stay still and they slaughter you in a few seconds
is that what its stuck on when its not moving? the yellow outlined parts?
Yes the melee attack
but I've checked that and it seems fine also
all the expected values are there
something in the behavior could be stalling it?
the melee sequence tree
his check shows that he is not in the middle of a melee attack so it should be moving forward.
other nodes are returning correct values
There is the full meleeattack function if you want to see it: https://blueprintue.com/blueprint/1k90mm5b/
The animBP has an anim notify that resets that boolean, since the attacks are of different lengths.
Showing him on melee attack
but there is no reason for him to be hung up on that.
i think for your melee task, you need to end it Finish Execute
you got it for when you start the attack
but not for when your already attacking
ah
let me try that
I always miss little things like that.
at least once
Thanks so much man.
That was it
That was foolish. haha
Good news is, I learn from those kinds of things pretty well 😉
its happened to me too
Don't suppose you know how to get them to stop snapping to their original location after doing an animation? I've got 2 attack animations that move them ahead, but when they finish they snap back to the starting point. I tried checking the box for root motion but that didn't seem to help
were the attacks montage based?
nope just an animation
the third one
I think you saw it in the video, the one where it jumps up and spins
it ends up a couple meters ahead, but then snaps back
ok
do they work better as a montage?
and your using an anim blueprint?
Yes I am
in your anim blueprint, in class defaults
there is a root montage mode, by default it should be set to from montages only
yes
Okay let me try that
it was confusing because I used the same animations for my first person and it had no problem with it at all
ah nope
that didn't work
just had an AI do the big power move and he still snapped back
have your animations enabled root motion?
does the animation still snap back in the preview window?
ah really?
I thought the root thing would reset it's location
so that when the anim blueprint sent him back to idle, he'd move to idle on the spot
can you gif the animation playing?
in the game or preview editor?
preview
that snap back is just from the animation looping in preview. The animation finishes up ahead.
The other odd thing about that animation..is if the AI starts that attack and I back away quickly, he'll teleport in the middle of the move in front of me.
He does it about 2 times in this video, kind of strange: https://youtu.be/zieFVriUZvo
Just found this: "I am using mixamo anims and they currently seem to have no usable root motion" the anims I'm using are from mixamo. That might be the problem there.
Any good tutorial/source for vehicle AI (3d Side Scrolling Shooter)?
??
Hi I'm new in the AI, but I want to learn AI in the behaviour three.
I want to make a simple bot like in the shooters.
Can someone suggest a nice video tutorial how AI works and how I can make a simple bot. Thanks!
check pinned messages on the channel
Hi folks. I'm still having an issue with pathfinding around the Move To node, but I have a much better handle one what's happening so maybe I can explain it better now.
I have a pawn set up with an AIcontroller that's a child of the DetourCrowdAIController. I'm attempting to make the pawn ignore pathfinding in certain situations, but the DetourCrowdAIController is ignoring the Use Pathfinding flag being unchecked on the Move To nodes.
I'm 100% sure this is what's happening, because I've swapped the pawns over to a child of AIController and they suddenly respect the Use Pathfinding flag. While using the DetourCrowd version, I've tried everything I could think of to make the pawns not pathfind, and the only thing that has made a difference is flat out deleting the Navmesh.
Does anyone know if this is intended behavior? If it is, is there any blueprint accessible way to change it? Or should I just give up now and pursue a different solution?
What do those red lines near decorators mean?
fail
Failed to check the condition, or what exactly?
the condition failed
Thought it's an error or something, 'cause each time it appears my BT breaks...
Aight, thanks
I'm still having this issue where if I stay still, or don't create a "noise" then the AI will lose track of me. Like their sight doesn't seem to keep track of me unless I do something else, like jump, shoot them, etc.
they sometimes see me with sight, but even after chasing me for a little while, their perception seems to lose me , even when I'm right in front of them.
it's not a behaviour tree issue, it's the AI controller reporting that it can't see the player.
Alright so I have the classic AI Move to random point in the navigation area.. blueprint set up
Cuz idk how to use blackboards yet frankly.
Anyways, Im trying to have it chase the player but not be able to go to that player in one move
Basically, have it chase in the style of Baldi (assuming you know who that is)
Without blackboards, is it possible to make that?
I have an issue where my AI walk and sound like a marching army, I have 2 foot steps sounds each time the AI hits the ground but these 2 get repeative, how can I make my AI foot steps more realistic when I can onky add 2 foot steps sounds
@dreamy surge how are you spawning the sound?
My Ai has waypoint where it moving to but my problem is, the AI is look in the walking direction but the foots are walking like right or left and not forward
I am spawning the sound with a cue file
I'm working on a reinforcement learning, model free AI system in UE4 based on a biologically inspired intelligence model. The backbone of my approach is to use a "Goal Oriented Action Planning" system, where agents choose actions which best satisfy their motivations.
@jovial valve you literally couldnt throw more buzzwords together
also a bunch of those are separated things altogether
I'm trying to have a boolean shared accross all instance of a certain Blackboard
but for some reason when I set that boolean using one of the AIC that's using that blackboard
the other blackboard are not synced. I.e the boolean is false on the other one :\
Can someone please clarify with me how the Instance Synced option in the Blackboard works?
Thanks in advance!
Seems like this was a problem in enum back in 4.7 but was fixed: https://answers.unrealengine.com/questions/178905/47-why-is-my-blackboard-key-with-instance-synced-e.html
tho I'm still seeing the problem :-?
From the AI debug UI, I can see clearly that the first AI spawn who set that boolean to true has his boolean true:
however, when another AI spawned, this boolean value is false (bAggressive):
And here's my blackboard setup for that key:
Does instance synced works across all child instance of a blackboard or they must all using the same blackboard for this to work?
the only thing that might not make this work from what I'm observing is that, my BB_Wolf and the BB_Hannibal are child of the BB_EnemyBase and thus they might not be the same "instance" :-? ...
@wild mortar Can you confirm that your AI controllers instantiate the same blackboard resource?
How may I check that?
Are you using blueprints or C++?
I can definitely print something from the OnUsingBlackBoard event
I'm using Blueprint
Unfortunately I usually use C++, so I'm not sure how to instantiate in blueprint
BlackboardComp->InitializeBlackboard(*avatar->BehaviorTree->BlackboardAsset);
I use UseBlackboard where you specify the BlackBoard blueprint to use (asset)
Jeff is probably doing the same
I'm actually just letting the behaviortree decide what blackboard to use
I'm using SpawnAIFromClass to spawn my AIs
and in there it lets me specify the tree
I thought that it would also infers from the tree the Blackboard :-? ..
mmh it's true that they are associated in the Editor so it must know somehow? I do the same but I have Use Blackboard as well on BeginPlay of the AIController
I believe my question fits in the category. I am trying to broadcast a float from my placer character to all AI in range. The variable would then be used by the AI
in blueprints, perhaps you can check to see if your behavior tree or blackboard asset is instantiated , And if they are, are they instance of the same asset?
Yeah, is there an identifier that I can use to check that?
yeah, do a get blackboard isvalid and a print of a totext
I'll do it too because I'm also interested in the answer, I don't know as of yet if the AIs blackboard entries are actually synced in my case
Hmm, I tried both ToText and ToString
but they only return "BlackboardComponent"
not an identifier for the actual instance
Here's my BP:
Jeff, How about https://forums.unrealengine.com/development-discussion/c-gameplay-programming/92866-multiple-ai-bots-shares-the-same-behavior-tree
Unreal Engine Forums
For gameplay programmers writing C++ code.
maybe some helpful hints there, I apologize if there isn't any
Thank you for providing the resource !
Hmm, I wonder if a blackboard is a child of another blackboard
I.e, this setup:
Where I have my WolfBB be a child of the EnemyBase BB
and the boolean I would like to sync is from the parent
Yeah, the boolean I wanted to sync is in the EnemyBase
is EnemyBase key sync or you change the sync flag on the child?
I'm approaching this in terms of memory pointers
if both AI controllers point to the same memory address when accessing their blackboards
And in the blackboard of the Wolf:
then there should be sync
Hmm, I wonder if in BP I can print something like the memory address or the instance ID of the blackboard being used
if one AI controller points to a different memory address than in the other one, Then you end up with two objects, out of sync
out of sync by design
would it be possible to use the same enemyboard BB For all your AI controllers as a test?
With trial and error and see what the difference is when your AI controllers use only the parent BB, or if there is a mix-and-match parent/child BB
The joys of programming this troubleshooting is 😃
just remember at low level is just plain ol' C++ pointers
I'm actually setting it up so that these AI are using the same blackboard and see if that works
Just gonna do it in a separate project real quick cuz I don't want to experiment on existing stuff :p
you could actually get all blackboards and compare them
to debug the issue, I hope == would tell you if those are different instances? maybe not.
I'll shut up and let somebody with more experience help you xD
Actually cat, I mean the same boat as you, most of the time I think I should just shut up and let somebody else with more experience help
@floral bobcat But in the end it's a learning experience for all of us
motivational speech FTW 😃
depends how == is being implemented, but in case I suspect it would be == of the same memory address
hahah great
Just wanted to say thank you to both of y'all for the suggestion. I mean we're just slacking on this chat, I don't think exp matter :p
Hmm interesting
I'm testing this out with an actor
as a synced instance
and it works
I.e, I'm having an Actor reference in my Blackboard that point to my player actor
And everytime the AIC uses blackboard, it quickly grab the player via get player actor and then set it in the blackboard
But if the player actor key is already set (i,e I grab it and check for validity), then it will not get the player actor again
and this actually synced properly
I wonder if this is because for boolean, the value in blackboard are stored by value versus the actor being stored by reference?...
is it a pain to use an Integer to test that out?
In case you're feeling adventurous later, I learned a lot from YourUEPath\Engine\Source\Developer\AITestSuite\Private\Tests\
there are some good tests of how to implement everything at the backend from C++ and don't use blueprints at all
not needed for the issue at hand though
Yeah I'm gonna test out with an interger real quick
A bit off-topic, but do you know of any free tool that streamline the C++ coding when it comes to header inclusion? @lyric flint
At the moment for C++ I'm pretty much just search the header in the Engine folder
Hmm, @floral bobcat integer does not seems to work
I don't know of such tool 😦 are there commercial ones?
what do you mean by streamline? you mean an inclusion tree of all the headers?
By streamline I refer to how in .NET C# or some other language where the editor derives where a class might come from and allow me to choose between different header to include
Behavior similar to how in intelJ editor with Java/Android
BTW, I found the problem!
So it was because of AIC instance
For each AI, I used a different AIC that's a child of a base AIC
but a class can only come from one header otherwise the compiler would complain. And you can "jump to declaration/definition" from any variable in most modern editors
@wild mortar "So it was because of AIC instance". YAY! 😄
Yeah, it seems
if I tweak the boolean/int from the base AIC itself
then all the instance are synced correctly
This's gonna be a bit tricky because I just want to toggle that boolean only when a certain monster is spawn :-? ..
Add conditions
maybe like a switch, and keep track of the monsters class by assigning an integer unique
that's how I usually do it
Yeah I will probably use a public int in the base AIC then set it for each of the AIC and then do just that
because I love the integers so much, and I hate strings, I usually FNV64 everything
Haha there was a GDC session some year ago when a guy from DigiPen said if you use string comparission in your game he would gladly give you a whacking :p
And he was right!
just imagine the defense in CPU cycles used to evaluate one integer versus one array of chars
difference*
yup
preaching programming without efficiency is like my grandfather running the marathon
he may eventually get to the finish line, but definitely a few days later 😃
anw thanks a lot @lyric flint and @floral bobcat for all the suggestions. I guess the lesson is if I wanted to sync any variable from a base BB, I better do it from the base AIC.
glad to be of assistance
And also glad to see my eccentric self sometimes act like a normal person 😃
So after an hour of fiddling with it, it appears that the parent AIC was not the case
After adding the logic to check for the type of AI who's toggling the boolean/integer
The other instance of the BB is now not receiving the right value. Only the AI that passed the branch check
So it seems that my simple test with the integer prior was actually a fail test, probably I messed up the condition for that one :\ ...
@wild mortar In C++ there is a function OnTargetPerceptionUpdated
there may be others, but this one I used before
if you can confirm that
your AI controllers are instance of the same AI controller class
the AI controller class instantiates on possess the same blackboard resource
and instance sync Is enabled on said blackboard resource
trace the variable that should be updated in the OnTargetPerceptionUpdated
but perhaps InstanceSync calls/is being called from a different function under the hood
This is what happens under the hood
` if (Key.bInstanceSynced)
{
UBlackboardData* const OtherBlackboardAsset = OtherBlackboard->GetBlackboardAsset();
const int32 OtherKeyID = OtherBlackboardAsset ? OtherBlackboardAsset->GetKeyID(Key.EntryName) : FBlackboard::InvalidKey;
if (OtherKeyID != FBlackboard::InvalidKey)
{
const FBlackboardEntry* const OtherKey = OtherBlackboard->GetBlackboardAsset()->GetKey(OtherKeyID);
check(Key.EntryName == OtherKey->EntryName);
check(Key.KeyType == OtherKey->KeyType);
const uint16 DataOffset = Key.KeyType->IsInstanced() ? sizeof(FBlackboardInstancedKeyMemory) : 0;
const int32 KeyID = BlackboardAsset->GetKeyID(Key.EntryName);
uint8* RawData = GetKeyRawData(KeyID) + DataOffset;
uint8* RawSource = OtherBlackboard->GetKeyRawData(OtherKeyID) + DataOffset;
UBlackboardKeyType* KeyOb = Key.KeyType->IsInstanced() ? KeyInstances[KeyID] : Key.KeyType;
const UBlackboardKeyType* SourceKeyOb = Key.KeyType->IsInstanced() ? OtherBlackboard->KeyInstances[OtherKeyID] : Key.KeyType;
KeyOb->CopyValues(*this, RawData, SourceKeyOb, RawSource);
}
}`
perhaps you can make manually an array of AI controllers and check at certain triggers how they exchange information with each other
Because sometimes it's just a matter of the order they update their internal state
Thanks so much for the insight @lyric flint . I'm setting up some test on a separate project and I will try your suggestion
I think I found the problem. It seems that Blackboard are instanced per Behavior Tree, and since my two enemy uses different behavior tree, the blackboard was not synced properly.
In my empty project, I have a setup where there are 2 AI character. The first has the parent AIC while the second uses a child AIC
The BP of the first is the base while the BP of the second is a child BP
only when I change the BT when I spawn the AI using SpawnAIFromClass will there is a new instance of the BB
Further experiment suggest that the BT itself is not the case
but the actual Blackboard
I must use the same blackboard, not child blackboard
i.e, blackboard that inherit from another blackboard is not the same instance as its parent
While trying to optimise the cpu usage I found that my NPCs take 15ms per frame, especially this "charmovecomp" thing.
Any idea how I an disable this as long as the NPCs are irrelevant (far away)?
Disabling the movement component has no effect
that handles a lot of things, including checking for overlaps
which is probably your issue
how do i make Nav Links work?
This function is never reached, although the AI snaps to one of the points
no messages or something
Ahà, i have to fix this on my game as well. I think the navigation link only tells the ai that he can go there but not how. I have the jump animation when the ai is in the air and sometimes it manages to do it. I might look up how to do it properly later.
@little bridge It depends what you want to do. That is what you want your AI to do
there are some choices ranging from finite state machines, behavior trees, environment query systems, machine learning
for example if you made the card game, finite state machines would be your way to go. I reversed engineered Gwent, the original card minigame from Witcher 3 a while back, and It uses finite state machines
if anyone wants to see and learn from their implementation, let me know
now moving forward, behavior trees
C++ or blueprint?
I prefer C++ :-). But I found on YouTube very good Blueprint tutorial made by Mathew Wadstein , eg https://www.youtube.com/watch?v=bsDT95UdPbc
What is the Behavior Tree in Unreal Engine 4 Source Files: https://github.com/MWadstein/wtf-hdi-files
YouTube also have some EQS Tutorials
And I think I've seen a plug-in on marketplace For a machine learning agent
but the most common approach is behavior trees. You can start with the tutorials from Mathew Wadstein
And then get confused between the intricacies of decorators services and tasks 😛
thank you 😃
@little bridge no problem 🙂
@serene pelican did you get the navlinks working
i have used them alot so pretty versed with them
What replaced UNavigationSystem::SimpleToMove() in 4.20+
@tardy carbon Maybe UNavigationSystemV1:: ?
I looked around there I will double check
when header in api doc says this Runtime/NavigationSystem/Public/NavigationSystem.h
its Eng.ijne/?
I did it all is good
Has anybody here worked with custom BTService nodes written in C++? Not blueprints?
I'm having a really weird problem where the tick rate that I specify on the nodes is not being respected
it seems that my service nodes are ticking at the frame rate or something similar
even though they are set to only tick once every .5 seconds
in c++ and my ArgoCheck.cpp service is ticking way too much
YourPath\Epic Games\UE_4.xx\Engine\Source\Developer\AITestSuite\Private\Tests\
@ripe whale
I learned some stuff from those tests 😃
alright cool I will check them out, you think my answer is in there somewhere?
Those are behavior trees implementation without any blueprints, everything C++ low-level backend or other similar fancy words 😃
I just hope they should give you some sort of hint @ripe whale
Alright cool I will take a look thanks
I figured out my problem... I forgot to call Super::TickNode in my BTService derived classes lol!
At least it only took me an hour to figure out
Hey. I'm looking for tips for a good pawn architecture, meaning character/AI controlled possibly.
Where would I update the blackboard values ? AIController right ?
Should I access actors of the scene like with GetPlayerPawn in a BT node ( Service, decorator etc ) ? Or do I set a blackboard value with it ?
@pine steeple No, Haven't make it work yet
@sterile solstice Yeah you want all AI stuff done through the AIC because in multiplayer it will only happen on the server, which means less work for each client to do and that there won't be any strange local AI behavior.
Hey guys I'm a bit stuck. I'm currently making an RTS game but I'm stuck getting the AI to work the way I want them to. They are not going to do much. The player sends them to a marked location. If there is an enemy in sight, they shoot and if there are no enemies in sight and the the AI is close to the enemy base, shoot at that. My problem is that once the AI kills its target, its just standing there without continuing to attack other enemies if nearby. Is there any good tutorials or resources to create something like this?
well if they get stuck and wont find a new target the BT is probably stuck in a task
have you ran the game and watched the BT to find out WHY they are stuck?
Yes, the AI does not receive a new target when the current one is destroyed. I am adding all "updated Actors" from the AI Perception component to an array and if the current target ==null get the next valid entry in the list. Its just not working :/
you should have a service which checks to see if the current Attack Target key is a valid actor, if its not, remove it from the perception array of actors and request a new one
and the units attack the same target? if so i would have a kind of Manager to keep track of the current target for that unit
The AI have different arrays of targets and attacks what's closest
I'll run through my code again and see if there is something I'm missing
yeah but if the attack target is not getting changed in the Blackboard, then the BT won't know what to do
my bt aborts its current stuff if the Attack Target changes
@elfin socket wait, behaviour trees are played on the client as well?
@floral bobcat Only if the code to run the behavior tree happens on the client. If you do it from the AIC then it will only ever happen on the server
Mh, do you mind clarifying it for me? Where is a BT Service run? I've assumed it was run in something like a BT blueprint and run on the server.
(BT = behaviour tree)
Well if you setup the BT in the Character, it will happen in every client
The AIController is only present in the server
Hi. Just getting started with UE4's Behavior trees, trying to decide if they're just too open-ended for our designers or not.
One thing I noticed was the Run Behavior nodes, and I started wondering if I could just let the designers deal with a high-level tree, while a programmer implements lower-level trees that deal with all the nitty gritty details of casting rays, etc.
So I was wondering how can you pass data between trees running as part of Run Behavior and the one calling the Run Behavior node? Blackboards look like they're used for storing data within a tree, but can you have multiple blackboards that are shared between multiple trees?
Or just in general, how do you get parameters to sub-trees run via Run Behavior and results back?
@latent crane Instance Synced enabled, maybe?
@latent crane A C++ programmer in your team can take a look at the tests from the source code C:\Program Files\Epic Games\UE_4.xx\Engine\Source\Developer\AITestSuite\Private\Tests\
Hello
I have found some strange behavior.
The navmesh on these spiral stairs only works correctly if it is places on or very close to the edge of a Tile. Any clue on how to solve this?
https://puu.sh/BQieR/cc1bcb822b.png
The navmesh can be solved by reducing Cell Size, but then the navigation of the AI breaks
@lyric flint So that basically changes the variable from a normal instance variable to like a static/class variable, right?
@latent crane Check void UBlackboardComponent::PopulateSynchronizedKeys() in d:\Program Files\Epic Games\UE_4.20\Engine\Source\Runtime\AIModule\Private\BehaviorTree\BlackboardComponent.cpp As an example of what happens when you sync the instances under the hood.
Thanks!
Has anybody used UCrowdFollowingComponent?
Or does anybody know of any good tutorials on UCrowdFollowingComponent and/or UCrowdManager?
as long as you use just one agent, and don't need anything too fancy
it works out of the box
By one agent you mean one AIController with UCrowdFollowingComponent? That's fine but I will want to use multiple instances
That's the whole point of it right?
by one agent i mean one supported nav agent
as in, single RecastNavMesh per NavMeshBounds volume
anyone know how ue4 stores navmeshes when you use world composition? is it one navmesh for the persistent level, or does each sublevel store its own? kinda seems like its the former.
Iirc one NavMesh
On the PersistentLevel
Or at least navmeshes only in PersistentLevel
I put them in sublevels and that didn't end well :D @cursive vector
hm, there are navmeshboundsvolumes and then therest the recastnavmesh actor. it seems the latter is automatically put into the persistent level. not sure if that means there's only one navmesh and its stored in the persistent level. when you say you put them in the sublevels, do you mean the boundsvolumes, or the recastnavmesh?
im getting this bug: https://answers.unrealengine.com/questions/841268/nav-mesh-related-crash.html anyone else seen this and maybe found a workaround?
A similar nav gen bug was fixed, but haven't seen that one I think.
but if you're getting this bug which looks like they don't do an null check on the index, you could fix it yourself. The other issue I had was the mesh associated nav data, say some mesh affecting navigation, it would get cleaned up and the nav gen would crash. The fix ended up them replacing it with a weakptr.
i could fix it in that place, but im worried that the data is in a bad state and it will still cause issues elsewhere. though i will probably just try that... B)
My ai is really dumb, what's the best ai scripts on the market place?
Anyone recommend anything?
what do you mean your ai is dumb?
my AI is very smart and i used no external market place stuff
Well my ai can't jump to dodge bullets, my ai can't walk on walls or ceilings and my ai can't use or jump over obstacles. My ai can't jump over open spaces, my ai can't take cover or throw granades my ai can't walk through doors that have physics that I can walk through
Can you ai do any of the things I mentioned?
@dreamy surge Hi, I don't know your exact approach to AI, but let's try an Aristotelian approach: Potentiality and actuality. Out-of-the-box the potentiality of the unreal AI is robust but it's actuality is minimal to none
meaning you need to tell it what you expect of it, and how
a common ways to use behavior trees
behavior trees extend and improve the AI actuality
For example, your AI needs hearing perception, So when a grenade actor enters its hearing, It should have a task in its behavior tree telling it to Dodge
and so on
the same thing for grenade and visual perception
this way you're potentially smart AI becomes actually smart AI 😃
@dreamy surge sure if i program them to do that.
programming is about making things work how you want, relying on third party stuff all the time is not good. and you will never learn
My ai jumps over barricades and leaps on buildings, it jumps gaps between land
it gets taunted by flares which make it run to the flare to investigate
so yeah ai can be as smart as you need it to be
just need to put the work in
i have spent 3 months working on purely AI, its not a quick and easy task and there is no simple "drag and drop" to make things work
Hey you guys! I am new to Ai but we made a blackboard and got all that working, I was wondering say if you have multiple ai that can move towards the player, how do you stop them from all moving to the player once one has seen the player?
have the first AI who spotted the player notify all other AI that he has the target
like what kaos said, you create a state which is used to delegate periods when each unit can attack. so in your blackboard, have a boolean like, IsAttackingPlayer, and make this a synced variable, so all AI with that BB see the variable. When one AI is ready to attack, it check if the IsAttackingPlayer is false, if so, set to True, then have the AI attack. Other AI that try to attack before its finished, see IsAttackPlayer is true, thus do something else like wait or grunt. Original AI is done attacking, now another AI checks if IsAttackingPlayer is false, then.... @polar hound
Sweet thanks you guys!
Why the flow stops if I put the top selector as a parent of the others? If I connect the Root to the lower selectors they work but I need the parent on top.
all your decorators are failing
Ahh...ok 😃 Thanks @patent hornet
How can I make my AI zombie run towards the closest player in the game without having to constantly get an array of all actors and calculate distance between them? Right now it works but it is so laggy because all my zombies are contantly doing that. What is a more efficient way?
cache the players
never use get all actors
there is always a better way
compare distances squared instead of distances
calculating square root is expensive by comparison
Ok. I'm going to have to research how to cache the players. I have no clue how to do that
Why dont you use a volume?
Set the volume to the "agro" radius, then you only have to keep track of anyone that is inside that volume
Ohh i see, you want the Zombies to always know where the player is.
Ignore me then lol
Yea basically like Call of duty zombies. Round based mindless killing lol
most people will use a AIManager of some sort, but GameState is fine for now
you can also populate the list of players via GameMode by iterating over PlayerControllers or PlayerCharacters
you can do GetAllActors once, then save the array somewhere accessible
AIControllers only exist for the server so it would make sense to have an Manager that exists on the Server which when Players are spawned will cache a ref to their Pawn for the AIControllers to access.
there is literally a hundred ways to get this done
Ok so i can make one array of all players and just update it if they die or leave. But what about calculating the distance between the zombie and the player? That's what is lagging it up. How do you get those distances without using up so much?
compared to getallactors?
no, its not
GetAllActorsOfClass is one of the most expensive functions you can call
Ah. So getting rid of it will fix it all and I can still use the calculations. Gotcha 😉
it literally iterates over everything in the world
Dang. Then why does every stupid video and tutorial use that crap?
compare distances SQUARED if you want to make the distance calc cheaper
distsquared = (x1-x2)^2 + (y1-y2)^2 + (z1-z2)^2
dist = sqrt(distsquared)
first is dirt cheap, second is not
Ah! ok I see now. Thanks man! Learn something new every day. 😃 Also is that the Dragonheart dragon from the PS1 game for your profile pic? Pretty nice! 😉
i think this one is older
GetAllActorsOfClass is not as expensive as you might think. The UObject system stores Actors in HashTables which is what GetAllActorsOfClass uses to find those types.
At most the BP version GetAllActorsOfClass would probably be close if not O(N)
C++ ActorIterator would probably be O(1)
that depends on how large the world is
It depends on alot of things yes.
it is also sloppy in a way that promotes bad coding
much like the UGameplayStatics functions for grabbing Players, Controllers and such
Why do you consider it sloppy?
its never an optimal approach
Id agree that there is more optimal approaches.
but it is just there, too easy to just do
all i know is the dude on the UE4 live stream says never to use it. IDK i'm new to this whole thing
so it gets alot of people stuck on it being the "proper way of doing things"
But considering it may just be searching for a single Actor, like a Manager Actor that you didnt or couldnt cache, then its perfectly fine.
@stark zealot The main reason why someone would say not to use something, is probably because you wouldnt realise the implications of its usage.
i will also admit to using GetAllActorsOfClass, but never in runtime 😄
We are getting a little offtopic here though 😃
@stark zealot i actually made a CoD zombies style game
with mystery box and everything
and wall buys/perks
and the AI is super simple
just wish the CMC wasn't so heavy :/
@pine steeple Hey man! I remember you said something about that. Nice! I finished up the weapon system and am trying to get the Ai more optimized.
cool
i made really smart logic with Wave spawning aswell
it takes the amount of people in game, the round number, does some math and returns the amount of zombies per round plus a health increase
That's what I'm working on as well. Did you do that in Gamemode? or GameState?
custom RoundManager
Gotcha
just a UObject that gets spawned in GameManager and can be accessed from it
i like to seperate logic where possible
GameMode*
i like to keep GameMode clutter down
Hey guys, I'm making a paper2D game. Was running around testing some functions when I noticed my AI had broken over at some point over the last day.
The only things I've changed in my game were mostly expanding the tilemap and adding background objects. Never touched AI.
Nav mesh is fine.
Ran a check on all AI components to check for collision hits / overlaps and nothing came up.
I'm using a Move to Location and Move to Actor.
Any ideas?
After the update to 4.20 my AI start getting Jittering on the client side, it is a really annoying issue, anyone would know why this is happening? A have seen a lot of o people having a similar issue but I have not seen a solution yet. Any help would be appreciated! Thanks!
Seems like the AI rorate very fast and create a crazy motion blur effect
Here is a image of the issue:
I think the Move To node was changed somehow in 420
Are you putting break point in your BT?
and what behavior is it being stuck at?
@severe badger
There were changes to the navigation system in 4.20
See the release notes here: https://docs.unrealengine.com/en-US/Builds/4_20
New: Most Navigation System-related code has been moved out of the Engine code and into a new Navigation System Module. Game-specific code using navigation system functionality might need to be updated.
Doesn't mention anything about Move To specifically though
Can somebody help me understand how UPathFollowingComponent works together with UNavMovementComponent to actually move an AI character?
Like I am assuming that moving an AI pawn would consist of the following steps:
- The behavior tree executes a task that calls UPathFollowingComponent's RequestMove function
- RequestMove calls into the UNavMovementComponent to actually move the character? I see that there are two functions on UNavMovementComponent, RequestPathMove and RequestDirectMove
Does the UPathFollowingComponent call one of those functions to actually move the AI controller character?
As far as I can tell the only thing UPathFollowingComponent does is take a MoveRequest object and then call RequestPathMove and RequestDirectMove on the UNavMovementComponent
is that understanding correct?
dont quite remember, but doesnt RVO avoidance live in the pathfollowingcomponent?
RVO is movement component
The Path Following Movement calls Request Path/Direct Move on the Character Movement Component and Path Following Component tracks the path goal.
What’s RVO??
@wild mortar Hi Jeff, Thanks for the feedback, I actually fix the issue, I just used another Animation BP to test and worked great, so It seems like something on that specific bp was broken. Thanks for the tips! 😃
@ripe whale I was answering Dividual. It avoidance behavior for the movement component.
any good resources on "idiomatic" behavior tree design? currently working my way through chapters @ http://www.gameaipro.com/ , but maybe there are some good non-beginner UE4 samples out there too..
Home of the book Game AI Pro
try checking pinned messages on this channel
gameaipro is not really light reading
👍 thanks, I'm not a big video tutorial fan but the pinned one looks pretty decent
I don't know why video tutorials are so popular, I really dislike them because it is so hard to find specific pieces of information since they are completely unsearchable. Also I can read a lot faster than I can listen to somebody talk
@hearty rock Are you liking Game AI Pro? I tried https://www.oreilly.com/library/view/unreal-engine-4/9781784393120/ but I didn't like it, just didn't seem thorough
yes, but I'm going through it selectively.. only choosing chapters that seem relevant
in my experience packt publishing books don't seem much better than most video tutorials
@ripe whale Game AI Pro is great, I can highly recommend it. I was rushed when writing Unreal Engine 4 AI Programming Essentials, and also didn't grasp the complete concept of teaching as well as I do now. So while you can still likely learn something from it, it's a bit rough. So I apologize for that. I can't really work with publishers, they all rush you to make something because they're worried about the market and not the content typically. Most fail to realize good content can last a very long time.
\o/ writing is hard, I appreciate your effort regardless of anything I say @stuck oar
ty
@ripe whale is your dislike for video tutorials is because people don't get to the point quick enough?
my dislike is that a lot of them need serious editing to get to the point. put some slides and diagrams in my face occasionally so I can skip through a video and see relevant information and maybe watch a segment once I find it
mine is because they are just sloppy
in order to get through to as wide an... audience as possible they frequently disregard good programming practices
@stuck oar After I wrote that I was actually thinking I need to give that book another shot, I didn't read enough of it to actually give it a proper review. It just didn't feel in depth enough, but maybe that comes later
I dislike video tutorials because there is always a lot of stuff I have to sit through that I am not interested in and there is no easy way to skip ahead or read quickly
And also searching, if I have a book I can easily bookmark interesting or relevant parts
and 80% of them start with an hour's worth of slapping together a really basic UI
and go to the index if I need specific information
Hey no worries, you guys are not offending me at all by what you say. I accept the criticism and want to improve.
i never looked at AI Programming Essentials, but i saw a few Packt books
categorized them as pretty shallow
I didn't know this before I started working with them but I guess that how it works for most people
Most people when talking about publishers, consider Packt to be pretty low on the bar.
videos really excel when they combine spatial information with audio.. so mousing around a diagram or interface in addition to explaining the next step or whatever
also all your reasons about tutorials is completely accurate
It's something I am looking at personally, because I realized this too
right
what's going on here?! 😉
We are talking about books versus tutorial videos and the pros and cons of each
I see
well, one thing for sure - not enough of either on the subject of AI in UE4
alot of stuff either outdated or bad practices or not covering what needs to be covered
@hearty rock what you're saying is video embedded into written tutorials. so you read some text, see an image with some subtext, then more text saying lets do whatever in this image, and then have a video which explains whatever information in the specific context
in a way, sort of how UE4's styles their docs
I actually prefer just a straight up video on youtube with occasional cuts to slides. video inside text gets doubly confusing for me 😛
but short clips (<1 min) inside an article to illustrate are good 👍
Two common cases when I'm actively seeking tutorials:
- I know the "beginner" part and want to skip ahead in the video... but how far until I get to something relevant? A slide provides a good marker when seeking in a youtube video
- I want to refer someone to a particular segment rather than "somewhere in this video..."
I rarely rarely rarely sit through the whole video or even article unless it's absolutely my first exposure to a concept
Okay, how do you feel about uDemy courses when it comes to those two cases?
only ever use them for the third case of "starting learning from 0", I would never consider them for the first 2
WELL. case 1 applies for Udemy courses, but in that case I usually skip entire introductory videos rather than within them
I don't know if you've tried some of the more popular UE4 courses on there now. But do you feel that having the courses broken up like that makes it easier to digest? Or do you feel like the chunks are still too big or the overall course is just not concise enough?
I went through Ben Tristem's course, IIRC each video was between 10 and 20 minutes long? That was a good format for sit down and follow along. The biggest benefit of chunking I noticed was it forced the videos to have descriptive titles and laser focus on a particular task
I do feel like I could refer someone to a specific section of that course if they had a question
So if you had to choose between written, YouTube, or uDemy course that is chunked up, to learn from, what would it be?
(but that relies on the person having access :\ )
not in every case but just your default
tough question! if I wanted to pick up a new skill I'd default to Udemy
there's nothing stopping Youtube tutorials from emulating the format though, but I notice a lot of them... don't.
true
caveat: this is my default for learning specific software, but if I want to learn theory I'll default to text w/ pretty pictures
exactly the way I feel
alright I don't want to bombard this channel with too much sort of off topic chat, but thanks for the feedback. I really appreciate it.
no problem, are you making this sort of content? 😄
wouldn't surprise me if he was :P
😎
I prefer video tutorials that contain diagrams and schematics, aside from anything else
yeah I appreciate some good visuals too
also, if anyone is set out to make a book, make it digital so you can update it and correct it
(in addition to printed edition)
There is this one book on game programming patterns I always skim through from time to time that is web based
love it
I like paper, but I have always been puzzled why not to have a PDF of the book and update it / correct it as time passes by. I purchased a few UE4 books that became useless a few released down the road.
Also worth noting that there are no tutorials about making proper anim BP for AI. AI and anims go hand in hand and yet that part of AI is always omitted in the tutorials.
True, the process for book formats can be improved. I am sure if you just did a self hosted pdf like you said, or maybe amazon and only do the web / kindle format so you can update it instantly maybe. I haven't really looked that far into that.
And yeah, there is a whole lot on AI & AnimBPs, and I agree, they are basically married.
What I've done in the past is created a common AIAnimInstance for AI, and this would be updated by the Behavior Tree. Then each AI Skeletal Mesh would use an AnmBP which derived from the common AnimInstance.
Definitely made things easier in terms of replication and general animate state communication.
and agnostic of the controller
Hello Guys, I'm trying to get my ai character current acceleration but always return 0, but i can see acceleration works by increase or decrease MaxAcceleration in movement component and logging speed... any idea why i can't see current acceleration ?
Is it just me or do Behavior Tree Decorators not take Enum Parameters directly?
Is this intended?
I cant pass a Enum Literal as a parameter into a decorator
It doesnt appear on the Decorator Property List on the node.
It also seems to affect the operation of the node.
Well that would work yes, but im more asking why cant a Decorator take an Enum Literal as a parameter?
Is it by design or more of a bug?
don't know, can't say i ever tried an enum that wasn't in the BB
it does take floats just fine tho
might have to do something with AIModule not having any idea about the enum types in your game module
Yeah its not a huge issue, i just noticed that it wasnt a thing.
Its simply an exposed enum property
@pine steeple Thanks I found it
Do you happen to know why AI's tree is still running after I got AI Controller, got brain of it and stopped logic ? (and also disabled tick on the actor)
anyone ?
something else re-enablingit?
highly unlikely - it's a self-contained AI character
and once tick is disabled, nothing should work
tick wont disable the bt tho
stop logic would but why it aint stopping is weird
i use it all the time never had issues
hmm
Does it make any difference whether I do it in the character or in the controller ?
it could be a bug in 4.20 - actor isn't even ticking and yet BT is still running.. I couldn't find a way to make it stop running
This is a very basic guard AI I've created that follows the player and attacks the enemies of the player for a short time. The issue I've noticed with it, is that for some reason, sometimes when they are following the player and do not have an enemy they'll randomly shoot. It's very clear that they don't have an enemy tag set, because their pose is different, if they have an enemy their rifle is raised and aiming, and if it isn't, they shouldn't have an enemy. I've verified this with a service on the enemy is set side that polls their target. All the various enemy classes have an AI controller, so that service checks if their target has a controller, and if it doesn't , it unsets the enemy tag. This makes sure they don't keep shooting at an enemy that is dead.
All enemies will unpossess on health hitting 0.
The service itself has a print statement attached to print if their enemy has an AI controller, and I feel like neither of those shoot sequences can be called if that doesn't print true, when they do that random shooting, there is no print statement from that service.
<@&213101288538374145> is there some reason none of my images are uploading properly?
They have probably been blocked by Discord
I'm not getting that message though
about "explicit images"
like I have in the past
they're just showing up as a poop icon preview
Mmm
if you click the image and click "original" you can see them opened in the web browser.
That image I just copied from blueprint that someone posted there.
Its happening on other Servers
Id say theres a Discord issue
thanks
made some progress with my AI https://www.youtube.com/watch?v=18auINf0qjU
First time trying ai, why doesn't it move?
if i look at the behavior tree it just flashes
because 0,0,0 is unreachable?
you're trying to move to PlayerController
and unless you actually attached it to the Player, its just sitting at ZeroVector
on this video the guy creates anotehr spline but button is it to that at make another point
https://gyazo.com/76d87874ac11f0c4eb39bcb789a5f5d8
guys, anyone else is having problems with navmesh in 4.20?
what kind of problems?
my pawn isn't moving
Those 2 navigation testing actors not connecting each other means the mesh doesn't work right?
what could be the problem?
the problem we're experiencing is that there's something off with the supported nav agents
did you move your project to a previous version to 4.20?
No, I just created it on 4.20
hmm
How would I setup an AI which is like RTS style unit movement.
I want the unit to be able to move, but also be able to follow the mouse as I right click.
However, I also want to be able to split up units.
anybody know why there's jitter when using AI MoveTo in blueprints?
i read on the forums something about their velocity being set to 0 when updating to a new location or something, but i can't seem to find a solution that works with BP
@kindred nest i solved that by making the ai move towards a goal target with goal tracking enabled
how do you do that?
Is it possible to restart move to location without calling restart tree?
Every time I update the BB key with SetValueAsVector()
It does not start moving to that new location unless I call RestartTree()
no reason 😛
(I use BTs)
This is a bit of a long shot but has anybody worked with the Boy and His Kite sample project? Specially the AI for the flocks of animals?
I am trying to adapt it to work for my game and it is proving pretty difficult to get the behavior that I want
Hey Bois, Im Streaming Some Artificial Intelligence https://www.twitch.tv/caelanim8ter
hey folks! where is the best place to manage ai features such as health attacking etc, should i use the character class or controller class ?
@signal wing not the best place to advertise your stream, #share-your-stream for that
@red elm What gets damaged? what attacks?
its not the controller..
@pine steeple lol thanks
I want my enemies to be able to find cover behind meshes i placed in the landscape, is this possible?
@high solstice sure, i would mark meshes as Coverable or better yet use some kind of nav modifier on areas where they can cover and allow them to move into them areas when taking cover
lots of approaches to it
i just wrote some code that scanns the area for meshes that are cover
i couldn 't really place nav meshes for every tree since there are around 3k
i would use EQS for that
find all tree actors, do a DOT to make sure he is behind the tree away from the player
and I agree with Tom - it feels like there is no AI work being done in UE4 since like long time ago..
#gameplay-ai is dead and Unreal's AI system is kinda dead, apart from the new navigation system
There was a decent set of utility nodes for behavior trees I saw a while back on the forums... Wonder if they still work
@pine steeple any idea why? Doesn't make sense to add new navigation system and keep the rest without any updates / improvements
no, but maybe its just not high enough on there priority list and the stuff they have is perfectly good enough for base AI
perhaps
improved any system is a big scope 😃 best to do it as piece by piece as possible
@flint trail the Heavy Gear Assault bot AI was a hybrid beetween behavior trees and that utility
so it was a BT, but it could add/remove tasks and it scored them
the highest scoring branch is the one that executes
was awesome
specially becouse you could dynamically alter the scores depending on random stuff
so if i give an order to a bot to attack someone, the "attack that someone" goal gets a x10 to its score
and it faded over time
is training course about that coming to Udemy ? @near jetty
no XD
there is a book that talks about it
they use it to make a quake bot
well, a "2d quake" bot
then I don't care 😛 
btw, utility AI will be BEYOND slow in blueprints
😦
becouse you are "ticking" so many things to check scores
and thats pure math.. bad in blueprints
my HGA bots maybe had 40-50 tickers
of course i only executed the think like once a second
but still
maybe Tom can make Utility AI plugin for the Marketplace and the Udemy course could use that to make sure performance is high
btw, there is a even cooler thing deep in the engine source code
a Planner system
think of it like pathfinding, but for AI logic
yeah, it's been there for a while and has never been worked on after that
"whats the best way to reach my goal"
yup
that one
Planner AI is top tier for a turn based game, for example
they work so well in them
you try to find "whats the maximum harm i can cause in this turn"
for a real time game.. im not that sure about them
you could try to find the best "score" for what to do during the next second, but then you are trying to predict stuff and can be weird
https://gyazo.com/a64cbf0f6ad0619a47dae2e626c34840 Not quite sure where to post this else then this channel why are there tears in the navmesh, i have fooled around with the generation settings but it doesnt affect anything.
reducing the cell height seemed to reduce the size of the tears but doesnt fix that the ai was getting stuck
Im having a stuck issue myself.
I have a door that opens and closes via a time line when the player interacts with it.
The AI is definently able to get through it; at least I thought. The size is definently small enough, but the ai gets stuck anyway
It passes through the space maybe once, but cant get back out at all.
Ive tried a link proxy, that never changed much.
Ive tried setting the collision of the door itself off when it opens (cuz the door seems to be the problem I think) but that would mean I wont be able to interact with it again to close it. And that'd be no fun.
Ive tried adjusting the door frame/the door's size but that doesnt help either.
And keep in mind the AI is a cylinder (its not a placeholder. Seriously, its a cylinder)
And that SHOULD fit absolutely fine
Anyone wanna try to think of ways to fix it?
K guess I gotta figure it out on my own.
Hey guys! Is there a way to manually restart a behavior tree service?
I have a targeting service (which should find a target for AI) and if target should be changed in the end of BT, my AI is stops at the time of the Service interval.
I don't want to reduce the interval, but just manually restart the service to find a new target.
Anyone? 😦
Hi guys!
I am trying to create a cover system for my AI using EQS. There are going to be multiple enemies in the game so I am using EQ Context to get all the relevant players. In the EQS I have two simple tests. One is a trace test to the context and the other one is to check the distance to the item. The problem it isn't finding the proper points for the cover! It does finds valid points but misses some of them
Need help to figure out what's the problem in the query system!
I seriously dont think anyone answers questions here.
Try asking in the blueprint channel....
have you turned on the nav mesh visualizer to see your nav mesh?
How do you do that again?
press P i think
What about during runtime
I know about the P one but that doesnt help me for why tf its not going through the gap.
It shows it can go through
i don't think can visualize in runtime. but i was curious, if the navmesh is just a sliver through your door
Actually it kinda is.
But I dont need a fat door.
Or want.
And actually I KNOW there is a way to visualize it during runtime
Ive seen it in other people's stuff, but theres literally nothing on how to do it
I think its a console command or somthn.
But it'd be helpful. Especially if Im actually gonna add doors.
But it is a sliver I noticed
I mean that probably is the issue but I dont wanna size the AI to be smaller than me or make a fat door.
Plus if I can get through it so can they. They're the same size as me.
So what gives?
How can one solve something like this
Oh
That.
Hangon then..
Time to read this on the toilet.
in his answer he talks about just adjusting the project navigation settings. i was trying to find out if you could increase a nav area with a volume, but i think they can only block...
i feel like the issue is the sliver of walkable space and the inaccuracy of the ai movement, so widening that walkable area in the door using smaller nav mesh cells or something else in the settings he mentions might help
Navmesh cells just curve it and make it pretty.
Just adds more time to the nav building.
Doesnt help worth crud for me
well, some posts are saying that AgentRadius setting in the nav settings determines the amount of padding from non-walkable areas. i've been changing it on my end with no change
So that also does nothing
Well fudge, you'd think by now there was a simple way to add more of a navigation to the volume
ya that would be ideal
HEY EPIC GAMES HOPE YA GOT THAT DOWN
Then again coding an engine takes supreme skill.
a hacky solution would be to make the door not affect navmesh and then add your own null volumes to block out the door frame
that seems pretty hobo tho
...wat
Yeah I dont even know what that is so thats out of the equation
Its not the door thats the issue
Its just the gap.
well the doors collision is what is determining what is walkable or not
But if you open the door it becomes walkable.
I can walk through it just fine but the AI's just cant,
And it has to be because that nav mesh is just so sensative, its just a sliver.
If I can fix that one issue then that'll be great. I can do everything else just fine, its just this one lil issue.
ya my hacky idea with the door was basically if you look at the collision on the mesh there is a "Can Ever Affect Navigation" checkbox. that will make it not affect navigation at all, then you can manually block the space with volumes so it's a larger walkable area. BUT.....i'm sure there's a better way, other people seem to solve it. I just wanted to make you aware of that setting
so you have the full palette of options at your disposal
I don't know much more about the nav system tho ,i touched it a while back but never had to deal with doors
take a screenshot with your navmesh on
because if its not your door then i'm confused lol
sigh
Alright here in a bit. Im installing the new version atm
Which is taking absolutely forever.
Is there a way to check if an EQS item is near a static mesh?
Any test or something without having to write C++
point grid, sphere overlap for static mesh components for filter test, might turn out not too cheap
@old ore he’s in the hospital. Hell contact me when he get out. I have to keep moving. Kid you being very unprofessional.... I regret speaking to you now. You do good work but who ever is coaching you on a business level is going to ruin you career. You chasing me around on forums but you want to be in the video game industry. You gotta chill....
Again, use #looking-for-talent @pliant flicker
Thank you. Will do
Also move your private dispute to DM please.
Hi there! I was advised to ask here. 3D artist learning UE here. Making my first functional PT.
I have a simple AI with a BT that only moves him to random location within a certain range. The player can shoot a projectile (Tranqulizer dart). The idea is that when this projectile hits the AI, he freezes immediately. I have gotten as far as to when the projectile hits, the bolean Sleeping is set to true, five second delay and then set sleeping to false.
Where do i stop the AI's movement to make this work?
Sorry for my noobness and thank you for any assistance. Have a great weekend!
hey, i asked a question about navmeshes here: https://answers.unrealengine.com/questions/845373/when-using-a-navmesh-with-dynamic-modifiers-only-p.html . can anyone help?
@idle willow maybe show your BT. generally you would write the sleeping boolean into the BTs blackboard and react to changes via decorators in your BT. might have to cancel the current movement in the Abort of you movement task. there is some node called something like stop movement immediately, iirc.
Yes, looks like i have to delve deeper into BT and Blackboard. Thanks so much for your reply!
@idle willow important to know that blackboard decorators can abort tasks (whether they do that is a setting on the decorator in the BT) and in tasks you can override an event called... something with Abort. 😉
@stuck oar Do you happen to know how I can make AI controller turn/rotate (to target/coord) smoothly when moving and remaining in on spot (like a turret or when melee attacking target), and have character/mesh rotate in sync with it ? (this way I'd only have to worry about working w/ AI controller). All BP / BT, no C++.
anyone ?
@flint trail there is a few approaches. the first most common is turning off rotation being inheritrd then apply it yourself. other option is to work within the systems in UE4. You can do this by modifying the character turn rate, stopping distance from goal, and some others im prob forgetting. The other 3rd option which is a like an extensions of the previous one. Check it out here https://www.unrealengine.com/en-US/blog/a-layered-approach-to-ai-locomotion-in-the-occupation
which is matching the animation with the movement of the char component
This agent moves so well! Modified Path Acceleration + Fixed Braking Distance, & Orientation To Movement, gets you this. 😎 #UE4 https://t.co/si1K8mhl0r
here is example of what you can do with defaults
if you want to turn in place, try playing root motion
otherwise you may have to update rotation yourself
thanks, but how does it look like in BP and settings? 😃
hey there, does anyone have any feedback on this?
i'm trying to make it so the player can push furniture in front of doorways to slow down enemy AI, but it just cuts off the AI's navmesh
whereas the behavior i would like is, the ai walks up and detects the object and hits it to move it or eventually break it, but if the furniture is in the middle of the room they would have enough intelligence to walk around it.
is there some sort of weight system that's possible? like for example, if you have two entrances to a building and one entrance is blocked. the enemy spawns on the blocked side but the weight ends up being higher to walk around the building than to break through the furniture.
it is possible but tricky to setup just right
NavModifier components on your furniture
but your Ai also has to be able to recognize that there is a path, even if blocked
then it gets tricky, while your AI won't be able to path through the obstacles
you can request a Path using another NavFIlter class
then move the AI to last path point (when you path to obstacle location) with an offset towards the point before last (talking about a query that can path through obstacles, otherwise you will get a mess)
and if AI detects a destructible obstacle infront of it, it attacks
NavModifiers also have entry cost, and passing costs
and you can test/see what they are with a pair of NavigationTestingActors in editor
@kindred nest
i've never heard of the navmodifier component, i'll have to look that up real quick.
So this is just a curiosity type of question, not really something I'm capable of doing yet but how hard is it to make flying AI such as dragons, birds, etc.? Is there some sort of built in navigation or do you have to run traces all the time or what? Again just curious for future projects
@stark zealot based on personal research into the topic, it's a bunch of line traces or following paths. there's some fish ai and other types of flying ai examples and plugins out there
depends on how reactive you need them to be too
@kindred nest Ok thanks, I thought it was probably using line traces. I'll have to read more about it. I would thing a dragon would be hard to make. whereas a bird would probably be easy
it depends on what you need the dragon to do.
True
if it's just flying around in the background looking scary you can just make a sequence and set it to move along a path playing an animation
Yea but a Skyrim style dragon would probably be hard because it would have flying and ground states
Now i see why some indie games only have flying dragons lol
Why doesn't UE4 have some kind of built in navigation for flying?
mmm.. what people have told me before is that the tools are available to make your own systems. it's those systems that make your game. what ue4 provides is the tools.
i imagine it would be hard to accommodate every game mechanic
i'm sure you've seen this, but i was leaning towards giving that a try for fish AI
@patent hornet how does the NavModifier component work?
i tried making an example following in line to that, using blueprint
but it doesn't seem to be working. i've got the basic shape as the root of the actor BP
ah ha!
i had to turn off Can Ever Affect Navigation on the static mesh root
they're jittery as heck, but they push through
thanks a lot.
@kindred nest Thats cool! I haven't seen that. Also your right about UE4 being a tool to make your own stuff. Thanks for chatting with me. 😃
any time! good luck in your projects.
so uh.. does anyone know how to handle the jitter issue when AI repaths?
i think what's happening under the hood is that their velocity is getting set to 0 instantly.
Hm, my AI controller isn't running any events and therefore isn't running at all.
It's been set in a pawn's ai controller slot so I'm not sure what's wrong
Ah nevermind, apparently the way I spawned it was incorrect
How can I stop multiple NavAgents to stop rubbing against each other?
@bold urchin avoidance. there's to versions of that built into the engine, rvo and crowd
@cursive vector do either of those actually affect NavAgents?
huh? isnt that their whole point? not sure what you mean
NavAgents are parameters built for the navmesh generation
btw I'm not saying you're wrong, genuinely asking
i thought navagents were just the npcs that walk around on the navmesh.