#gameplay-ai
1 messages ยท Page 94 of 1
you would have to script AddForce() or some other physics node, query location on tick & stop movement (or slow down when youre close)
and - depending on your movement type (this is targetted at ROLLING balls) you would hav eto have extra calculations while moving to keep steering or turning possible
Hey all - not looking for a handout here - but some guidance for me to research on......
Been looking all day long for WALL WALKING with AI - think of a spider. Most people pull this off with PAWN class, and alot of line traces for the angle calculations... which i can see for things like IK feet tracing which i'll definitely want.... but this takes away the whole CHARACTER MOVEMENT component... which is what NavMesh is using to determine pathing for AI logic.
What am I missing here? I cant set a NavMesh to have 90 degrees as max walkable slope... it stops at 89.
@foggy moth Could it be related to GimbalLock?
not at all
you cant set nav mesh to 90 degrees walkable slope
so you have to calculate Z height walking
Ah sorry, no idea.
@foggy moth You might want to look at this https://www.youtube.com/watch?v=oLB28JvEQAg
I haven't actually used it so I'm not sure if there is a way to make it have normal gravity and still walk on all surfaces
Forgive my last post (as its deleted) - but my actual problem was Nav Link Proxies - and the ability for a character to jump UP onto a linked nav mesh - it straight up wont do it.... i can JUMP just fine form the enemy class (Character base) - but it wont make the decision to jump up onto a ledge that is well within its jump radius.
If I'm wanting to spawn a few pawns and all move to one point (but they should all have their own pathing)
should I just be using one controller to posses them all? is that even possible?
@foggy moth are you using c++ or blueprint for your jump? ive got it working in both but the method is different
@cerulean patrol depends on the situation - sometimes its best to control all pawns from one bp, sometimes better not to
Can anyone recommend some good basic AI tutorials? Iยดm currently developing my own AI and kinda stucking in which data I need to pull to create a strategically behaviour (like lurking for the player -> attacking the player). Currently my AI is just rotating between different behaviours ... but nothing strategic atm ๐
(And above the programming essentials book for ue)
@proven ravine maybe https://www.youtube.com/watch?v=WFvG9wNOwoY
@proven ravine for strategic behaviour look into EQS
@shadow lotus Iยดm working with BT atm, got passed this point (atm working with the EQS-System), but thy
ah ok, i have no experience with this
BT and EQS should be enough to make a decent AI
Iยดm working on kinda a environment AI
which should track the players behaviour and react upon him
hmm so not an AI agent as such
Iยดm currently using just an pwan, which won`t be visible in the game
and running around and activating my environment ... like an AI for an Horror-Environment to trigger events through the AI instead of triggering them through boxes
I guess you wanna be feeding teh blackboard from the player behaviours and having the BT act off them
jepp
And therefore I`m currently looking for variables, which are important for strategically decissions
on modern AIs
but I`m currently only finding the basic tutorials for AIs ... but I think I should watch for strategic games AI tutorials/posts
@soft shuttle btw. thy, Iยดm kinda new to the EQS, so I guess I need to understand it beyond the basics ๐
@proven ravine i just started into the EQS system myself... man is it awesome!
opens up the WORLD to possibilities for AI decision making
@foggy moth Jeah, but the EQSTesting pawn is kinda confused designed ๐ THink Iยดll just need some time practicing and get used to it.
i like th eidea your doing though
Like it also, but not that easy ๐ Think this is gonna beyond the stuff shown in tutorials ๐
@proven ravine https://docs.unrealengine.com/latest/INT/Videos/PLZlv_N0_O1ga0aV9jVqJgog0VWz1cLL5f/NZZtMNdJk5o/
@soft shuttle Jeah, Iยดm through this Tutorial
but thy
I think I need to create some AI unreleveant Data tracking of the player first
from which my AI get`s the Data to handle the behaviour in the BT
โค thy Ian Shadden
Hello all - we got a feature request up today about NavLinkProxy's and their limited functionality when converted to a blueprint actor.
If you could have a gander at this short explenation of the problem (AI Jumping & using the NavLinkProxy to set this up - i have a great node setup to procedurally calculate a CharacterLaunch velocity in the forum post).
This is a pretty slick setup for AI & Jumping UP (or down) for navmesh pathfinding solutions.
Has anyone jet created custom Pathfinding for Unreal (want to create some aerial pathfinding, but kinda worried, that my whole BT becomes useless )... are there existing any good tutorials for such a case?
@proven ravine : They have indeed. DoN's Pathfinding AI system. It uses voxels to create paths for flying objects such as airplanes, spaceships, birds, bees and so on. We use it and it's very effective.
I don't know. Our game is on 4.12.5 currently. I do believe I compiled it with 4.13 but had to revert for other issues
But thy anyways, will take a look into it ๐
man.... EQS sure is a powerhouse!
bleh so i have an EQS system that is running in a behavior tree..... on STATICALY placed enemies in the level this behavior tree works perfectly - as i desire it to....
When i SPAWN the AI (Using SpawnAIFromClass() node) these enemies stand still - doing nothing. THEYRE THE SAME CLASS TYPE....
http://puu.sh/u3W8D/8a2e67b7d5.jpg
What gives?
i cant use SpawnActorFromClass() because it wont initiate the BB & BehaviorTree - even when using the following nodes.... and yes the AIController is assigned in the enemy Character class
http://puu.sh/u3Wf5/95f37a27b9.png
PROBLEM SOLVED - it seems taking away the RunBTree & RunBlackboard arent needed in the AIController class when you use SpawnAIFromClass()
hi! I have a problem with my nav mesh. I need it to be dynamic, but some parts of my mesh become red when I move my character, and when this happens, it stops detecting obstacles
any idea? thanks!
@vale rose - make sure to set ProjectSettings -> NavigationMesh -> Runtime Generation
Theres a video link in here that m aybe helpful to you:
https://answers.unrealengine.com/questions/223395/dynamic-navigation-mesh.html
hey guys - i need to break my service - when/if an enemy kills a player i want it to return to its standard BehaviorTRee behaviors - but negating the pawn it killed (i'm leavin git behind for a few seconds like a death animation basically)... all of the ACTOR CONTEXT is set in an EQS to find the nearest pawn.... and it's setting it to this one that the AI just killed....
How can i break this in the EQS?
ok well i've narrowed at least somewhat down..... When a AIBot has killed an enemy - its stuck in this last branch you see here..... i dont know how to break it, i can CONFIRM that it has cleared the TargetActor key as well set the boolean for CanSeePlayer to false... i dont know how to break this SEQUENCE node so it pulls out of this behavior path.... any suggestions?
i'M AN IDIOT - and i'll leave the above picture up to help anyone else that doesnt know about the OBSERVER ABORTS node in the details panel on decorators.... i had it not aborting... changed it to SELF and it works the way i've intended/wanted all this time.
anyone know how I create an EQS query instance in blueprint?
I've got the query, I need to make the instance
lovely out of date docs https://docs.unrealengine.com/latest/INT/BlueprintAPI/AI/EQS/RunEQSQuery/index.html
I really do not like out of date docs ๐ฆ
already coming to the conclusion that using EQS outside of BT is going to be near impossible
ffs
guess I'm not using EQS then, nice job
docs aren't out of date, that node is just only available inside a BTTask
guess I'm gonna have to expose EQS to BP myself
@floral mango you can run it from an AI controller if you want, but you need to check an option in project settings I believe to stop it converting your controller to a pawn
yeah I saw the setting for that.
EnvQueryManager isn't exposed to BP though
not enough to use outside a BTTask anyway
not sure what it is that limits this function from appearing only in bttasks UFUNCTION(BlueprintCallable, Category = "AI|EQS", meta = (WorldContext = "WorldContext", AdvancedDisplay = "WrapperClass"))
static UEnvQueryInstanceBlueprintWrapper* RunEQSQuery(UObject* WorldContext, UEnvQuery* QueryTemplate, UObject* Querier, TEnumAsByteEEnvQueryRunMode::Type RunMode, TSubclassOf<UEnvQueryInstanceBlueprintWrapper> WrapperClass);
have to look at it more tomorrow when I'm in front of the code and not poking around in github
@foggy moth i have that property set to "Dynamic", but the nav mesh is still red for a while when i move
so, someone could make a plugin for AI to have more exposure to BP ๐
@floral mango we def run queries outside BTs, what are you running into?
Run EQS Query node, can't see it where I want to
i.e. outside of a controller. I have a reference to the AIcontroller but I can't run the EQS query from it
nm working round it
Has anyone noticed an issue with Linetraces when running them inside a Service?
I get inconsistent results
what you mean by inconsistency?
Dont worry i figured it out.... Using the Maniquin for some reason if the animation changes in the frames between the Service being called especially around the arms it causes the Linetrace to return a null hit which is really odd
Hey all. I'm on UE 4.13. I'm trying to use AI Perception with sight configuration. I'm not seeing any cone or anything visual in the viewport. Is this normal?
I should specify that I'm in the blueprint editor. I have the AIPerception component selected but I'm not seeing anything in the viewport.
So I believe my problem is that I'm adding the AIPerception component to my character blueprint instead of the controller. Am I doing this wrong?
Nope.
Check your viewport settings in the editor ( I'm unable to provide a screenshot of it sorry )
It's a little triangle dropdown
Or it's a button that says SHOW
I can't remember which.
I just noticed that Pawn Sensing does show the cone but AI Perception doesn't. Is this normal?
I think so.
Pawn sensing is old system and obsolete, use ai perception.
it's "'" key by default to bring up the gameplay debug tools
then 4 on the numpad IIRC to show perception stuff
Oh well I've enjoyed working on my planner plugin :> https://twitter.com/MieszkoZ/status/834081593442631680
@vagrant bison - i'm interested in this AI Perception component - started reading up on it after you posted here.... i got a few questions i'm not seeing online:
Does it cost more than EQS system?
What exactly are you doing with the Perception system that BTService doesnt handle?
I"m trying to decide if this would be a better solution for an AGGRO system for enemy AI as compaired to BTServices - which i'm blocking the tick-LineTrace to characters by a distance + angle bool check. . . . which seems to be what Perception system offers?
@foggy moth perception is a means for your ai to pecieve its target - sight, hearing etc. EQS is a part of a means to devise a suitable response to the target
@soft shuttle - is it only used within AIController + combination with the pawns it percieves? or can it interract with BTService + Tasks?
it can interract with btservice in blueprint ways (key access etc) but I use it as functions in my AIcontroller which when triggered by sight or sound check to see if the percieved pawn is a more suitable target
then set key etc to the BT
how do you mean by more suitable?
like right now i'm using EQS to retrieve the CLOSEST PAWN (player characters class) and set that as my TARGET ACTOR
obviously - if it can see (linetrace) to the object
depending on the type of ai, whether its a weaker target, a nearer target, or one which is doing very well (killing spree)
ahh, im doing that with sight perception
aye you set max, but you can just get actor location + actor location,, subtract them and get vectorlength for distance
yah i'm good with the calculations part... i'm more interested in WHAT you're doing with the perception node
i like the WEAKER TARGETS
or killing sprees
so i assume to get the closest pawn - you're storing array of actors + distances in 2 seperate arrays... getting the MIN of the distance, and then GET()->ActorArray[] to get the nearest actor?
aye i have children of the aicontroller and override the perception on each, for shortest distance (shotgun ai) its loop through actors in perception range, calculate distance and use the shortest distance to get target. for weaker target, it will prioritise if less than 50% health, or if using a sidearm, for killing spree it links into my announcer system, just pulls the onkillingspree bool also used for player getting more points when killing player on spree
its simple bps but they change the way the ai feel a lot
i like it - goign to mess around with it in my project today - thanks for the explenations!
no worries mate ^^
@soft shuttle So AI Perception an Pawn sensing are essentially the same thing? Just that Pawn sensing is getting deprecated? I want to write AI but not sure if I should use pawn sensing or AI perception.
I also can't find much help online for AI Perception as the documentation hasn't been written yet.
@vagrant bison you are supposed to use AI perception as its the newer way of doing it, but epic have said that they wont depreciate the pawn sensing for a while
i use perception, its not overly documented but once its in place it works well
When using AI perception I don't see a viewcone for sight. So it throws me off. Is that normal behavior?
are you in simulate and clicked on the pawn with ai debug on?
No. Just in the Blueprint editor. Pawn sensing displays the viewcone, but AI perception does not.
hmm
Unless I'm using it incorrectly.
can you see like two circles around the pawn
No circles at all.
hmm
I'm using 4.13. Perhaps that's the issue?
can you see if the circles appear when you click on the pawn in simulate
make sure ai debug is on
In simulate yes.
But if I can't configure the viewcone, how can I be sure that my character is facing pawns when sensing?
i just set the angles of view and trusted it
I see. I followed the Unreal Engine BT tutorials and now I'm finding out about AI Perception. So I'm having a tough time learning.
did you watch the advanced ai training stream? its where i learned about it
The BT tutorials had me build a sphere raycast and line cast for detection. So things are weird.
With Alex and M?
It was a bit cringy so it was hard for me to get through. :/
no lie
it took me about 10 goes to get through it
far from easy watching
also stuff was different in 4.14
I went in with a great attitude and mindset and then I was like wtf is this?
for real haha
lol I had to look away during arguments. /r/cringe material.
xDD
But if you're telling me the content is worth the pain, I'll watch where I left off.
i can honestly say that i feel it was worth learning what they had to say, even though it was as painful as riding a water slide lined with sandpaper
Hey All - whats a better strategy for handling enemy AI + special moves? Right now - from all i gather from the AI tutorials + videos i've watched... it seems to be doing just single style attacks, with some AI movement behavior.
I want to graduate to some more advanced attack systems, 3-4 different attacks that have cooldowns and activate to special circumstances....
The circumstances I can pull off in the BTService .... but should i run these as TASKS in the AI? Or should i code these within the Service itself, or pass parameters over to the actual character blueprint & run from there?
I assume I should start looking at doing some kind of State ENUM for teh enemy AI... so that i can guard against unwanted BehaviorTree activity?
If this seems vague - hit me up cuz i'm highly interested in planning ahead on this.
So why is the AI in UE4 so terrible for performence?
I get 120fps with no AI, and I get 80 with 20 AI and the AI don't even have any functionality
Literally lost 33% of my fps just for placing dummy AI pawns
@lilac bone - how... what system are you using? You say "Dummy AI Pawns" what are they doing? EQS or Perception at all?
They stand there and do nothing. I have AIPerception set up but I deleted all of my BP stuff, they do nothing
So it's a component but it isn't used
@foggy moth The Character BP has nothing extra in it other than a sphere and the Controller has nothing extra in it at all now
So to anyone that can help, all I've found is that the Character Movement Component adds some lag when there are a lot of AI that have it. Is that all I have to work with? Lagging with 20 AI that don't even do anything is pretty pathetic, and I was hoping for around 50+ AI.
@lilac bone Make a pawn and implement your own movement perhaps?
@rustic nova Could that all be done within blueprints? Would I have to write my own navigation system or is it easier than that?
I think? you can still access the navigation system
You are just missing stuff like jumping / gravity and all the other stuff charmov does for you
Awesome, I'll give it a try, thanks
Yea its FindPathTo****
@lilac bone I have a spawn volume in my level that i get around 20+ guys on the map easily.... and i have 0 problems.
FPS is 60+ - my bet is you're doing something wrong.
again - i dont know what your doing - but something is on tick ... and chugging down your system.
As I've said, the AI have nothing. There is nothing extra.
then i'm hard pressed to believe there is a problem - simply adding AI Pawns that have NOTHING in them to the map will do nothing.... Unless of course your pawns have 40k+ polys per pawn.... that could be a problem -
I highly doubt your getting AI problems that is bogging down your system
adding a bunch of characters and controllers means you have a load more stuff ticking and doing things every frame, not just the AI
that was what i was about to say - try disabling all ticks, if not that then disable physics collision made a big difference. but to be honest - all this is just speculation, you should be using the performance degbugging tools to find out whats killing it
Hey guys. My AI rotation speed is instant. This is probably not a question I should ask here but I'm not sure where it should go. What should I do to have my AI rotate appropriately?
set a target rotation and lerp towards it on tick for a smoother delayed turn
@floral mango , great thanks for the tip.
@floral mango# Relevant Post -> https://answers.unrealengine.com/questions/235020/ai-movement-rotation.html
Got it all worked out now, thanks again.
ah didn't realise there were features in the controller to do it for you :>
brainstorming NPCs and wondering how it would work in conjunction with anims/bones if I want for NPC to look at player and track him
visually it would look like this: player approaches NPC (who is in idle anim), NPC "looks" at player and as player moves around, NPCs tracks player with eyes, then with head, then with full body.
how would I do that ?
@flint trail I would probably create a task in a Behavior Tree to handle the head and the eyes. Then a separate task to handle movement.
aye, but how would I control actual tracking ?
in 3D app (and in older engine I used to work with), tracking is done either via constraints or via direct manipulation with bones
State Machines. Are you familiar with them?
somewhat
it still doesn't explain how turning is done.. I know it can't be animation. It has to be done procedurally.
@flint trail Take a look at this link. https://answers.unrealengine.com/questions/418486/mouselook-rotate-head-bone.html
This looks like it would work perfectly.
aye, thanks
No problem.
So is it reasonable to assume that if I do everything correctly, I can expect to have ~50 AI in a small area with little extra lag?
Given that those AI are all navigating independently and use Character Movement
depends on a lot of things.
it costs frame time to tick every component of every character you add
the more you add, the more your frame time goes up
I would say that 50 agents all pathfinding etc...you're getting into the realms of needing to do a fair bit of work rather than just dropping in default characters and controllers
And that work, in particular, would probably be replacing the default Character Movement with my own version?
if it's bottlenecking you sure
with 50 agents....chances are slim that you actually need all 50 full-fidelity AI processes running. Probably only interested in running a full simulation on a few closest to the player
How does the AI Perception tool know that the character is facing other actors?
Figured it out all out ๐
@lilac bone I'd say it's possible. I just tested this ( https://forums.unrealengine.com/showthread.php?135225-Advanced-Locomotion-System-V1 ) and I could put about 128 pawns on my map (default AI controller, using behaviour tree for random walking) before my game thread time went over 16 ms
and most of that went into blueprints, so converting the code to C++ would help a lot
@wary ivy Yeah I did some more testing and it turns out adding the first initial AI will drop my fps from 120 to 80 but adding more doesn't affect it
that's with i7 2600k
So I could have 5 and my fps is now 80, but I can also have 50 and its still 80
but 0 and it jumps back to 120
odd stuff
be sure that you aren't testing with the ridiculously hi-poly epic's default character ๐
lmao yeah that thing is nuts, i just have a sphere with a box nose, ๐
if you have 100 characters there, you could get more perf issues from the chars themselves than from their AI
Question. AIPerception and EQS. Can they be used together?
I think I just need to think of good use cases for the two and then I can figure it out. If anyone has examples that would be great.
they are separate things for separate purposes, so yes you can use them together
Do you have a quick example of when I would want to use the two together? An example scenario?
I haven't really worked with them
but perception encapsulates things like vision and hearing
I think the docs have better explanation than what I can provide ๐
Unfortunately no docs on AI Perception yet :/
yep you can use them together
using both myself atm
use perception to detect enemies etc.
EQS basically generates spots around the caller and then each of those spots are graded based on some criteria (that you decide) and eventually it returns a list of spots sorted somehow or the best spot
use EQS to find cover
EQS query spot grading can be a simple "if visible to me, grade 1, if not, grade 0"
or it could be distance to something and then the score would vary based on said distance
anything really
yeah it's pretty powerful EQS, can do all sorts with it
I see. I was thinking of EQS working exactly like AI Perception. But I can see the difference now.
perception is just perceiving stimuli. Set up an actor to be a sight stimulus, and AI with a sight perception setup will detect them and keep them in a list of perceived actors
The biggest differentiator being EQS for "Environment". Duh.
think there are some ai perception docs knocking around somewhere
This is my 3rd day studying AI Perception. 1st day studying EQS.
@vagrant bison Most shooter-style game AI goes through three things when completing an action: stimulus, decision and action. A good method in unreal is to use the perception system as the stimulus. can the AI see or hear an enemy? if so, then you have a stimulus. Now it has to decide what to do. If what to do includes deciding a location to move to, then you would use EQS. After a succesful EQS query, the result of the EQS can be used as part of the action, in this case moving.
That makes so much sense now. Thanks @soft shuttle
no worries bud ๐
Does anyone know of any youtube video that explains in a sort of top-down way what this EQS stuff is about, preferably with demonstrations on how to use it? Because the official UE4 youtube channel's livestream for "advanced ai" has been just over my head, whereas its other more basic things are sort of old hat for me.
This document covers the interface and most commonly used workflows of the Environment Query System within Behavior Trees.
@floral mango Man, everytime I think that I've gotten all of the useful bits out of the Docs, I ask a question and here comes this article I completely missed somehow
have to nose around, a lot of the good stuff is community written tutorials and vids
any way to stop the default spectator pawn from registering as a perception stimulus?
probably simplest way is to extend the class and then disable it there and set that class as your spectator pawn class
@floral mango you have implemented GOAP
in what manner are you incorporating EQS into score calculation for each goal ?
I started writing prototype for Ifinite Axis Utility ai
and EQS looked like nice addition for getting spatial data into considerations
but after closer look EQS is something like considertion in in self (it scores locations), while in my system considerations are supposed to score targets/locations
I'll just have a dynamic cost associated with the actions
so the actions will use EQS among other rules to periodically check what the cost of executing the action will be
haven't got any system as such for selecting goals yet
on note of EQS, does anyone know if in the later versions the trace type has been removed or replaced?
I've been following a tutorial for a few days and there's a few things different in 4.14 from what's shown in the tutorial which was made in 4.7
@floral mango thanks.
Ok i actually might just have to implement IAUA bit differently just keeping the core idea in
does anyone know why i can run EQS from UObject ?
do I need to implement something special on UObject ?
ah ok. I didn't overrided GetWorld()
@old blaze its a bit different, but trace is still there
ah right
this is from the tutorial i've been following but i've not yet been able to find where it is now in the later versions
what are you trying to achieve
I'm trying to set it up so that the AI will find a place out side of the vision of another and then run to that location
ah ok
it's been an interesting learning curve going through EQS, there's lots of documentation out but it's mostly from a year ago
alas, its very true, we get a load of people asking about EQS here
I've been here maybe 3 days and that's so true.
^^
haha, once i've got my AI done I could see about putting a tutorial out to see if it helps other people
would be worth doing man
Certainly. @old blaze , you'll get a lot of rep for that.
currently smashing my head against geodesic navigation in unreal
I'm so new to ai I'm not even sure what geodesic navigation is hah
@soft shuttle, isn't that handled by EQS as well?
the recastnavmesh only recognises gravity facing down, so its useless for altering gravity, or navigation around spheres
trying to do navigation using the mesh geometry
I've done basic AI with a actor component but EQS is a whole new thing
Ohh I see. Sounds like a nice headache.
ah
haha it is! if I can get it working then AI in unreal could theoretically navigate anything
Are you working on this to contribute to the engine or your project?
primarily my project - if I can get it working without engine mods id like to marketplace it, otherwise itll be github
You da man.
^^
might be worth checking out how no mans sky did their AI, I know they get a lot of rap for how the game came out but some of the engineering behind it is interesting
pretty sure they would use a similar thing
theres a load of games that do it, geodesic nav seems like the way to do it but most games that do it well dont share
yeah
yeah =/ copyright fuels development, and hinders learning
latest commit to master added HTN planner
does anyone have some sample usage of GameplayTasks ?
@echo lark Lots of examples of the UAbilityTask are included in the engine, I imagine they are very similar. Need to enable the GameplayAbilities plugin to see them.
Not sure how to use them along with the gameplay tasks component
they're like delays where you specify when the task ends and what occurs while its waiting
What I undestrand is that GameplayTasks are "async" tasks, which can run at the time time (in background they create UObject with delegates, which can run any arbitrary logic or start threads or sth).
What I don't understrand is how they fit into the entire AI spectrum, ;
Yea that sounds about right
Do you mean with behaviour trees?
Btw you can read a bit about the HTN planner on Mieszko's website here http://goto.ai/htn_prototype/
I've been working on Paragon bots for some time now, and up until now, it was mostly about making it work, having bots play the game at all. Now, when the dust has settled and the bots do indeed play the game, it's time to start thinking about bots that can use their abilities inโฆ
Oh nice thank you @rustic nova
Yeah HTNPlanner just landed in Master branch
about time I write IAUA
but I wioll finish it regardless unreal lacks multithreaded AI system (;
will*
What is IAUA?
Ifinite Axis Utility AI
ok
Infinite*
What is that?
essentialy it's Utility AI, you have pool of actions, and every x Time you score all of them
then you select the one with best score
no
ok
it's completly different system
ah
Utility AI does not plan
I am an AI nub
it reactos to current situation and does not fallow any plan
ok
Are you this guy? http://www.mike-purvis.com/?p=342
oh nice
either way Utility AI is much more emergent (only next step are neural networks).
Right now I have base working prototype for decision making, and thinking how to add proper spatial awernes
EQS won't cut it unfortunetly.
yes
ok
probabaly will staty this way, unless I determine that blueprint functions can be safly executed beyond GameThread
Configuration will be
ok
but honestly considerations are very simple, and from one consideration (ie MyHealth), you can get infinite variations, just by chaging how curve look
Alright - kinda makes sense
Hmm watching the video now, seems like it would fit in quite well with the GameplayAbility system
Since they have such a nice gameplay tag system going on
I just really want a Pathfinding solution that works in 3D Space. Not just on the ground
Would be great for flight sims and the like
@echo lark Do you plan on selling this or just open sourcing it?
ok
and if not I probabaly sell it
Did you apply for a dev grant yet?
No
i just started working on it yesterday
;d
I will apply when I get the spatial data thing going on
at least in some prototype way
ok
By the way, you totally can combine Utility AI architecture and HTN planners. In fact most implementations I've seen of HTN planners tend to use a form of Utility Architecture for making the highest abstract-level decision on what to do (Polled infrequently )
In fact usually the best HTN planner solutions involve some combination of the three architectures: BT + Utility + Planning.
See: Transformers Fall of Cybertron, EVOLVE, Shadow of Mordor
both use hybrid systems. Most recent triple A titles I know of that utilize planners as the main source of planning, almost always use utility AI and/or Behvaior Trees to compilment certain parts of the decision making when needed. Rarely is it a one-size fits all architecture
Utility arch is added to make decisions more organic, BT's are added in for performance and when more reactive technical behavior is needed.. And Planners are used to allow the AI to easily solve almost any situation they are thrown in without needing lots of manual AI leg-work and scripting done by devs(BTs). They are just a a little less reactive compared to BTs
I don't want to use any planners
don't see any point in it, when world state change I will gave to recalculate plan anyway
at that point I can just select action individually
A guy from Square-Enix munged the EQS architecture into a general purpose Utility decision architecture in about a week from what I read ๐
the workflow is pretty similar.. bunch of inputs, bunch of evaluation functions, bunch of outputs with some random choice thrown in
@slim quiver DoN navigation works pretty well for 3d pathfinding
i'm using it for my ai while they are using thier rocketboots
Was kind of hoping that was a dead reckoning navigation method.
Actually, it was from a video presentation on aigamedev.com
so I don't know if its freely available
Hi have an issue. I'm using nav link proxy in school project but it doesn't work when i use it with huge gap between the two side of navmesh.
Small size
Hudge size
I placed a cube to estimate the size between the two configuration.
Anybody know how i can fix it ?
AFAIK no fix mate
Guys, any method to see the points generated by the Environment Query of an actor ?
using the gameplay debugger , i can see the navmesh , the path the actor is moving onto, but no EQS points
using the EQS testing pawn doesn't seems to work in simulate mode ( i'm probably doing it wrong )
@livid hawk - EQS TestingPawn should show the points if you have a DISTANCE query running (With Scoring shortest/longest) and in SIMULATE mode as you stated.
If you change the query type (or add to it) whatever querries you have should show up. In order to SEE this - you have to have selected the TestPawn when in simulate mode. . . . in some circumstances you can even have this in the editor without simulating (as long as your not querying for a SPAWNED actor)
thanks for these awesome infos @foggy moth , looking into that atm
From Answerhub:
It is also very useful to enable AI debug from the editor window --> Show --> Developer --> AI Debug. This lets you see the last EQS Query done by each character just clicking on him.
can't seem to find where to cagne the query type
its the EQS EnvironmentQuery that you're setting up...
yes I just added a "pathing grid, generate around querier" , but i'm failing to see how that relates to the type of EQS
that IS the type of EQS
your querying a pathing grid of BEST POINTS (score) around the QUERIER (should be AI BOt)
so whatever your RETURN is - will be scored in the area you setup - have you gone through the quickstart guide?
https://docs.unrealengine.com/latest/INT/Engine/AI/EnvironmentQuerySystem/QuickStart/4/index.html
Create the 7 needed assets for the EQS Quick Start.
yup, adding a "path exist: from querier " now makes the EQS display some points with their labels
(and it doesn't displays them in the simulate mode yet , facepalm )
ok great! - you're all fixed up?
yes I did everything in the tutorial ( re-checking just in case)
yup, guess i'll be able to display these point infos eventually, thanks a lot for the help @foggy moth ๐
Does anyone know how to get the AI to see the VR pawn and get it to to attack the pawn
@sick venture create a custom collision object, in your AI have it do whatever your doing to "see" the pawn - but trace for this object type and you should be good.
second prototype for my Utility AI is working
now I made ir hierarchical
it's somewhat easier to construct and manage
how can i make a ball chase me? using the method "AI MoveTo" doesn't work
Have you got navmesh ?
ye
The target position was reachable in nav mesh ?
yupp
but the ai ball didn't move at all
I have like you some troubles with AI Move to that why i use Move To Location or actor (task).
the AI move to assumes your pawn is a character and tries to use character movement doesn't it?
also, i've succeeded into using the EQS testing pawn in game, however
I've set up some EQS query that is based on the player's position
and when i move the player in simulate mode , the points displayed by the EQS pawn are not updated
they're always the same, even tho they should change based on the player's posittion
I'm getting the player's location via a context blueprint, it picks his position allright
currently in simulate mode, with the EQS testing pawn selected in the outliner
and points are not changing their color while the player's position is moving ( checking i did everything right )
hmm does it automatically re-run the EQS query?
yes the behavior tree runs on it various times
altrough the EQS in the behavior tree seems to always return false, it won't automatically run the next task of a selector
if there's two tasks on the same selector, the second task won't be executed
I'm not running my EQS from BT so can't help on that one
ok, going to try to run it via BP
you mean you don't use behavior trees ? interesting
can you do everything a BT does via Bp ?
planning system I'm working on https://forums.unrealengine.com/showthread.php?113364-Goal-Oriented-Action-Planning-AI-Framework
whoa that's neat
just an exercise in practing my C++, not doing it for any specific game requirement :>
are you planning to release it ?
presenting it at our programmers meeting in a few weeks though so I need this demo working
code's on github
not actually a complicated system. The framework is done....hard bit is building a game demo that shows if off ๐
those AI systems are generally quite easy to get working
what is hard is adding things they can work on ;d
still struggling with the EQS tho
hardest part was making it usable nicely in Blueprint!
maybe selecting the EQS pawn in the outliner isn't the right thing to display the tests
but using * on a pawn to display gameplay debugger info doesn't work
it's
'
then 3 for EQS...but the output isn't as useful as the EQS testing pawn
you just see a list of candidate items and their scores
may i ask what do you think EQ pawn would be more useful ?
EQS pawn spawns all the indicators in the scene so you can visualise the results easily
yes but when i selected the EQS pawn in simulate mode, it wasn't updating based on the scene info
not sure what actions cause the EQS testing pawn to recalculate
there are a bunch of checboxes about tick interval and allow tick before begin play
but they don't force recalculate no, not sure what they're for
maybe running the eqs query from the eqs pawn ? that would be horrible
or maybe attaching a eqs render comp to the AI character, if it works
naturally they will have improved the whole thing just when i will have figured this : ) (kidding)
i don't actually know how to use the EQS testing pawn when the game is running...works in editor when playback is stopped
exactly, it's almost "useless"
doing what you just said works way better
altrough currently, it's only displaying a tiny bunch of points around the enemy, dunno why
it's like it's displaying points that are only on this navmesh section
now i can visualize all the points
am I that silly? i'm unable to tell what change triggered this
magic!
@floral mango hehe, I must be very bad at it to have no clue of what changed the thing : )
just noticed the EQS testing pawn counts as a perception stimulus....was wondering my AI was shooting at nothing
aw, that's good to know
lol thats pretty much >=50% of the content on ai channel. EQS, EQS, EQS
is blackboard instanced per actor ?
afaik blackboard is connected to behavior tree, which I run from AI Controller
@echo lark - i'll presume yes - each Ai bot runs its BTree as its own instance - unless you specifically check the boolean to tell it to act as a whole (every AI is the same that uses this tree)
@foggy moth ok. Thanks. I would assume so, but there is no strict definition as to how blackbord data structure should behave
its 100% instanced unless you tell it NOT to be (checkmark in BB Editor
i dont have UE4 open atm - otherwise i'd show you
i'm trying to find the name of the checkbox
but its in BB Editor i knwo for sure
``If you're using Blackboard with your BT make sure your BB entries don't have the "Synced" option set.
Cheers,
--mieszko``
Thanks.. All I needed to know (;
otherwise I would have to roll my own data object ;s
is there way to force selector to constantly evaluate
without waiting for task to finish ?
I attach a service to the task that checks
if it wants to abort then enable a bool that forces abort of the blackboard check
yes and Blackboards are attached to AI controllers via the " Use Blackboard " node
also, guys, any idea what would cause the EQS to search for points only on a tiny part of the navmesh ?
i've set up an EQS query with a huge pathing grid , but the character only finds point in a tiny area he's in
when viewing the EQS in play mode ( ' + numpad 4 ) , only a few points are displayed, not the whole pathing grid
those points are shown in a green polygon on the ground, it seems to correspond to a navmesh section
any help appreciated
@soft shuttle hmm might be an option
but I think I will need custom Task classes anyway
which do not lock behavior tree for duration of task, bet let the tree be constantly evaluated
@livid hawk the gameplay debugger doesn't show EQS candidates in the level
you're probably just seeing the pathfinding nodes
@floral mango it's interesting because i was able to see all the EQS points with their labelled score at some point, I swear : )
i do see the pathfinding nodes indeed, gray points linked by gray lines etc
having a right mare with the perception component atm
seems to be entirely random whether my AIs are seeing each
identical characters/controllers....but only one see the other
are there synced value in their blackboards ?
maybe they share some common values that are overriding mutually
not using blackboards/BTs
okies
always sees my spectator pawn, even though I've got no stimulus source setup on it
but total lottery whether or not the other AI chars are seen
hmms ok set the default sight collision channel to 'Pawn' instead of visibility and it works ok
ah hahahah I know what it is
I have a debug widget component over their heads that's always facing the camera
that will be screwing it
still pretty shoddy but good enough for presentation I've got soon
picking up the cube ammo boxes is cheaper than getting ammo from the spherical things so you can see them replanning when ammo spawns in etc
can nav mesh not be rotated? If i drop a nav mesh and rotate it the volume rotates but the nav mesh doesnt seem to.
@hard ledge you rebuilt geo and paths?
apparently not cause i dont know what that is i guess, thought it rebuilt on its own
actaully you're right, it really doesnt like diagonal NMB vol
so it wont rotate then
really wont
interesting...
the issue is i have a volume that counts AIs inside
just to say, my problem was related to "scan range multiplier"
so if the volume isnt rotated to the nav mesh they get outside
increasing it fixed the problem yay
then spawning madness may ensue lol
ahh nice
i guess i will always have to orient the spawning volume to the nav mesh
also i don't think nav volumes can rotated but they can be resized
and if you need a navigable area that is not a cube, maybe you can place invisible barriers on the corners
thats what I was about to say, I use navmodifiers and blocking volumes to shape my navigable area
yup @soft shuttle
thanks
Is there a way to make some areas more preferable for ai to move in ? say if an ai character moves at double speed while on a road. Can I implement this using Unreals pathfinding or do I need to create my custom pathfinding solution?
you would need system akin to hotspots
which is not implemented
not sure if default BTs lend itself to such complex behavior
my idea would be to implementing something akin to smart objects, assign Tags/Score to them
and then made AI decide based on score. if the priority is to get fat it would preffer to find path over place where the moving speed will be multiplied
that's just basic idea though
Good idea, thanks I will see how I can implement that.
couldn't you just use nav modifiers?
but how do AI will decide if it want to move along it ?
admit I haven't used them much, but can't you use a nav modifier to make a region less expensive?
which should make the AI prefer roads if using them will be quicker
guys any idea why "Add Movement Input" wouldn't work on a pawn ?
it's said this node must be activated inside the pawn tick function but I don't understand
I can't find any sort of " apply movement input " nodes or anything
{
// Add movement in the actors forward direction. Use the axis scale value as the scale of movement to add
AddMovementInput(GetActorForwardVector(), Value);
} ```
that is available to all pawn subclasses. It accepts a direction vector to indicate where to move and a movement delta as value for how far. The delta will be usually based on an Input Axis
in the case of AI I guess that is simulated input or something I dunno.
you could use any value though
yes indeed, It doesn't works in a behavior tree task tho
could be an AI specific one in the AI pawn I guess
indeed, gonna check that
so I fixed it using the " Add Impulse " method of the character movement component
anyone worked with several navmesh agents inside navmesh system settings? It strange, but looks like, you need to add something around 5 new agents and restart editor before new reycast navmesh will appear for one new agent
I have task which is running in BT
how can I force tree to revaluate ?
reevaluate*
without aborting task
I want task to keep running and in mean start searching for possibly higher priority task
Can anyone point good articles about horde AI pathfinding? Like, what algorithms or techniques are used to make AI bots move in tight space \ crowd without pushing each other apart?
https://youtu.be/bGej8K1r8KI?t=408 something like this
Currently I have a problem that bots, who trying to reach player and cant get to him ( player is already surrounded by other bots) they start to collide with each other, getting stuck or even push someone to the space...
In the bin packing problem, objects of different volumes must be packed into a finite number of bins or containers each of volume V in a way that minimizes the number of bins used. In computational complexity theory, it is a combinatorial NP-hard problem. The decision problem (deciding if objects will fit into a specified number of bins) is NP-complete.
There are many variations of this problem, such as 2D packing, linear packing, packing by weight, packing by cost, and so on. They have many applications, s...
going to have to use packing algorithm to find nearest free space in given volume around player
Sweet. Thanks for sharing that. I was trying to find something along these lines and couldn't figure out what the proper name to search would be.
I had tried to do some fancy stuff with trigonometry and basically dividing up sectors based on the collision volume of an actor. Worked, but there are still issues with it.
My system basically had a concept of a "combat circle". An AI that wants to get in to the combat circle around another actor would register for a spot in the circle with some parameters, like a maximum acceptable distance.
The rest is a matter of the combat circle taking the list of registered actors and creating "orbits" around the target actor and telling each actor where it should try to get to to be in the desired parameters.
I simplified the "size" of an actor to a simple circle and just worry about 2D space. The rest is just some trigonometry - each actor gets a slice/sector of the combat circle. Everyone gets the closest position on the circle to where they're at and then I push their overlaps out.
This isn't path finding at all and it doesn't try to create a path for new registrants. It's just arranging circles in to pie slices/sectors as best it can.
@high lantern thats sound complicated..
But thanks for idea..I suppose I should try it..
Literally in bed right now, getting to sleep, but the trig isn't so bad after all.
I was reading about flocking behaviours, mb someone tryed them for hode AI mechanics..
you can try to read aboutr influence maps
@latent bolt might try the avoidance stuff, not sure if it will help for that scenario but worth a go https://wiki.unrealengine.com/Unreal_Engine_AI_Tutorial_-_2_-_Avoidance
How expensive is dynamic navmesh?
it depends on the quality so i'm not sure. With a medium quality ( refresh rate, mesh complexity etc) it doesnt take to much
I think its something that can scalate a lot
probabaly depends on the scale of your game
if it's something small then there is no reason to use it
if it is big open world, then you must use it, otherwise you will just run out of memory
Not really, dynamic navmesh is created only where you need it. You can see it while debugging
and static navmesh in openworlds can be done by streaming levels but probably there are people who knows more than me about it
since 4.5 more or less the Navmesh load where you're or can be loaded and unloaded or something they spot in the Kite
in Kitem demo Nacmesh invorkers were used to generate navmesh only around interested agents
Is it possible to execute inside of an BTTask other Tasks ... want to execute a Task based on a data-table .. or is it a bad design and every Task should be executed inside the BT?
@floral mango does your goap planner work ? Do you create plan and then fallow it (to the finish), or you reevaluate plant every X time, to acoomodate for current world state ?
invalidate the plan depending on certain things. Perception finding a new target will trigger a replan if the current action is flagged as interruptible
otherwise as long as the preconditions for each step are valid and the actions can be completed, the plan will run through to completion
hm that's good idea
been thinking how to trigger my Utility search do it on timed interval, or trigger by events
actions have a main tick method, and a secondary execution task that runs EQS jobs, calculates cost for dynamic actions etc.
starting to look like a not-braindead AI now hah
have like a primary rifle, and secondary shotgun attack. Cost for those actions is calculated based on distance to target so it'll select the appropriate one
sounds bit like my actions for utility
anyway
i tried to integrate Utility with Behavior Tree
and since UE4 BT is event driven it didn't go well
yeah I guess it's kinda introducting utility into the planner having dynamic costs
Utility to really work must be able to abort any action at any time and push new one
BT is locked until action finshes..
and I wanted to reuse BT editor, now I will have to do much more editor work ;/
ah can see how that would be a problem. At least mine's all my own code and I can make it react to events if I want to ๐
my current idea is to use something like Hierarchical Utility, where utility selector can select other utility selector, down to single actions
yeah, that's why I start writing editor from scratch
navigating trough BT code is beyond my patience, spend entire weekend on it ;d
right now I don't think it can be event driven, since there is no predefined plan
anyone know what htis returns
i can see that i am getting actor using eqs pawn, i want to moveto closest
but it doesn't return a vector and i don't think it returns an int
How would I implement AI in an infinite, procedurally generated world?
it bothers me that EQS doesn't generate grids on multiple Z levels
like if you have a two story building and would like to generate points on all stories it doesn't work
@solid osprey you're requesting a list of Actors, so that's what the results will be.
hello everyone, what are some good resources to make sure one has optimal AI in terms of performance?
hey, i am not using a behaviour tree, i am simply issueing commands trough the AI's blueprint, ik its mediocre, but i dont have time to build a behaviour tree, anyway, how can i tell my character to stop roaming or stop his patrol, if he sees me and starts shooting,
I tought of a way but i can test it cause of infinite loops
Hi, did anyone run into the issue where AIPerception works in the editor, but doesn't work in packaged build?
Solved. Problem was in "Nativize Blueprint Assets" option checked. Bug has already been reported.
I'm sorry.
I posted a wrong channel.
good day , im working with horror game.. anyone can help me with AI? like slenderman horror game
this is the AI channel....ask away
anyone ever heard of Tyrion AI? ๐
I always wondered.. what is that icon on a character's gameplay debug?
I suppose it's kind of the AI state, but how do you modify it?
This is what I am after - a bot that comes up to player (player is stationary), talks some nonsense, walks around player and maybe offers player a choice at the end of its monologue, and then goes away. Should I simply do animation montage for bot character or should I do actual AI ?
whats the best way to make an actor look at another actor in a behavior tree?
@muit, not home but iirc red means not possessed by ai controller, green means it is. At least something like that
@genghis khan#7678 Just add the sound in the tick of your pawn ... breathing is a regular thing, so ๐
whats wrong with this.. trying to roam my ai
it says that the origin is invalid
along with box extent
and I really wouldn't call that function in tick, your AI will get a new random destination every 16 milliseconds or so
depending on your FPS
promote both input pins to variables
should the gameplay debugger display behaviortree data if the AI should be using it?
I see the AI data when I enabled it on the right side but nothing under behaviortree section
@wary ivy yes it does - but you need to navproxy and adjust the z height of the query
Hello
I have a problem with enum, Set Blackboard Value as Enum has no impact, the event exectues but the value doesn't change
@lyric flint names doesn't match
@hardy musk well it's not the case, since it gets "idle"
@hardy musk that is what blackboard requires to know that this is bb key
@hardy musk so you are saying that if names doesn't match it will return null?
just change it man ๐
changed, it doesn't work, blackboards require that "key" thing
i mean, i have "TargetActorKey" which works perfectly fine
nope
:\
You have two was to access blackboard values. One is BlackboardKeySelector, other is using Name
That is the one you used and the name has to match the blackboard key
so use that same node, just change value of that variable to "CreeperState" or hardcode it if you want (with name literal)
this thing works, it's from ai tutorial [from ue yt channel], but still i changed it and it doesn't work
it gets values from enum, but only the first byte
my enum has only two
i can change combat to be the first and then it gets combat
but it's not being changed during runtime
even though setValue node is being fired
because you have the wrong name!not the name of variable but content of the variable ๐
it initializes the blackboard key to default, which is the first value in your enum
then you have some other problem
I just tested in my own project
created variable "asdasdasdasasd" with proper name of the key I wanted to change. Worked perfectly
well, there is everything that has to be with this variable on the screenshots and where else the problem can be
And you assigning other blackboard values successfully?
yes
ok, than delete it and recreate it again (that last node)
sorry for the aggressive tone earlier ๐
it's ok i'm just confused because with 'key' thing everything worked fine earlier (take a look at this please at 17:58 Ian does this https://www.youtube.com/watch?v=eND5XlHvX0o&t=3383s )
Yeah, he names the variable SomethingKey, but that variable stores only "Something" which is the name used in blackboard
also naming it SomthingKey isn't exactly correct. Key would be better if you would use BlackboardSelectorKey, which stores more than just name.
because that node before it succeeded?
ok, how do i make it execute my sequence if decorator says that state is equal to combat?
The CreepState is equal to Combat, but the first node executes?
Try calling RunBehaviorTree as last node in your AIController
yah, but didn't work. What is the logic of putting RunBT in the end of AIController?
I guess if you run BT before you asigned those blackboard values, it can have some effects
try setting that first decoartor to Observer aborts both
If The BT is really runnib before you set the CreepState enum, It will abort that first node when it eventually sets the CreepState to Combat
it's just to test, if the RunBehaviorTree really needs to be last in the controller
Abort both helped, thanks a lot, but what exactly does it mean?
Don't leave it like that
Just place RunBehaviorTree as last node in your controller.
Abort conditions (None, Self, Lower Priority, Both) determines what happens, if the condition is changed (in your case if the value of CreepState changes)
Well... i don't know how to do it exactly, some blackboard values are set after onPossess event, but this enum is set only if branch in onPerceptionUpdated event is false and it's false as long as character is not perceiving any enemies and it wont perceive them right after it spawns so it needs to run BT to move a bit and meet the enemy and only then branch will be false and go through and set bb key to this enemy and update enum...so yeah, BT won't fire (hope u can understand this)
a little closer
right after onPossess
just put it behind everything
it should initialize all those blackboard values and then run it
enum can't be initialized if i put BT in the end
it initializes only if character perceives enemy
what?
to perceive enemy character needs to move
you know, that RunBehaviorTree is called only once and then it just runs?
in other words. Do all your initialization, RunBehaviorTree and everything that is set in the beginning of game on Event BeginPlay
Unless you have some serious reason to not do this
not everything initializes in the beggining
there are no enemies in the beggining
and state is "idle"
not "combat"
well, than that's ok
I don't really know what are you doing, so can't really tell if it's right or wrong
np ๐
Has anyone ever had an issue with the Behavior Tree still firing and executing Task Nodes without the "Root" node connected? The FollowPlayer seems to keep getting called as my AI runs towards me, but if I change my AI's Behavior Tree to an empty tree with nothing in it, he stands still. Any ideas?
Hi! Does anybody know what is C++ equilevant for this? http://imgur.com/a/uwHoR
Anyone have a fix for when the character that an AI is tracking leaves the nav mesh? One of my characters in my game jumps REALLY fucking high and the AI just stands still cause they cant reach them
@fossil spruce you can right click BP node and see if it lets you browse the c++ source for it
I can't remember the menu entry name, should take a look at it in the editor
well, it should be "Go to Code Definition"
it will open the right source file and you can then do search with the same name there using VS
Damn.. Cant get into definitions from there. I can go to AIPerceptionComponent.h. There is this:
Doesnt tell me much.. Just that there is a struct, that is called similary. Hnn
You just want to have an event called when the perception is updated?
You can do AIPerception->OnPerceptionUpdated.AddUnique(this, &AYourClass::YourFunction);
Thanks. My main problem that i cant fathom is, where can i get that Actor and the Stimulus struct if i create a own function from "OnPerceptionUpdaten"
Anyone here use BT for Ai over using just a standard BP ai controller?
Or is a BT the only way to go for ai
Aarfg.. i'm loosing my mind.. been fighting this once single system for over six hours.. I dont get it.. What is the wrong with it..
There isn't any input from the AI. It doesnt sense with sight at all
@floral mango yes, i got it working. Little different though.. I Created the Perception component in blueprint and set the sight/hear in there. Then i created a pointer that points to PerceptionComponent and then used findComponentByClass to get the reference from blueprint.
Hi guys! Do you know if variables in blueprint task are static? Because looks like after finishing the task and rerun, it saves the previous value. Is it true?
Hey guys. I'm trying to adjust my creature navigation so that monsters that are too big for certain doors to not try to navigate through those doors and get stuck there. Any idea what might be the best approach for that? Do i have to use multiple navmeshesvolumes with different setups or can i use Nav modifier Volumes?
I'm following the tutorial in the documentation and I've run into a problem where my AI won't follow the Vr pawn from the template. Anybody have some insight?
Thx!
hey guys, im slowly starting to look into AI now and had a big question to begin with. I have already made a quite complicated characterBP that isnt based directly on things like actor speed when it comes to animation. It has additional variables like speedMode that get changed when wasd input is given. Can I keep that functionality for my AI character?
so that in the AI controller the system uses those input action events?
or would the AI controller itself just set variables that get processed in the characterBP and then cast to animBP?
@lyric flint you could drive AI behaviour with event like -> move right\forward, but AI pathfinding in ue4 is based on navmesh mostly. So, its common to just tell where AI should go, like, set some point on the map, not to simulate WASD controls. After that you can use velocity data to sync you animation and speed data (comparing old and current value of velocity vector you can find out if there were rotation event (AD) or change in direction (WS).
@lyric flint of course, this will work only in case if you using non-root animation. In case of root driven animation... I dont have any exp. ๐
Any know, if multiple BT-"Ways" can end up in one single Task? Or need is the only solution duplication and pasting in every way?^^
I'm having an issue where my "Spawn AI from class" doesn't work when I stream in the level with the actors spawning the AI. It all works fine when I just play the level as "always loaded". When trying to use "Register Perception Stimuli Source" for the Player Pawn after I've loaded the level, the editor crashes. I must be doing something wrong but I can't figure out why. Player Pawn exists the moment Ai is spawned...
@proven ravine You can use subtrees
For example "walk there, stop and attack"
It's just another behaviour tree called from inside this one
Hi everyone, I'm running in to some issues with the pawn sensing on my AI, I'm using a VR character, and the perception will only see the root of the pawn, meaning that, even though I have a collision capsule attached to the camera, he does not see the component, only when he sees the root of my pawn will he trigger the seepawn event
anyone has any pointers on how I could fix this?
https://answers.unrealengine.com/questions/576356/behavior-tree-decorators.html anyone please. I'm just Completely stuck
@muit ty, but I meant the way of connecting the nodes. I want every of my solitted node to end up in the update note ( so the node has 3 inputs) ... but just a visual thing :D I'll just duplicate the update node :)
Hi everyone , how can i set nodes that when AI touch me the screen goes to widget says " GAME OVER"
please send me private message
Hey, how can I make objects collectible so like when a character runs into an object it collects it rather than takes damage from the object?
Check if the player's actor overlaps with the item's actor?
I've not made a point collect system with the new UE lol I think the video I just watched was for an older version
"Point collect system" ?
Yeah, but I'm making the objects at the moment so they can be collected
Why don't you just keep the objects where they are
Without the entire point collecting system
And just have an event trigger when you overlap it
Yeah I can't get the objects to appear in the game itself
The other objects and stuff I've added appear fine but my object I put in to collect doesn't
Either that or we call this an 1D1OT error code ๐๐
Though I'm definitely giving up on the tutorials every time I use them it doesn't work when I go ahead and just do it blind folded it works ๐๐ so I think not using the tutorials is a good start ๐๐
Do you have teamviewer?
Is there a way to get AI's to hear noise from Actors, not from Pawns?
There's both PawnMakeNoise, and MakeNoise, so I assume it's intended that non-pawns can make noise
@narrow onyx should be able to add a stimulus source to any actor
@floral mango so the actor who is calling MakeNoise needs a Stimulous Source instead of a PawnNoiseEmitter component on it?
hmm I don't actually know what pawnnoiseemitter is ๐ I've only ever used the stimulus source
@floral mango I'll pass that on to the guy working on it, thanks. Documentation seems a little spotty around this kinda stuff!
is it normal that navmesh gets generated inside solid meshes?
apparently it is
Depending on if you have selected can ever effect navigation
If it's wrong it is in there if its true and the collision is set to block or sth it is not generated inside
Any idea why navigation stops working all together once i increase the Nav agent size?
or rather
anyidea how i get my creature to use the supported nav agent i created?
I would like to see the code that gets executed from the command showflag.debugai on the console window. Any idea in which source file to look at? (already looked at showflags.cpp/h and editorshowflags.cpp/h)
Hello. wondering would it be hard for a beginner to try and implement something like fish AI, just small groups of fish swimming in a river
not really. Blackboard stuff for basic movement is real easy
easy enough job to knock up a boids implementation
https://youtu.be/cBYCWbmEu84 what do you guys think of this traffic ai?
looks good but some disspeared after doing a u-turn?
They disappear at their destination
Which currently is any one of those random buildings
guys please help me with my AI
What u need @heavy plover
can you help me with my AI animation.. i dont know how to setup the walk animation
Are you familiar with animation blueprints
Anyone looking to earn some money by making some bluepritns
@viral orbit, RTS AI begin to be difficult once you got many units
wow, after 12 hours I didn't know if anyone will write anything
ahah
yea, I know its diffucult, especially for me since I don't know C++
I am really eager to make this game, I already have unit selection, selection box, perfect camera
hmm you don't really need to know c++ to prototype a correct AI
do you have time to discuss?
I just need some pointers, not to build it in the chat ๐
OK, thank you
@viral orbit key thing with RTS ai is optimisation. dont go for fully featured, go for as many on screen as possible. if your game isnt multiplayer it may be worth going from actor class instead of character to avoid CMC overhead.
@soft shuttle go for as many on screen of what?
I intend it to be multiplayer but only later since there is no way to implement Lockstep in blueprints
the ai pawns themselves, with each feature you add to your AI it reduces how many you can have active without hogging the main thread, from ~800 very simple, to ~100 with more advanced animbp + behaviours, to ~15 with everything enabled (tree, perception, physics collision etc)
is perception component heavy, because there is a math workaround
it adds overhead, which is exponential with many many bots
I can just use math to find pawns in 360 radius
i had good results with overlap spheres
so if I make each pawn model 2000-5000 faces(the current UE4 character has around 55.000 faces), will it help
I mean..it will on the GPU side
yea
that will help, keep each character to 1 material will help to reduce draw too
when working with many bots, every optimisation makes a difference
yea, great ๐
1 additional question
RTS AI, as far as I have read , is usually divided into several "bots", each controlling a different part of the AI commander. From resource manager bot, strategy, unit manager bot, pathfinding
they are all independent but the Strategy bot is the main one, giving priority to one or the other depending on a number of variables
i worked on a simpler variant of that, it worked well for building AI
no worries bud ^^
is there any way to create navmesh on area that have no collisions?
(yep, I want to make that AI will fall down in such area)
found out how to do this
just made a invisible floor with object type which doest not block desired pawns
Thanks for sharing ๐
Can someone here you can help me with the behaviour tree?
Hey guys, so I've been wondering, is there a proper way to switch the path-following for the AI system? I could make a custom solution for it, but not really looking forward to that...
^Stole that image off of and unanswered question on answers.unrealengine.com but it's exactly my issue
I don't want something that orients rotation to movement
I want something that orients movement to rotation
So you don't want the boss to head directly for the player?
I want it to only ever move forward
Yeah you're going to have to do something on your own, even if its just calculating your desired path and feeding it to the default pathing in small chunks
So if the player is behind it will walk forward while turning instead of walking backwards while turning
Figured
That's my current plan
Just a tad annoyed mainly by the fact that stuff often stops walking for an instant upon repathing
Which looks bad
You could override consumeinputvector to drive a "target" rotation and interp towards that while applying a forward input manually
InputVector will be world space, so you can easily convert that to a rotator
You can do it in BP
ConsumeInputVector?
Should be able to
I think it might be in MovementComponent
Can you not make a movement component in BP?
My current plan is to just hack around the existing system so it only ever takes tiny rotations
Its either in that or in Pawn
anyone have an idea why my nav invoker component on the character is being ignored, and the mesh is being drawn as normal?
Any tutorial on how to make AI using FSM
what do you mean @cedar crater ?
There's info on how to use Behavior Trees, BP's and code
but I don't believe there's any support for FSM, that's only for animations
@cedar crater should be pretty straightforward, can just implement in C++
blueprint may be more tricky
anyone know if the aicontroller also needs to be a nav invoker, or just the ai character itself?
I got away with just the character @arctic jacinth
i'm working on a game where I need AIs to recognize that they can "climb" vertical objects (rock climbing/bouldering) to reach areas, but calculate path difficulty based on the materials and available NPC stamina... any tips on how to do this in an efficient manner? my guess is that I'll have to design my own pathfinding algorithm
and probably toss navmeshes out the window entirely
^Kinda wondering the same btw
Hello people. I have written the A*pathfinding algorithm in UE4 c++. Currently its a square grid with each tile being a square. Currently all tiles are actors in the scene. Since the game world is gonna be huge, we tested for around 90000 tiles. As expected, the game went to 10FPS. is there a way to optimize it. If u guys don't mind i would like to post this question also in the programming channel. Thanks...
How do I check if my AI has reached my player?
Check if their position is equal to the player's?
Or if their position is within a certain radius of the player
Good idea
Im also having the problem of when one AI sees me
they all move
dont know whats up with that
i'm new to unreal, and have NO idea how AI is done (haven't gotten into it yet) -- but is it possible that you've misrouted a behavior so that it effects all instances of the AI rather than just the instance that observed the player?
hey, does anyone have any experience submitting bug reports to Epic? I think I might have encountered one with Blackboard
There's the answer hub or the feedback button in the editor you can use.
Thanks @trim fern
I'm about (after crunch) to start making a deterministic AI melee system, and was wondering if anyone had any experience with things like N+Grams?
@warped robin Please teach as the different collisions on ue and how could we use it in some games. Like chase and collide to player by enemy.
@deft steppe couldn't use navmesh for your case?
and don't use actors for the tiles, that doesn't seem very efficient
@wary ivy yeah..everyone said use a Navmesh. It is just that i want to experiment with it
@cedar crater What do you mean by different collisions?
@warped robin Collision of AI and the Player.
I mean how do i change the line trace collsion to capsule or box collision actor/component?
It's been a while since I used UE4, but I'm pretty sure you can just check for collisions. or parents a larger collision component to an object and then check that against a certain object. I have a few more months before I ship this game but then I'll get back on the videos!
@warped robin thanks for the reply. I will try what you've said. Hopefully I can do it. Agai thank youo for your tutorials! ๐
@cedar crater In our project I use different collision profiles for different object types. It's a very elegant way of separating the collisions and you can do most of it in the editor
@cedar crater If you're looking only to check collision against a specific component, you can always create an OnBeginOverlapComponent/OnHitComponent delegate for that component
Oh ok @gray hazel . But I am trying to determine my problem . My problem is everytime I hide with an object that has holes or concrete it collides with the AI. I used same parents for AI and the Player also.
@cedar crater Yeah so put them int different collision profile would fix that. Then you can setup what collides with what
How To add a custom physics object channel to Unreal Engine 4.
navmesh is it expensive to add to a terrain ?
Is it normal for the Detour Crowd AI Controller to stutter the character as it navigates around other pawns?
It's as if it can't decide which side to go around so it freaks out as it makes the decision and then eventually chooses resulting in a ~1 second stutter
How would I set up AI behaviour from enum?
I have a list of orders and the behaviour tree should only run when issued a command
@lavish lotus I'm just now learning about it myself these past few days (Behavior Trees, AIPerception and EQS) all seems like it could be very powerful once I can really get a solid understanding of it. Still confused on how to do certain things. Or what the best way to do certain things is.
Once you get it. You get it I feel.
It's super modular and there is so much things you can do
with states and other blackboard values
any training/youtube videos/tutorials you recommend? I've watched some of the official ue4 twitch ones. they're a bit awkward to say the least heh.
@lavish lotus ^^
Just follow the documentation and re read like 6 times
once you understand HOW it works
then you can modify it
Is there any official documentation on AIPerception yet (i.e. at docs.unrealengine.com)
if so i can't find it
Hey guys, I would like to create an AI that can attack me with range. So, I wish that this AI can be in a radius of 500 from me. My problem is when I am inside of his 500 radius the AI won't face the player anymore. It is like if my BT is broken, because I created a task that focus on the player. I also think that the problem could be because of my (AI move To). Here's my code, can someone help me to keep the focus on my player ?
Just to make it clear what I want is that the AI focus on the player even when I am inside of the Radius of 500.
My game is with VR
@hushed sigil Zoombapup has done some great tutorials. https://www.youtube.com/playlist?list=PL3hM7_RDaHMz0umAPdszT172uhZTFuP94
Most are a bit old now, but UE4's AI has hardly changed in the last year or two anyway.
@floral vigil awesome thanks! ๐ I have also been taking a look at the AI in Robo Recall. That's been helping me a bit.
Haven't had a look at that myself yet.
I want to get back to doing some AI stuff, it's way more fun than most other things!
Just starting to prototype a possible marketplace AI pack last couple of days.
@floral vigil awesome keep me posted on it ๐
nice idea kamrann ๐
How can I make the AI move towards the player and update this location each tick? Normal Move to and move directly toward only updates target destination once previous move is finished.
and I mean, using behavior tree ๐
^Curious about this one too
I've run into it too
Even when you tick the "update target" box in the move node
And a similar question: How to design a tree in such a way that pawn exectues the "can see player" function every tick and stops whatever it is doing if he can see the player.
@woven sage I think I figured out at least part of it.
In "Move to" task, you need to set the blackboard key to player actor, not player location. And to do that, in the blackboard for the player key, set it to object, but then, in "key type" set it to an actor class (so anything that has a location will probably work)