#gameplay-ai
1 messages · Page 153 of 1
the way you're talking about programming seems more from the perspective of "if it isn't broke, don't fix it". but programming doesn't tell you when it breaks on a system wide level. it just slowly paints you into a corner
similarly the scoring is just determined by a function which currently just happens to do it based on looking at the ratio of successful tasks in the task manager, the implementation of that could be switched to do it based on something else
anyway, I don't really have anything more to add to this conversation
I've said where you could improve
it's your project
I don't know, I'm trying to understand what you're saying but I just hear "do the same things but just don't do it in the behavior tree"
you understand that you'll be doing the same things regardless because those are the things you want in your game yeah?
I can't change what things you want in your game
I can only talk about how you can improve your BT logic to get out of the issues that you're in
Yeah, but what I don't understand is how is using not-BT better when it does the same thing
and if your response to that is "ok but it's the same except outside of BT" then what do you want me to say?
I gave you reasons for why it's better to have it outside of the BT
the only issue I was having was dealing with the conversation because I had the logic poorly written for it but that was easily fixed, otherwise there's no problems whatsoever with how it works
well if it's fine then there's no problem
okay good, I was just getting confused because it sounded like I shouldn't be doing any of what I'm doing in the BT for some reason :D
I should note that I've been doing complex software stuff for like 20 years, I just haven't done complex gamedev so much... so I would hope that I'm not completely green when it comes to not writing garbage lol
I mean you shouldnt
but if you want to and it works for you, go ahead
I'm just trying to tell you long term it might bite you in the behind
well let me ask you this... you suggested that it's a bad idea to have the BT choose when the task is finished?
"don't fix it just because it isn't broke" doesn't apply to wicked problems, and system architecture definitely falls under that
I don't know what you mean by this
it's too ambiguous to say yes or no to
okay let me reread what you wrote about this and see if I can clarify or if it was just too contextual to what we talked about
well I guess it could've been, not sure :P
I guess the alternative to having a BT task which marks the task complete is to have the task define a function which checks the npc state to determine whether it's complete or not
but not really sure if it makes a big difference since the task logic is otherwise handled in the task-specific BT
oh you're talking about the task manager tasks. because BT uses the term task too
Oh, yeah
I think what you're doing with the task system is essentially another type of BT. you're driving behavior through tasks, but then you also want to drive behavior through the BT
which again, could be a problem
Well, the tasks don't strictly require it to be a BT, I just find BT convenient so each task has its own BT
what you could rephrase the tasks to be is some sort of needs, which would make your AI more utility based. you could then hook these needs into the BT, which is the equivalent of saying "OK, BT, here are the needs. how is the AI behaving?"
it sort of is like that, it's just that each "need" is represented by a task
whereas right now you have two disparate voices asking "task manager, how is the AI behaving?" and "BT, how is the AI behaving?"
but a need isn't a task
well if you have a "need" to rent a video and buy a soda bottle, how's that different from having a task to rent a video and a task to buy a soda bottle?
a task ends when it completes. a need doesn't end
and a task doesn't need a BT to drive logic
also a need is fluid whereas a task is only what you tell the task to be
a need can compromise, a task can't
well if you have a need to rent a video, wouldn't it be satisfied once you rent a video, thus it "completes"
nope
that would make it a task
the need gets satisfied somewhat, but maybe it's not enough satisfaction
"enough"?
maybe there is a greater or lesser need to watch videos
so maybe a greater need rents more videos than a lesser need
or more soda, candy etc.
maybe picking up a candybar only satisfies a need partially
Right, so at that point you'd just rent two videos instead of one
until the need completes :P
the need doesn't complete
and that's kind of the point
it's not a task
you don't complete it
well once you have fully satisfied the need then what happens?
take the opposite example
what if the video an AI wants to rent isn't there
the task would fail
the need would compromise
compromise?
so maybe if they can't find the video they are after, they would look for something different
just like real people would
that's really the backbone of how behaviors work
instead of being like "TASK FAILED: VIDEO NOT FOUND. EXITING STORE"
beep boop
Well we have a system for that actually :) If it can't find the one they wanted they come to the counter to ask where it is
... right, so you built another system for something that could easily be handled by the behavior tree
again you seem convinced your way is correct
Because this is actually desirable as additional tasks for the player
so I'm kind of done with this conversation
The player needs to do things to help the customer, and it adds additional options such as ordering the video the customer wanted, etc.
I'm not convinced my system is the best implementation of the thing, but there's just a bit more to it than just whether it uses tasks or needs or what
@mossy nexus
it works exactly how i want it to lol
nav link proxy
i can use those to create a flow map
i can get the length of each add it up and use that as my movement rate
i just need to put it all in a bp where it gets the area of the location im in and fills the room i place it in
and i could prolly just manually change the flow direction of each arrow if i have to
I dunno, you seem quite set on keeping it as it is. what you're doing is not a mystery, it's just two separate systems each doing behaviors for AI when one system would be enough. but like I said, your project. and that's the end of this discussion for me.
I'm sure they do what you want them to do. proxies like these is for jumping etc. so that AIs can reach those areas even when they aren't accessible
yes, i sort of have a system going with a navigation invoker generating a small navmesh at one of my points and then connecting the nearest bp to it using a nav link
im trying to figure out how i can set the location for each point, this is really all i could find so far was an array containign the links
I think you might be getting swayed by the visual representation. But I don't think that a navlink is what you are looking for
possibly but i might experiment just a bit more
but ur probably right, its a bit unconventional
well unconventional or not, I think you should try and create a specification for what you want your system to do
and then possible work on creating a subsystem that can help you create that
but that's in cpp
i think your right, what im looking to do is something for cpp
its out of the scope of what the nav mesh was intended to do
well figure out what you need to create first then see how you can implement
who will use this system? for what reason?
is there any point beyond just showing progress?
Well if I could combine progress and navmesh into one that’d be nice, but it could be serperate systems
Tho with further thought Idk why I just don’t use my idea and instead do it with collision boxes
I’m not too confident with c++
this is basically it right here the navmesh generates a bunch of boxes in a walkable area and each one acts like a pressure plate determining how fast you move in the level
What are you trying to do btw? I couldn't understand by reading the messages above
Well I'm not so set on it, just that when you suggest doing it in different ways, there's usually a reason why it does things in a certain way as a result of how the game is designed to work, and not just because I happen to like the program architecture :) I like using BT's because they're a system which is very easy to change unlike some other solutions, and since the game is still in fairly early stages it changes all the time... for example the task management aspect was non-existent before which made it hard to add the features I wanted, so I introduced those as separate components into the system.
for example the task management aspect was non-existent before which made it hard to add the features I wanted
I'm not sure if we are talking about the same thing but to implement FSM to BTTasks I might did something very similar too
the game design shouldn't dictate technical implementation though
It was a pita to manage the states and task running but worth it xD
Sure, it doesn't dictate the technical implementation, but if you want your guy to jump in a certain way, there's usually several ways to code it and only some of them are suitable for your specific design
It doesn't mean the other ways are invalid, they might be better suited for a game where the guy jumps in some other way
that's just not true
anyway I keep getting dragged into this
Well to continue with the jump analogy, if you want your game to have a realistic physics based jump, your implementation has to be different than if you want your game to have a less realistic mario jump or something :P
There is no one size fits all solution to software design
it doesn't dictate that you have to use physics though, even if the end goal is a "realistic" jump. you're conflating technical implementation with design
Correct, but using a physics engine for the jump is more likely to be a valid approach if you want a realistic jump vs unrealistic jump
I'm pretty sure that you'd have to fight the physics engine more for the unrealistic jump
it has to be realistic therefore only real physics will make it so
I'm not saying you have to use physics for a realistic jump, I'm just saying it's more likely to be a valid alternative implementation for it, and less likely to be a valid alternative for it if you don't want it to be realistic
again, disagree
that's conflating design with technical implementation
which is an easy way to paint yourself into a corner
because you only see one option as the "correct" option
Well if I want my game to work in a certain manner I surely cannot implement systems that do completely different things :P
you can do things in a myriad of ways that lets the design work as the design should and keeps it separate from the technical implementation
but everything I've seen so far has kept the design and technical implementation highly coupled. which means if some of the design changes, so will the technical implementation have to change
Yes, but certain designs are easier to implement in certain ways
this is exactly what you dont want in software development
I don't have a crystal ball so I can't predict what my game will look like in the future
So I don't really feel like spending a lot of time building systems that I think I might need, and instead I build a system which is easy to change
no but you have the ability to think about low coupling so you can switch out your architecture easily whenever a new design decision has to be made. game development by and large is predicated on this since sometimes big changes come late, as much as everyone tries to avoid it
Yeah it's all pretty lightly coupled
but it isn't
your entire implementation is based directly of how you have designed your game
I could throw away the BT and replace it with something else probably in a day
so you can't have that, having shown your system, and then also say your system is lightly coupled
because it isn't
it's directly tied to your design decisions
and the fact that you wanted the easy route out when you first started designing
have a look: https://en.wikipedia.org/wiki/Wicked_problem
In planning and policy, a wicked problem is a problem that is difficult or impossible to solve because of incomplete, contradictory, and changing requirements that are often difficult to recognize. It refers to an idea or problem that cannot be fixed, where there is no single solution to the problem; and "wicked" denotes resistance to resolution...
this is what game development is
This seems to describe software development in general
I'm not quite sure how you imagine my BT is coupled, but all it is is a layer which calls functions on my characters
it doesn't describe software development, it describes spec that needs to be implemented
so if I wanted to use some other system to run the AI, it's just a question of having that other system call the functions on my characters :P
yes but your BT is still carrying all the heavy loading, including conversations, animations, player choices and even player rewards. that's not low coupling. that means if you threw away the BT you'd have to implement 2-4 systems to take over for it
No, all it does is it acts as a "player" for the npc
and even then you talked about having a task manager on the side, that feeds into the BT (so you have 2 drivers for AI behavior), and some auxiliary systems on the side to kind of make those work together
I mean
you can't call this lightly coupled
by any stretch
not unless you're lying to yourself
well if it was using some other system then that other system is going to be equally coupled
all you're doing is moving the coupling somewhere else
well if object A calls a function on my character, A is now coupled to the character
if I move that logic into object B... now object B is coupled to the character
how is this any different from what you're suggesting?
you're making a simple strawman. you're not seeing the bigger picture of your systems all having to have workarounds to work together
if you can't see that yourself then I can't explain it to you either
which is why I wanted to end this conversation in the first place
I really don't know why you think you know how my system is designed based on a couple of pictures of behavior trees and a description of there being a "task manager"
because it just keeps going in circles
and you keep talking about "well if it's not this system, it would be replaced by another system". not seeing that the initial idea of using that system in the first place was unnecessary
and then there's this argument where your system architecture is "mysterious"
it isn't
never said it was ¯_(ツ)_/¯
.
but you make a lot of assumptions about how it works without actually knowing how it works
I haven't seen your game systems as a whole, but I've already seen plenty of red flags
and honestly I'm not really interested in keeping this conversation going
I don't really know what the red flag is because all you've said is that I should use a needs based system because it works better for a game that isn't my game
which in itself is an interesting idea but it's not really how the game works
no I said you could convert it to a needs based system not because your game would be better for it, but because you would have a single driver for your AI behavior instead of two
I have just one :P
all the task manager does is hold a bunch of info the BT uses..
it doesn't make any decisions on its own about what the AI should be doing
this is what I mean when I say you keep making assumptions about how it works :P
you said yourself it gives tasks when AIs are spawning
that's already making decisions
so I don't know
seems like there's either some inconsistencies in what you're telling me, or your systems are inconsistent
I'll leave you with that
No I said the ai is given a set of tasks when it's spawned
which are just used by the BT to decide what to do
evening
Does anyone know how to change the AI controller being used by an existing pawn after runtime? Do I just change the AI Controller class or do I need to use a "Spawn Actor of Class" node and spawn the AI Controller then possess the desired pawn with it, or do I need to do both?
Pretty much as I understand it yeah
Sorry, just revised the above slightly, do you know if it's just changing the class, just spawning the ai and possessing, or is it both?
If you want to swap from one to the other, you'd have to disposess the first controller from the AI, then spawn a new AIController derived instance, call posess on the new one with the actor, then delete the old AIController
Ah thank you! I hadn't even thought about needing to depossess the first one and delete it.
Yeah, the posess/unposess methods are there for swapping the controller
if you possess another pawn does it not automatically unpossess the first?
i managed to figure out my EQS issues, turned out that it was just a mix of lack of decent info on it and some items very poorly explained. if anyone is wondering you can make context out of any blackboard key in a custom context by accessing the queriers blackboard and pulling it from the blackboard as a literal name...also, something thats not explained at all becuase i guess they assume it would be obvious...player characters cant run eqs queries...the EQS requires an ai brain that can process the nav mesh...
Has anybody used UEnvQueryItemType_Point for a custom context before? I'm passing in a vector into the SetContextHelper but the cone generator is never generating any points for it and my RunEQSQuery node is failing in the behavior tree. Does the location that you give it have to be on the navmesh for it to work?
Yeah, I just ended up creating a dummy actor and just used UEnvQueryItemType_Actor instead for the context. Im not sure how we are supposed to use UEnvQueryItemType_Point tho. There is literally zero example usage of this anywhere online. Im assuming that the point you pass has to be on the navmesh or else it won't work? idk
This did not end up working. The problem I am having is that I want to loop a sequence until 2 blackboard keys are of equal indexes. Once equal, I want it to break out of the sequence and go on to the next node.
why is it not working?
if you want it to run the next sequence, you need a a ForceSuccess node
I can only check if the blackboard key is equal to a set key value, not to another blackboard key.
. . .
wait a second
This is how I have it set up currently and the first sequence works fine until the 2 blackboard keys are the same, it just keeps doing it and not breaking out and going to the BTTask_FindRegister node.
I think I got it. Ill have to change the code tomorrow however as it might take me a good minute to work properly.
Hello. I'm using a navmesh to navigate. Now I have a couple of moving actors (boats) and they have a box collider set to dynamic obstacle. Now I got this to work, the navmesh is rebuilding. But now I need the boats to ignore their own collider. Does anybody know how to do that?
you mean disable navigation qualities on the collider?
Not really. Let me explain it using an image.
Let's say we have these 3 boats. The red area is the dynamic obstacle area. When I calculate a path it ignores the red area, but it also ignores it's own area. So it can't find a path because the box collider on the boat is blocking the boat's own path.
hmm, seems a little jank to have the two colliders. is there a reason where the capsule cant just be used?
Yeah I can remove that. Let me try that first.
It was from a tutorial I did.
followed a tut or made a tut?
Followed
I'm not that experienced in UE yet to make my own haha
Ok now I have this.
The capsule collider was to recognize when the boat hit a waypoint
But now I do it with the new box collider
so what part of this is the tutorial?
The tutorial used a static navmesh. Now I changed it to dynamic and I'm rebuilding the path every 0,25 seconds
and this is so boats dont collide with each but avoid?
so if you disable the colliders from influencing the navmesh, they can navigate just fine?
yes
but they collide
because they don't ignore eachother, that's what I'm trying to accomplish
yeah, thats a tall order to me, maybe someone more versed in navmesh code can help. I use the RVO avoidance but that lives on pawns, and even then, the movement gets funky
there's not too much bp/surface level stuff to do with navmesh unfortunately, even less so with realtime. Would need to dive into the navmesh code and make custom searches.
Yeah I looked into RVO, but I can't use that. I use steering forces behavior to make the boats turn slowly towards the next waypoint,
So I calculate waypoints
(or the tutorial did)
Thanks for you help though
depending on the number of boats, an actor EQS query could help decide movement, otherwise maybe a line or sphere trace as a sort of awareness in front of the boat to know if a collision may happen
Yeah I was thinking of doing that and I'm still going to implement something like that. But I think I can do that after I get basic pathing to work. Otherwise they are a bit dumb, what if there are 10 boats in a corner, the boats get stuck then.
I just have to find out how to avoid a collision with their own collider. I think the UE guys have thought about that as well, I just have to find out how 😉
Thanks again! I'll keep googling
does anyone know if this is an expensive function? I'm calling it every 0.1 seconds
alright, and again, EQS seems the most viable
EQS?
look it up 🙂
Will do, thanks a lot!
anyone here that knows a little bit about animations blueprints
Ya a little bit
Is there a way to have a master blueprint anim that sole purpose is for storing shared variables that i can share with all the other anim blueprints from the AI in my game?
But I think this shud be in #animation right?
yeah nevermind i will change channels
Sure
Hello! Still struggling with the NavMesh, maybe somebody has the Holy Grail today. As you can see there are three actors. They are the same actor. They have a collision box which is set as dynamic obstacle. Now when I hit play, there is only one actor which is updating the NavMesh. The other is not doing anything at all, and the other other is doing it at start and is then not doing anything to the NavMesh. Is there a NavMesh expert in the house or somebody who has a clever idea how to find out what's going wrong?
Actually I have no clue what's happening here and why it's not working. They are the same actors not doing the same thing.
are the actors falling into the water on start? looks like the 1st and 2nd actors seem to sink more, but its not quite clear, are the box collisions attached to the meshes themselves? maybe make the collisions visible and not hidden and check it out, and see it working when theyre not moving.
The boxes you see on the video are the collision boxes. I had to increase their Z vector at beginplay otherwise the navmesh has collision which does not update.
The box collision is a component from the static mesh
It doesn't matter how high I place them. (I think I copied them with the alt key) always only 1 boat is updating the navmesh
Yeah if I read my own post there is something really buggy going on here.
you can make them visible during the game as well (SetHiddenInGame=false), thus you can see if they happened to have been moved somewhere odd
I just checked, they are not moving somewhere odd.
Maybe I should create a new navmesh
going to try that first
Nope not working 😦 It just updates one ship
No it's set to OverlapAllDynamic I'll try to change that, thanks
Also thanks to SoakingRich btw
I appreciate the help
you were using dynamic nav mesh with nav invokers?
Nope without invokers Just a dynamic mesh
I just tried adding invokers but the problem persists
yeap, im having the same issue
the pawn doesnt update it
while the actors do
which is odd, since collision is set up the same way
but i guess you're not using character class?
adding a sphere to it solves it in my test scenario...
as long as original capsule is marked as dynamic obstacle
removing the sphere, removes the updating...
adding it, makes it work again....
Hmm
testing further it seems its the capsule collision volume that's struggling. Here with the same setup as the sphere collision, but as a capsule;
it now updates (which default capsule does not), but doesnt apply the modifier data ..
@quick sluice
Wow awesome. So I guess we ran into an engine bug?
Thanks so much
I thought I was going nuts
Yeah me too. I'll try to switch to 4.27 or older when I'm back at my pc
Hmm did you still have the sphere attached?
Does it also work when moving?
Ah then it must be my bad
Can't test right now
default settings except marked it as a Dynamic Obstacle
Hmm I m thinking about restarting my project. I just can't get it to work with the exact same settings
im using default navmeshbounds volume, if that matters
Me too
Why are you guys doing this?
What do you mean?
You're getting pawns to cut out the navmesh around them as they use it to move?
Wait then what are these moving things? Are they like dynamic obstacles that move around on a fixed path?
Hello! Anyone know How can I detect edges of the cover mesh (walls and similar objects)?
Yup
I'm really new to using navmeshes
So if I'm doing it wrong please tell me xD
Im just testing to try and help out, the actual usecase is ships :p
yup
I just had some barrell actors laying around 😂
I mean you're giving conflicting info, looking up higher you're talking about pathing the ships. You can't cut out the navmesh for this as you've already discovered, build your own proper vector field/force based avoidance system if RVO and crowd avoidance both can't do what you want
I think the issue is getting the navmesh to update in the first place
I feel like I said this before, your thing which uses the navmesh to navigate cannot itself modify its own navmesh
You're going to just spend all your cpu updating the mesh all game and constantly break pathing
Alright thanks a lot!
Thats true ^
Thanks for helping me out @misty gale
Yeah it does take a moment for it to recalculate it even with a smaller navmesh
I'll have to dive deeper into this because yeah I'm really new to this
Yeah i noticed early in the pathfinding quest how slownit was
Makes sense tho, tons of updating to do , all the time
With boats doing steering as well, you're trying to solve a nontrivial problem, I don't have an easy answer otherwise
So expect to put some time in here
Custom logic for reaching path location
I have implementing steering forces on the boats
Not using simple move to
Expected as much
But yeah I'll have to dive deeper into this the upcoming weeks.
Thanks all for giving me a direction
Im gonna need some custom logic for the pathing etc aswell,
Many routes to consider when it comes to avoidance etc
Yup
Especially when you increase the number of ai to rts /city builder standards
I was just planning to having boats. But yeah it's not a very solid idea
I had to implement a lot of "hacks" to get it to work
I stored HoJo's comment to check it out tomorrow
But very awesome you were helping me Squize! It made HoJo make that correcting comment xD
No worries 😛
Anyone know why an AI move would work on static mesh but not on a landscape? My AI moves fine when it's on a static mesh but stops when it's landscape, even though the navmesh is set up
Nvm deleting the nav meshes and re-doing it fixed
Good morning! Here I am again with yet another question. I rebuilt my project this night and am now using Pawns for the ships. I use a simple AIMoveTo function to try to get those ships to move to a random location. The function returns success but my boats aren't moving. I added a FLoating Movement Component and increased it's speed but the boats are not doing a thing. Anybody got an idea?
This is the blueprint I'm using.
Mornings! hehe. Is it reporting failed?
so its printing success?
Yes
and there is an AI controller for the pawn?
Yup, just the default one
I'm trying to no do hacky things this time
So I want to keep it as simple as possible for now
These are the Pawn settings
You cant use AI move to for a ship to turn nicely,
so not sure i'd call it hacky 😛
Auto possess spawned and placed in world
No I know, but for now it's good if it even moves
Doesn't work 😦
Do you know any way to debug this? I read something about the VisLog
Sadly no,
i do all my movement customly
cba having issues or being limited by simple move to 😛
Ah yeah in the end I'll have that too. Just want to try RVO and Crowd controll first this time
Yup
gonna do some custom logic on that aswell in the end, gotta keep the cost to a minimum
Yeah
try to get random point in reachable radius ?
altho.. if its not reachable, i'd think the task would fail
so its prob not that
Yeah I spawned actors on the locations, they were spawning fine. I also branched that boolean it returns and it returns success
true
I think the ships want to move, but the speed is very low or something
This is mine
check if your pawn is flying
How do I check that?
It's a boat, so it's flying in the water. Or am I being stupid again?
No it's not
Alright, will do that!
It's in none of the checkable states
I couldn't find the isWalking node
But I unchecked every box. Is that a good thing?
is moving on ground == walking
no,they should be checked,
but i'd imagine it must be in the right mode to move
so if its current mode is walking on ground, it must have the "can walk" checked
Ahh
again i'd think the moveto would fail if current movement mode != capable mode, but idk
on my end its instantly working..
Oh man
This again
xD
Let me go back to the cube model
instead of my beat
boat
maybe it's the mesh
Nope it's not the mesh
I bet it's some checkbox I missed, it always is
i did nothing to the floating movement component
just added it
changed 0 settings
went straight from pawn, no changes
Thanks it's useful information, but I'm going nuts
Maybe I should step back and try again later.
Been way to long on this again.
Gonna make some islands or something 😛
Thanks for helping me out man, one day I will get it right.
Learning something new everyday
Was diving in Behavior Trees, EQS, decorators, services this morning
It overwhelmed me
Why not?
Yeah everytime I think I've got this beast of an Engine under control there pops stuff up which will cost me weeks
yeah exactly
surely the current project is gonna give me some real curveballs very soon
so a lot of time is gonna go into that pit x)
Ah, what are you making?
Wow, yeah I can imagine
I always dive in before reading.
and hitting the wall i yesterday had xD
I wont lie, i tend to dive first aswell
i've probably not layed out the scope of the game properly yet either, so thats definetly gonna bite me sooner or later
probably later, after some overengineered stuff has been made
Hahah yeah like my buggy waypoint system with steering forces behavior which didn't work
steering?
EQS queries are going to hit me in the upcoming months
you doing vehicles?
Ships
you dont want to path find
well you do, but you want to make a spline
so you can create curves
between points
As long as you can find a path tho, the rest is just ... well, steering
Yup
you barely have to be on the nav mesh to get a resulting path
custom movement component could handle that tho
and as for boats, everything is realllly just a 2d location
as path following just sends the acceleration into the movement component
Yeah, but boats have to avoid eachother
and that made it a lot more difficult
I should have made a behavior tree
But before yesterday I didn't even knew what that was
depending on the amount of boats, avoidance shouldnt be impossible to handle with custom code
This time I will first do the UE way or at least try it, then making custom code
I know there has to be a lot eventually
But I can;t even get this simple move to thing working
So I have to dedicate that first
to *
ANd then the RVO, then the Chrowd Control or something HoJo was pointing at
Start with a new project, simple landscape, and go from there
Did that tonight
beat me to it
Yup I implemented just that last project
The steering was doing fine
I'd say start with the simple stuff
general pathing, steering etc
avoidance can be added later on
Yeah I did not have that implementing
I had smooth steering
the first tutoriall
Which worked, it was still a bit buggy
but it looked quite good
But now I'm dedicated in understanding the basics first
before doing custom shit
Taking it in small steps at the time helps with motivation aswell 🙂 seeing progress, if ever so slight
finally got my movement to work as i wanted it to, after way to much time spent on it 😄
Again, why i dont use moveto xD
😄 yeah it's undebuggable
but I read good things about the vislog
So planning on diving in that rabbit hole today
But still, with all this failure
I'm loving Unreal
It's awesome
surely there's a few quirks to iron out, but the general idea works pretty decently imo
Wow, that looks awesome man!
Good work!
Thanks 😛 Alot more work ahead tho. I cant even imagine doing collision/avoidance on this yet
gonna need some optimized methods for it
currently bp only as im just iterating. Maybe this time ill take the step and move it into c++ after a while
performance
Ah
currently 800 pathfollowers cost me about 3 ms (rendering mostly),
I don't know if that's much
Adding collision directly takes it to a stall pretty fast
this was with default collision
Ah yeah
not good at all
Nope at least it's linear and not exponential xD
Tell me if it's stupid what I said. But could imagine that stalling higher
Not sure what you mean
did you expect it to handle that amount of pawns better?
or worse
cus this is very bad 😛
I didn't expect anything because I simply don't know. But your graph is a linear graph, it could also be exponantial
that would suck a lot harder
my logic is self limiting to some degree tho
but yeah going into the reds isn't a good sign
lower framerate means less AI's processed
Ah that's a neat solution
well.... maybe? xD
then again, if anyone is at > 33ms it'll reach unplayable very fast, so i guess it doesnt matter much
so wether it then can handle maxpawns or not doesnt matter to much
Every pathrequest is also serialized, so i can easily control how much processing i can spare for the AI
No, but they're all funnelled into the manager, which returns a path to them
so i dont have 800 actors requesting paths at the same time , synchronized
So whenever they wanna go somewhere (random for testing ), they request a path
Ah that's very clever
which is added to a map in the manager
which in turn, after some checks and adjustments, returns the path it found
Also found that forwarding the tick to the actors are cheaper than enabling tick on them, so im currently doing that too
Ah nice!
Feels a bit messy, but we'll see how it goes down the road
You can refactor later right
i could also let the manager do all the movement aswell, but that feels even worse
Hehe, I wish I could give you solid advice mate
no worries, paying attention to performance as i move along and do necessary adjustments
refactoring when needed, yes ^^
Yup
It's already quite impressive to me what you did
I hope to be there over a couple of weeks, months even 😛
slow and steady is my strategy 😛
Yup!
Hello! Anyone know How to detect edges of the cover meshes simple?
no, complex
or complex
I need it to define the edge as accurately as possible for place for shooting (and cover animations), but I haven't found anything about how it's done in other games
it's a very complex process
especially if done by automation
it's easier if you do markup
but then you have to manually do markup
which may be a lot of time wasted
automation way uses ray tracing?
ray tracing, navmesh, all kinds of things
unless you have strong experience with cpp I would not attempt it
I trying to create automation system with tracing but it's hard to create something that will works with all types of objects (for example i need a different way to detect edge in cylinder and cube)
and settle for markup instead
Thank you. Can I ask about any documentation or materials that can help to understand me a general principle of complex way?
there isn't any
at least that I know of
for full automation it's about determining direction and constant tracing once behind cover
in either case, if you don't have cpp experience anything but very simple manually placed markup will be very difficult to do
I have a little cpp experience and big blueprint experience. What kind of things I need to know in cpp to create something that can work correctly?
blueprint experience doesn't matter
but create actors of a type, shape them to be the size of the cover
then gather those actors and query for how close you are to the box extents of those actors
is a very basic way of doing markup
the actor can also have direction so you know which way the cover is facing
and of course that has to be done on all sides of the cover
like this?
yes but consider that you don't know if all those sides are viable in cover
yes it will generate direction
but what if the cover is too small?
what if there are multiple enemies?
Glass has an awesome system for that btw: https://github.com/GlassBeaver/CoverSystem
GB is a beast
Rather than mesh edges, you should try to detect navmesh edges
Because detecting mesh edges require CPU access ans its expensive
Also navmesh is more accurate
in either case it requires cpp to do something proper like this
BP doesn't have this level of functionality exposed
so I'd say use the plugin if you can
Yeah, and not just C++, I guess you need something advanced level of C++
exactly
idk how to fix problem with multiple enemies. I can check their eyes with eqs test (can they see selected point or not)
thank you! I will research it
I also trying to research this - https://github.com/Deams51/CoverGenerator-UE4
I saw this, not bad, but nowhere fancy as GB's system
GB's one has multhithreading and visibility options
For example AI will not try to get cover behind a glass of wall
Can I use it if i'm cpp beginner? (I'm not about modify, use only)
Sure you can use it with BPs too
Just build the building, and implement it to your BT
For cover, you can get the edges of the navmesh if you're using CPP
and trace points along that
I did that for my cover generator
I'd advise a look at the cover system setup for CryEngine as a good starting point to be honest, I mostly did the same stuff but for UE
Cover reservation demo (pink = reserved, green = unreserved)
Video showing some work on the cover probe actor for Ground Branch.
Ground Branch always makes me think of Ground Force lol
which was a garden makeover show on BBC
@misty gale Could you elaborate on forwarding tick to actors?
How do you do it?
It's probably as dumb as it sounds
the manager uses a dispatcher ran on tick
every AI that needs to move subscribes to this
It's not dumb if it gives result 🙂
So you basically replace tick with the event dispatcher?
yepp
That seems a bit pointless 🤔
You would think so
Surely it's zero and possibly negative?
I wonder what's the point of this when the AI could instead just selectively enable or disable its own tick function?
im setting up the test again just to verify (i did adjustments to the npc afterwards)
^thats exactly what i had first zomg
and i saw performance difference
That's strange :D
Dynamic Delegates are slow as hell
Wouldn't use them for anything performance critical
I'm not sure what to tell you beyond this test
1ms compared to what
its not scientifically accurate
is it 17ms vs 18ms?
yeah
feels like it could be a fluke tbh
Are all of the actors ticking in the slower example? Or just the ones which would be ticked by the event?
just the ones that would be, but in the test it's all of them
but im turning it on and off as they reach their destination, yes
I mean if it's not even always the same amount of them which are concurrently ticking then I don't think you can really say anything from this result
10x the number of actors, you should get a 10x difference or at least higher than 1ms :D
true
Calling a few dynamic delegates sometimes takes 1ms alone in my project 😢
(pro tip: never make your health components delegates dynamic) 😄
yeah as Jambax said the event dispatcher itself should already make it slower than regular tick which makes this a bit odd
BP tick is also very slow
All of my delegates are dynamic but pretty much all of them are only called on occasion
If this was tested with C++ tick vs Aggregated C++ tick difference could be huge
there's a few other variables in this aswell, which is path length, as the location is random
dunno how much of a difference it makes but shouldnt be much in my guesstimate
Yeah tbh just the pathing and collision checks and such could easily factor into it
there's no collision check
they have no colliders or it's disabled?
none
Its just an ISM moving around
Actor Tick with 1600 Pathfollowers
vs forwarded tick
< 1ms
so the test is kinda invalid i guess? xD
it should've doubled
Yeah I think it's just some other thing based on that
game went up by 2 ms tho
Spikes should be ignored due to screenshot
it was 2 ms difference in the first test with 800 ai aswell
2ms difference on game
Not really sure what this tells me. I think ill move along with the forwarded tick for now, its an easy swap later on if it were to cause trouble anyways
the print string up in the left is there to just confirm that we're at the same amount of pathfollowers (no que left)
this is also happening if i disable movement. Purely activating tick vs subscribing gives me a 2ms difference in game... no clue why. Not sure why it doesnt increase with npc amount either.. seems odd to me
can you actually test the AI isolated?
as in stat AI
or if it's not AI, then actor at least
stat actor? (havnt profiled before)
sure
I think the system is a step in the right direction, but instead of using delegates, one could try registering all actors to a director on beginplay, then use director's tick to loop through the list of registered actors and process them
that's very ECS like and avoids dynamic delegates
For sure, i already have the list, so swapping to that method should be very little work
Didn't know delegates were considered slow
Is there a command for specific profiling of a single actor?
Seem i dont really need it, all my calls are from or related to the npc anyways
FORCEINLINE bool IsSuccsessful() const { return Status == EEnvQueryStatus::Success; }
I was mildly amused by this typo in EQS code lol
So I've got this little demo to make. Basically using some sentiment analysis we did a few weeks back to drive some gameplay in UE for a chat-sentiment-based twitch livestream, anyone think of a cool idea for essentially positive-negative based AI action to portray on a twitch stream?
Scale the actor's head up or down lol
I was thinking of maybe making a simple crowd sim, where the positive-negative values for each chat stream will make a little crowd happier or angrier
oooh, yeah, that would work actually.. have a percentage chance of throwing a molotov cocktail 🙂 hahaha
the crowd thing seems like it has a lot of possibilities
I was playing this game called Anarcute recently which sorta does that, you control a crowd of cute animals who go rioting and destroy stuff :D
yeah, can just spawn occasional lunatics that like throw stuff and self destruct or something 🙂
a bit like a violent pikmin 😉
anarcute? oooh.. lemmie look
works for me 🙂 yeah, something like a non-playable AI driven version of this, but with adversarial teams
right, project "Twitch plays overthrow" is a go!
I think my AI is too conservative and boring to be considered "fun" 😔
I mean I love it and it's great
it's just not very advanced
doesn't even seek cover or anything
Same lol. Even when done im not sure i'd call it fun to any extent
it is fun
in the scope of the game
but in the game it's just one of many layered systems 😅
layered systems sounds like sort of spreadsheet type busy-work ala Eve Online 🙂
I want RIOTS
so, I'm going to have to code a mob director aren't I 🙂
need to look up the UE web integration stuff I guess
is it going to make your characters an offer they can't refuse?
no, I mean sort of rioting mob.. not "the" mob 🙂
lol
I can build a city for the riots, but I can't build a riot 😅
although if you did make a director for the mafia mob, should it be called the godfather?
that's a cool name for an AI system. Epic probably have that in the list of silly names they're going to use along with niagara and nanite
it will be called Cortex 😎
If it is not gonna be useless as Cortana, let them name it anything they want lol
it'll be useless AND named something silly/cheesy
charisma or something
I remember back when Sony was pushing the "emotion engine" on goddam PS2
total horse...t
it was basically a triangle rasterizer
and the press were touting it as some kind of emotion synthesis thing 🙂
I think someone at Sony PR got their wires crossed
BLASTWAVE the new AI technology from MOAR EPIC THAN YOU games
How can I force AI to respect vertical distance when actor tries to get to the closest point on nav mesh? AI jumps off the cliff instead of taking ladders path.
there is a GetDistanceTo 2d node
I want to use SetFocus on my Mob. But, my Mob was not looking at the Pitch axis. What am I doing wrong?.
I use default Character and AIController.
control rotation will never rotate pitch
or your capsule will end up rotated
you want to print GetBaseAimRotation
Why does some pawns don't instantly update sensed targets? As if ai perception ticked every 5 seconds or so
In settings, this thing is set to 0 so it should tick every frame but it does not appear to do so
literally blind for some time
@still path you might have so many perception things that it's getting timesliced due to taking too long. There are config values for it which you can change to adjust the maximum perception processing duration (but I don't remember what they are off the top of my head), or you can use IGenericTeamAgentInterface to implement teams support and perhaps use that to reduce the amount of perceived actors
Any way doing that in bp or some key words to google that stuff?
generic team agent needs to be done in C++, the config stuff should be possible to just put into DefaultGame or DefaultEngine or something, but I don't really know what to google for it
Ok, thank you
@pine steeple You misunderstood. I need a controller rotation. Please see the blueprint again.
@night pilot that will not set pitch unless you are looking at another pawn
this is in the code
because it was a shooter engine originally
so its probably just a remnant
make your target point a pawn
and it should work
Hello all, I found out why my ships weren't moving. It was because the ship is high above the ocean floor and the pawn has to be close to the navmesh to find a path. Is there a way to set the amount of distance an AI Pawn can have above a navmesh to still find a path?
@crimson galleonI need a function to get distance to closest point on nav mesh in 3d space. I did not find any "GetDistanceTo 2d node"
@quick sluiceNavData->GetConfig().DefaultQueryExtent I think this one can help
Alright thanks a lot!
the biggest part of ai is just navmesh
right?
and behavior trees
the rest is code
Cheat it and have a pawn near the navmesh and duplicate its planar position into another actor which is your ship actor? So essentially have one actor that drives the other?
Thanks! Stored this message for when I get home.
my AI has become sentient, help?
i accidently set bAllowSentience to true and now i can't change it back or it'll kill me
@quick sluiceYou can change it here: ProjectSettings->NavigationSystem->Agents->DefaultQueryExtent
Is that only for vertical extents?
Oh yeah, I guess if you don't have any "upstairs" that'd work
hi guys! hope everyone is doing great 💙 wanted to ask if there's a way to know if a BTTask failed and notify it to the Controller/BTComponent/BB? thanks!
@undone hullyou can wrap it with selector and add second node to notify. But ofc it is better to do in c++ in proper way
Thanks drag!
Will try that out when I'm back at my computer again.
thanks! 💙
I'm still relatively inexperienced so could be off, but I feel like in addition to the other answers you could also periodically line trace from the ocean surface to the ocean floor, and then offset the Z transform of the static/skeletalmesh component in your actor by that distance (so you still only have the one actor navigating itself; if the distance between the two doesn't change then you could also just have a constant offset).
Thanks for your comment. Would be an option but I've got the DefaultQueryExtend to work so I'd rather do that now.
Probably could just have an interface or event dispatcher that sends a notification to whatever class you want prior to calling "Finish Execute".
Hello I am creting a customer ai for a shopping game and have this blackboard that doesnt seem to work how I would like it to.
When the AI spawns and runs this bb, the first thing it should do is initialize a max amount of shelves to go to. Then, it goes to a sequence where it finds a shelf in an array of all shelves based on an index, waits, goes to the shelf, then the index is incremented only if it isnt higher than the max amount of shelves. If the index will become higher, a finish execute is called with a "false" success. This in turn should run the last sequence where it finds a random register, moves to it, and finish with a failed result. But for some reason the middle sequence where the ai goes from shelf to shelf runs too many time.
As you can see the middle seuqence has 2 decorators, one to infinitely loop it so that it will continue to go to the shelves, and the other that compares the index and the max amount of shelves to break out of the sequences and move on to the last sequence.
After looking at the log, it seems that if the middle sequence fails, for some reason the whole main sequence is restarted instead of moving onto the last sequence.
This is how aborting works. It counts as a failure
You can try adding a Force Success decorator to the middle branch
this should allow it to abort, but still report a success
but note that it will report success for any failure condition from the child nodes as well
Hm. So becuase I have it having a finish execute as false, it restarts the whole thing?
So what about the condition I added on the middle branch that compares the 2 entries? When it aborts itself will it restart, or just move on?
the reason it restarts is because it's a failure and this is how Sequence nodes handle failure
A Sequence node executes its children until one of them fails, at that point it itself will fail
since it's the root of your tree, it effectively restarts the tree
Ok, so any failure restarts the whole thing. So what could I instead do to get the same desired result?
As I said add a Force Success decorator for the one in the middle
this forces it to always return a success regardless of what happens, which would make it continue to the next node when it gets aborted
Alternatively you can try using a conditional loop decorator instead of a loop with infinite iterations
I did try this however the 2 entries that are being compared to one another change their int value so I wont ever know a static value.
Ah I see
This seems to work. After the whole thing executes it seems to break, however once it finishes, the ai will be removed from the world so it wont matter.
Anybody got an idea as why my pawn isn't respecting the Z axis? It heads up 1800 z then starts moving on the same plane. I want it to stay at 0
it's moving to Z 0, but that might not be the z value of the plane it's on, would be my guess
I set it to -1000 and it still flies to 1800 before leveling
I'd either do a "get actor location" on self and then plug the z value of that in, or line trace to the landscape and plug the z value of that in just to trial.
Oh weird...
I already tried that
Yeah I'm struggling with navmeshes for days now
Can't even get a basic MoveTo to work 😭
Are there any collision bounds blocking it?
Nope
You've probably already done this but you could try disconnecting all the extraneous things, and then manually entering the vector values into the "MoveTo" node just to see if the behaviour persists (or alternatively just create a new pawn class and run a "event begin play" move to XYZ function). Sorry I'm not more help!
Also, I'm not sure if you've gone through these pages but I found them super helpful when debugging and optimizing some of my navmesh problems: https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/ArtificialIntelligence/NavigationSystem/
I did exactly this. It even floats to 1800 when using static XYZ values. I have another idea, maybe it's in the Floating Pawn Movement Component. Thanks for thinking with me buddy.
Yeah it was in the FLoating Pawn Movement Component
!
Planar constraint
Another mystery solved
Nice! Hopefully when I inevitably encounter something similar I'll remember this 😆 .
😄 I'll stick around this channel the upcoming time. Hope I can help you out one day.
you can finish with succes if you override OnAbort
but that probably won't stop certain things from triggering
Oh that's good to know
How do I open the AI Debug panel? Internet says it's the " ' " key
But it doesn't work.
I think the thing it's referring to is the gameplay debugger
on a US layout it's the ' key but if you're not using a US layout, it's probably one of the keys on left side of enter
I think you can also change the keybind for it from editor settings if you can't get it open
Alright I'll try the editor settings, thanks!
Hello, I have an issue with navagents. I have a huge dragon that requires a large capsule size. In order to fix it getting stuck I've added one more supported NavAgent with a radius of 150.
The issue now is that all other NPC's are using that large NavAgent instead of the default one, causing them to get stuck in small spaces (which did not happen before). Any ideas on how is a Character assigned to a NavAgent? I've disabled 'UpdateNavAventWithOwenersCollision' in the character movement, but it still creates issue. And that happens after a level transition (I use a single persistent level with multiple levels streaming in/out'). Any ideas?
you need 2 navmeshes
one for each agent
there are probably some settings on each actor in regards to which navmesh to use
You'd think 🙂 I couldn't find any. Are you aware of that settings location?
PS: Already have 2 navmeshes, just that the agents pick the wrong one:
I just want to make sure that my small NPC's use the 'Default' and NOT the 'Large' one
@mint bolt on character movement component, there's nav movement section. Put radius and height to match what you defined in agent and uncheck update nav agent with owners collision
I did that, but after a level transition it breaks.
it breaks the moment sublevel gets streamed in?
Yes. I have a sys that unloads the current level and loads the next one. As streaming levels (but I think that's irrelevant).
The point is that at some point the agents have to pick what navmesh to use and they're picking the wrong one it would seem.
I'm looking through the source code but it seems i'm too dump to figure it out.
As far as I know they picked it when spawned. Are you using gameplay debugger (') to confirm their nav data gets changed?
Let me check with that. I'm quite sure it's fine though since the navdata is built & stuff, but I'll double check.
One minute since with loading & stuff everything is so slow.
Aaaand it crashed... still better than compiling shaders.
@lone stump Is there any way to be able to select a character without (')? Since my camera is focused on the main character and I can't simulate the game since on a simulation I can't switch levels.
@mint bolt you can use ; to open debug camera and point it at the AI you're debugging. When deugger opens you can use ; to go back to the character
Doesn't work.
Yes, the docs said it should work like that but when I open the debug camera it doesn't allow me to change the focused actor.
you just want to be in debug camera so you can aim at AI and then do '
Yes, but in the debug camera the (') doesn't work.
works for me :S
Hm...
Any idea were is the gameplay debugger in code somewhere? Maybe I can scrub where from that 'NavData' info is retrieved:
Atm it says 'Large' which is obviously wrong. It should be 'Default'.
All right... it seems that the selection is automated based on some sort of criteria. It's obvious that the criteria doesn't work for my case because of some other variable that I have somewhere around my code. I'll just have to see what criteria is not matching.
I've tested and yes, I can confirm. After a level transition the 'NavData' instead of being 'Default' as is normal, it is set to the 'Large' agent. I'll try look on why it is like that after a level transition.
@lone stumpif you're curious I've found the issue. It would seem that the best fitting agent based on the radius is chosen. I have 2 supported nav agents. One has a radius of 35 (Default) and another a radius of 150 (Large).
It would seem that an actor that has a radius of 48.0 is closer to the 'Large' agent than of the 'Default' agent. I would call that 'Unreal Logic'. Certainly not very logic to me.
@mint bolt good that you found it 🙂 yeah, it checks radius first, then height. Larger one is always chosen because if it chose smaller one it wouldn't be able to walk through smaller spaces, better to think you're bigger than smaller
Fuzzy logic. Thanks for the help.
np, glad you solved it. Why did it change on level streaming though? Streamed level had large agent, but regular one didn't?
It's complicated. Because I've added a 'Large' actor later and when I've tested on that level the pathfinding was NOT built for the large agent. However when I was streaming it it was seeing that the pathfinding was incomplete and it was building it at runtime (since I use runtime path generation). When testing in the editor everything was fine since everyone was using the only available build pathfinding since it was the default. On a level stream it was re-build correctly and some NPC's started using the 'Large' pathfinding.
That made the issue quite difficult to observe and only at runtime after a level load.
And if you think that was complicated, don't worry that's not even the tip of the iceberg :). Another one was the height based goal reaching in 'MoveToRandom' in BT tree nodes.
Level streaming makes everything more fun 😄
Yes, and makes me want to shoot myself. And with our custom save/load system on top of that the fun is complete.
Yeah, multiplayer and level streaming that the 2 big things in Unreal that makes everything else alot more complicated 😆
Hello, juet need some ideas for this. I have a customer ai that will enter the store, go to a couple shelves, then go to a register, and go back to the point of spawn. Now once they are back at their point of spawn I would like them to despawn so that no runtime errors occurs.
Would it be viable to create a new task that despawns the customer/ai once after they arrived at the spawn location? Or is there any easier option?
You could do that, or just use an overlap box or something at the spawn point which despawns the actor
It doesn't really make a huge difference
Anyone know what the use case would be for Grid AI Controller
and if it would work for my purpose
Have a guess what i'm trying to remake
What would be best way to cast to the GridAIC would that work ??
I don't know what the grid AIC is really
but if you want them to move in line I guess you could do that by code
is there a way to force the Navmesh to regen whilst game is running ??
yes if you set the navmesh to be dynamic
but I'm not sure why you'd need that in your case?
i have workaround for now so should be fine
So anyone help with this, How would i give AI a area to seach within for a point to go to ??
nav modifier and filter?
modifier ??
bassically when a certian behaviour is used on the tree i need the AI to stay in relative corners but still roam around in them corners until told otherwise
Today I show an often unknown but very useful tool for helping differentiate our AI movement.
thanks
Could definitely get that behaviour using this. Alternatively, since it's such a small area you could probably just do something much less dynamic, like using a series of collision boxes or movement points to define zones of movement.You could also use the EQS system in conjunction with some predefined vectors if you're wanting to avoid overlap with other characters (could use this in conjunction with the other suggestions or on its own).
yeah I did think of doing something where a "Zone" will have array of locations and it just randomly picks one
just thought it there was more of method of doing it that has less sending of thing between everything
I don't know if it's helpful, but I use a combination of different methods for moving units in my project. For instance, I have "scout" units, that basically take a north, south, east, or west coordinate from a town, and then use an EQS to generate some movable points around it's perimeter in the desired quadrant, but I also have more of a spline movement system that guards in the city generate random reachable points on to move along roads and paths. Then I'm debating the possibility of using the navigation queries from that video to avoid moving into buildings unless they're actively pursuing someone or satisfying a need (to avoid cutting through buildings and such).
see mine is a remake of classic not to copy and release but to see if I have a reachable Goal can I achieve it. In this case work out to make the PacMan game am i able to use what is available to me knowledge and help through methods to create the game to a playable level
and with it being PacMan it dosen't need complex things. But I'm trying to furture proof stuff rather then get it in working and then clean up as it were
as they say sometimes can't make something without making a mess in process sometimes
Yeah that makes sense, I've definitely ended up revamping a bunch of my systems multiple times as I learn more. I would maybe start with a system that you find simple and approachable and then tweak and revise from there, but everyone has different preferences and I'm pretty new so take anything I say with a grain of salt. Good luck with the project though!
thats the plan it is turning out to seem
Has someone experienced the problem with Nav Mesh Bounds Volume in UE5 not working? In a new created level the nav mesh bound volume appears its green area, in the main level not.
dunno if its ue5 specific, but sometimes the recast needs to be deleted and rebuilt
Deleted from the World Outliner?
yeah, find the recast named object and delete it
then rebuild
Rebuild the level?
alright, when you build navigation it creates this recast object, that's sort of like the nav mesh container, that sometimes stops updating. Delete the recast object then rebuild navigation. This is not deleting the nav mesh bounds. Do this in the level that has the issue
Did that and rebuilt the navigation - it still doesn't work. Funny
maybe delete both recast and navmesh bounds, or doublecheck the setting on the navmesh bounds, I dont use ue5 so it could be something different
Hi all
needs really help here
I need help setting Enum values in Behavior tree which each actor has control on what enum value is set
anyone able to help would be great please 🙂
sorted it
I have a rouge Delay
Hello,
I am having this issue where the sequence on the far right runs before the "Compare Blackboard entries" fails which is THEN supposed to run the sequence on the right.
did you ask this before? and wasn't the idea that having an infinite loop like that means it will never exit that middle branch?
I did, however I fixed some code and found some errors during runtime.
Correct the infinite loop would never exit so that the ai will keep going to the next target point, however, there is a decorator that compares the bb entries that will fail the sequence so that the ai will go on to the sequence on the right, but a force success was needed so that the middle branch failing wouldn't restart everything.
ah! well, it is odd that it executes the last bit. Are you able to watch the BT and see how the exec fires off?
Sure can.
and it doesn't at all fire the first 2 branches?
No, see. Everything works fine, some of the time.
The only problem I am having, is that it sometimes leaves the middle branch too ealry, or too late, where the Shelf Index and Max Shelves entries are not equal (which should keep the middle branch running) but will still go on to the last branch.
leaving to early or too late, that's not reliable... i dunno, i barely grasp whats going on here so i dunno
The findshelf task gets an object from the world based on the shelf index. It grabbed the location and Moves to it. It then waits, and goes to the IncrementShelfIndex where it adds 1 to the shelf index. It then goes back to findshelf, gets the array and gets the object with the updated index value and gets a new location.
I want this to stop when the Shelf index and Max Shelves entries are equal to each other. Once they are equal the middle sequence loop will break as the "Compare Blackboard Entries" will fail but has a force success so that the BT doesnt restart and it goes to the last branch on the right.
However the problem is that, even though the middle branch has the decorator to run until the 2 values are equal, the ai still sometimes runs the last branch.
this is still more than i can grasp in how its all setup. honestly, sounds like it would be easier with a selector and then each task branch has conditions to determine it
Hello.
I know, how to make simple chase player behavior with "Move to Target Actor". It's done.
Then I placed arrow component in Player_Character_BP, and tried to make AI character to move to player's arrow component's location, instead just chasing Player with next BT_Task:
But no success. AI Character keeps just chase player, instead move to its arrow component location. Any tips, plz.
this might work if you get the component reference itself instead of the class. The Target Actor, if it is just an Actor Class, would need to be cast to the specific class who has this component
I casted target actor to a specific character class. Also, no success.
Try to get the component ref.
lose the getcomponentbyclass node and call the reference itself
looking at this, the component would exist inside BP_Echo, so look for the component name
Thanks, Dude. It's working. Oh, God, so simple and obvious solution 👍🏻
great stuff
for AI how can i increase the amount the Navmesh covers ??
This is the mesh and collision
Then in game the navigation where you see the boundary of navibal area
seems correct, what's the issue?
so if the point at which the AI grabs the player position is not withing the nav mesh
right up against the wall. The AI will still take the effect to try get to it so will take time to get there if it can great if not then it won't mark as failed until it tried to get to it
only at that stage does the AI Move To rerun
for Pink Ghost ambush this dosen't work that well as it predicts location then waits till it's tried to get to it before failing the AIMove to
is there a way to give AI an area to stay within
so if I tell it to find location in a specific location but want it to only path using a specific part of navMesh what would be best way ?
well i tried that
the ghosts each have there own Enum to say which brance they should run
when i try it out it seems the system is only choosing one of the Ghost to do whats needs
is the error i am facing is because all the Ghost are trying to use one Behaviour tree
rather then each having there individual BT ??
that'll be my issue then
?
I can't have child of a Behaviour tree so it's gonna have to be just dupplicates
oh you mean like a in game child BT ?? so in game it will run it's on tree
so what your saying is each AI would need a seperate BT
no
same BB just seperate BT
no
