#gameplay-ai

1 messages ยท Page 159 of 1

tranquil robin
#

I guess I need to figure out how to do this with a AIMoveTo node rather than the one in BT? Or is there some difference?

#

And like I said before I don't even care about the other actor, I would much rather just give it location to fly to but I also don't know how to achieve that

#

because the vector you can put as target doesn't seem to work as destination

ocean wren
#

I've used the BT one forever and never had an issue with it, so I suggest its a misconfiguration

#

Oh, one thing to remember, if you're using a navmesh, is that your target location needs to be at the same level as the actor, otherwise you'll never achieve the target location (because of the differences in height values)

#

I've seen a few people have issues with achieving movement to locations because they didn't have actors of the same height above the floor

tranquil robin
#

so it is exension from market place to give me 3D navmesh, and it does work to fly from different heights... but all coordinates XYZ fall short

ocean wren
#

so there's always a distance between them and the AI could never reach

#

Can't help you there, you'd have to speak to the author

tranquil robin
#

Thanks anyways for input. Why I'm asking here is because I think it is more likely to be my ignorance of basic of AI, BT and such rather than the extension problem

#

I'll keep looking, I'll ask the author next if this keeps dragging, but already learned new things from you guys

viscid oasis
#

@lyric flint

#

Adjusting the cellsize tends to 'close' up the gap

slate tide
#

Hi, I want to remember the name of a topic I watched a video about long ago, it was about running AI simulation in editor and then if it hit an obstacle he would pause/stop the simulation and then add some code so the ai learns to bypass the obstacles, Im pretty sure it was built in UE but cant, remember the name of topic, thanks.

lyric flint
#

Thanks @viscid oasis I was being passive aggressive since I'd just typed where to find it lol

viscid oasis
#

nah all good.

mossy nexus
#

I do want to make my own 3d navmesh at some point but I have no use for it yet

tranquil robin
mossy nexus
#

if it's between bands, perhaps there isn't a good way to move between them as there is no navmesh

#

and nav modifiers would have to created on the fly

tranquil robin
mossy nexus
#

yeah like I said I'm not familiar with the code

tardy talon
#

I'm giving up, gonna delete all my ai blueprints and start again

#

Its too confusing ๐Ÿ˜…

magic jasper
#

Does anybody know of any advanced examples of INavRelevantInterface

#

I want to inject a bit of custom navigation data into the world, and try to connect them together. Imagine a box with only one opening on the side - I want the AI to automatically pathfind somewhere outside of this box if they find themselves in it.

crimson galleon
cursive stag
#

is it possible to see all generated nav meshes?

celest python
#

Press P in the editor

ocean wren
#

Anyone know if they switched to large coordinates in UE5? or stuck with origin rebasing?

misty wharf
#

I saw people talk about doubles on #cpp so maybe?

#

probably best to ask on one of the ue5 channels

haughty edge
#

Hi guys! If the nav mesh generated slopes that will actually block the AI, is it because something is wrong with my mesh's collision settings?

misty gale
#

sounds like a mismatch between ai setting and navmesh setting

mossy nexus
#

they are switching to doubles for coords

#

for UE5

#

last I heard anyway

ocean wren
#

Thought I'd heard that somewhere

celest python
#

They switched to LWC

#

We also have a new world composition alternative

#

iirc it was called world partitioning or something

#

@ocean wren

mossy nexus
#

it's not an alternative

#

which is a bit ๐Ÿ˜ฌ

celest python
#

Did it replace the world composition? ๐Ÿค”

mossy nexus
#

I've heard this is the case

#

but I'm not sure if it's just hearsay or what the status is

#

I can't be bothered checking out UE5 to find out

celest python
#

Yeah reasonable

fair zealotBOT
#

:no_entry_sign: NeXi108#0584 was banned.

ocean wren
#

Yeah, theres a new grid based world thingy in UE5 (which I can't remember the name of but it has World <something> in it ๐Ÿ™‚

#

Will be interesting how they execute the LWC thing, does that mean all legacy code breaks? or is it automatically typecast or something? Probably some horrible compiler hackiness ๐Ÿ™‚

celest python
#

Well its all i know is its broken as hell

#

My ex colleagues having difficult times with Ue5 because of it

#

I think it will be something like a duct tape all over the system

mossy nexus
#

did you go solo with your prototype?

drowsy star
celest python
# mossy nexus ex colleagues? ๐Ÿค”

I was actually always been solo, I just have a couple non game developer friends helping me for a short period of time. Back one year ago I was working for a small indie studio, I was referring to them

cursive stag
#

@celest python sorry I meant the additional layers. I can see my green default layer but I have a special layer generated just for vehicles.

celest python
#

Do you mean navigation areas by layers?

cursive stag
#

yes

celest python
#

Their color is set from the BP class directly

#

When you press P you should be able to see it too

#

If you cant, restart the editor

cursive stag
#

The Nav Area BP? Its set to red. Restarted a few times. Only seeing green.

celest python
#

Hmm

#

I had this issue a almost one year ago

#

Maybe removing intermediate folder might help, I remember I did something similar but cant remember how it solved

#

We were using Perforce and something went broke then we resetted some settings, removed intermeadiate folder etc. and in the end nav area visibility issue was also fixed

#

You might have to refresh (replace, move, delete and create again) nav mesh bounds again

cursive stag
#

ill give it a go - thank you

haughty edge
#

I played around with Cell Height values and changing that some times remove the unwalkable slope

#

so maybe it's just an accuracy issue!?

crimson galleon
#

your navmesh agent dictates how it generates

#

but if your ai pawn is not setup to adhere to agent settings, it can get stuck

haughty edge
#

can you tell me which of the settings should I check, CharacterMovementComponent's Max step height and walkable floor angle!?

crimson galleon
#

its your pawns CMC, but also in your project, the Navmesh System and Navmesh Agent

haughty edge
#

I see, there's one value that I am not sure what is it about

#

Nav Walking Search Height Scale under Agents

#

They seem to all align :P

haughty edge
#

The max step height is pretty weird, I have the setting at default value (45), and it will create unwalkable connection between places

#

I was wrong to say slope/angle, it the max step height

misty gale
#

Somehow the navmesh height also affects it. Im not really sure why, guess i dont fully grasp it๐Ÿ˜…

broken ember
mossy nexus
#

it'll stop for its duration, which is likely 1 frame

worthy python
#

Hello. Red man needs shoot to light-blue man. Red man has a triggers with points for shooting (p1, p2). How explain to red man that he needs prefer green p2 point instead red p2? I can test it with EQS (line trace to blue-man) but maybe It has another solution.

mossy nexus
#

priority?

worthy python
undone hull
#

hi guys! hope everyone's day is going great ๐Ÿ’™ I have a weird situation and wanted to know your opinion.. I'm trying to make my agents vault over an object in some situations but to not loose my mind adding the same amount of NavLinkProxies, I'm trying to add the NavLinkComponent to the object's BP.. the thing is, this component doesn't notifies the owner or itself whenever the agent reaches the Link.. Also tried using the NavLinkCustomComponent but the agent just stands there trying to navigate the link.. was thinking into overriding the object parent to be a child of NavLinkProxy but seemed like an overkill hahahah.. any thoughts? ๐Ÿ’™

mossy nexus
#

priority would be a function of the AI's current situation

ocean wren
#

EQS is exactly the right thing to use, so yes.. use that

mossy nexus
#

well then

#

if EQS handles it

ocean wren
#

McDrak: You can add a trigger around the navlink component end points to do the notification for you

#

I did that for doors, added a trigger around the navlinkcomponent points and fired on overlap with the trigger

undone hull
ocean wren
#

triggers, basically collision boxes

#

spheres would work fine

#

I just used a box that was on both sides of the door and just checked the direction to the character to decide what to do

undone hull
#

thanks for the info btw ๐Ÿ’™

ocean wren
#

Don't remember to be honest, mine were ladders so not really on/off

#

doors and ladders

undone hull
#

oki doki, will try that out and update if anything comes up.. thanks!!

tranquil robin
#

Anyone know if there's something else that affects the pawn deceleration when using acceleration for paths? While I'm using custom AI solution it seems to work when I'm not using acceleration for paths, but when I use them, the deceleration exponentially slows down, as if Speed is continuosly multiplied by 0.9 or something, meaning it gets slower and slower but stopping takes forever... when tracking the pawn position I can see numbers such as 2500.000 being repeated on every tick meaning that it is slowing it down the pawn in fractions smaller than 0.0001 in the end. Whatever I enter at the deceleration value doesn't really seem to affect it that much. Is there some other setting that affect this, or perhaps some blueprint node that could be used to affect the precision, as if any thing for example smaller than 1, would be 0?

misty gale
#

Custom ai solution -> custom ai movement?

#

Sounds like interpTo functionality ๐Ÿ˜…

tranquil robin
#

What I mean is I'm using this custom 3d Navmesh... and if I add that acceleration for paths then the result is this super long easing that doesn't seem to care much about the actual speed/acceleration/deceleration values

misty gale
#

sounds like you need to dive into the code to see whats going on

tardy talon
#

vis ai seemed interesting but theres more resources for the built in system

#

but I will definitely check it out after this project

mossy nexus
tranquil robin
#

Yeah, I have but there are so many general level things that I also don't understand. I can get over the problem by adding my own precision check to the tick that just stops the AI... I don't know if these "easing" issues are from plugin or would regular 2D AI have the same issues, since I've never worked with that. That's why I asked here.. just incase there is some universal solution and the problem isn't in the plugin (though it probably is)

ocean wren
#

You'd have to look in the code

tranquil robin
#

I tried to scan through it but I don't really understand C++ and I think that functionality is actually from base UE and the problem probably has to be between how them two communicate assuming this pawn speed problem doesn't exist in built in functions

#

I have temporary fix now and just have to wait and see if the developer can solve it

#

This might be universal though, is there a way to access navigation path on blueprints if that path exist via BT's AIMoveTo?

mossy nexus
tranquil robin
#

yeah that might be wise thing to do to eliminate variables from this problem's reason

night lichen
#

I have been using the air detour controller for an RTS project I am working on and I am finding that the agents don't exactly avoid each other is there another step I could take ?

mossy nexus
#

RVO?

fickle schooner
#

uh so i have a landscape here and i built a navmesh volume which covers it. The navmesh built successfully but no green grids are showing when pressing p. On other surfaces the green grids show.

#

i built lighting'

#

nothing changed

#

just normal landscape

night lichen
#

@mossy nexus thanks I'll check it out

deft matrix
#

so uh

#

anyone use the Set Finish on Message node in BTT

#

or the Send AIMessage node

#

I feel like in theory this should work but for some reason the task never completes

#

ok

#

im really dumb

#

the message was being sent before the task was set to set finish...

fickle schooner
#

should navmesh go in persistent or streamed levels

fickle schooner
#

i have a working navmesh on a landscape

#

however

#

on a non landscape

#

this works

#

move to

#

but

#

on landscape the AI doesnt move

#

help

fickle schooner
#

bro?

plush pasture
#

how do i get path from point A?

#

or the closest location to point A on the navmesh?

crimson galleon
#

Ai like to stay on navmesh and are clueless once off of it

#

its going to fail the request because you're telling it to move "off" the grid

#

EQS can generate a series of valid locations to pick from, but specifying a location needs some form of leeway

#

alternatively, you can adjust the agent radius to reduce the gaps between navmesh islands, but its more of a sweeping effect

ocean wren
#

There's a function to get closest point on the navmesh to a location off of it

plush pasture
#

what does this node do then?

#

is there a way to check if point is on navmesh?

plush pasture
#

also

#

what the hell is cell size and tile size UU ?

#

i cant understand that, i put cellsize and tile size to the max

pine steeple
#

:/

plush pasture
#

but it still takes long to generate navmesh and its detailed

pine steeple
#

Cellsize is the size of individual tiles

#

oops, let me rephrase that

plush pasture
#

is it world space size or local to the tile?

pine steeple
#

TileSize is the size of a single tile, a single tile is made of multiple cells.

crimson galleon
pine steeple
#

a decent size map will take around 30-60 seconds on a really good pc

plush pasture
#

are cell size and tile size tied to each other in any way?

crimson galleon
#

yes, please try seeing what they do by adjusting and comparing

plush pasture
#

i am seeing and im not understanding

#

why do i put both to the max and its still super detailed

pine steeple
#

there is options to show cells in the editor

plush pasture
#

oh ok

pine steeple
#

there is a cap to stop bad settings also

#

it wont allow you put data which is plain wrong

#
TilePoolSize=1024
TileSizeUU=1600.000000
CellSize=20.000000
CellHeight=18.000000``` these are some good values that should get the ball rolling
plush pasture
#

thank you

#

is cellheight the height of the voxel or is it display only property?

pine steeple
#

its the height of the cell

#

a tile is made up of multiple cells, upto tile size

plush pasture
#

i still dont understand the relation between tile and cell, is cell size relative to the tile size? where can i find parameter to visualize cells?

pine steeple
#

cell size is the size of each cell inside the tile..

#

not sure what you don't understand?

#

A Tile is made of multiple cells of Cell Size up to the size of the Tile.

plush pasture
#

i think i understood

#

but what is the point of having tiles and not just cells?

#

thank you for explanation

pine steeple
#

Cells are like voxels inside the tile

#

the more "Voxels" you have the more precise the navmesh

plush pasture
#

cant i just have one gigantic tile?

pine steeple
#

So the smaller the cell, the more it will take to generate

#

no cause that will lead to other artifacts

#

(like edges of the map, etc)

crimson galleon
#

thats makes it fast to access and generate

plush pasture
#

i see

crimson galleon
#

if your generating and never regenerating, go with smaller cells than one large one

#

you'll get more resolution per cell, though in come cases you may not want that

#

and there should be a setting to reduce the accuracy

pine steeple
#

our map is fully dynamic so we have to compromise with the tile size

plush pasture
#

im actually doing big map and vehicles so i need less dense navmesh

pine steeple
#

but finding that value depends on the game

#

you may not want to use navmesh if you using vehicles

crimson galleon
#

same, im also doing dynamic, but am using relatively small sizes for both

pine steeple
#

we did astar calculation

plush pasture
#

should i use dynamic?

crimson galleon
#

only if it changes

plush pasture
#

no

pine steeple
#

dynamic is only good if the map changes

plush pasture
#

i see

crimson galleon
#

then ya dont ๐Ÿ˜›

pine steeple
#

or doors can open etc (if you don't use navlinks..)

plush pasture
pine steeple
#

for our vehicles, yes

crimson galleon
#

and as Kaos mentioned, it depends on your level design, may not matter if most of your map is gridlike vs a lumpy landscape

plush pasture
#

what is the way to go for vehicle navigation?

pine steeple
#

that depends what you need..

#

if you want traffic simulation, etc then that is complex

#

our vehicles are simple move from a to b

crimson galleon
#

you can do old school waypoints, or adaptive spline networks, or use navmesh, or have vehicles with awareness

#

there are others im sure

pine steeple
#

Splines is the common way

crimson galleon
#

depends as stated

pine steeple
#

was there not a vehicle pathing plugin on the MP?

crimson galleon
#

probably

plush pasture
#

not interested in plugins

pine steeple
#

most of what you use in the engine is plugins :p

plush pasture
#

hah yeah

#

i mean i want to try find solution on my own

#

i kinda had it working

pine steeple
#

i was recently looking at this

plush pasture
#

man goal is for vehicles to find target around obstacles

#

thanks

#

๐Ÿ˜„

#

easy solution

pine steeple
#

ye thats tuppence if its good

celest python
#

Was pretty nice, judging by description and example video

crimson galleon
plush pasture
#

if its not 15$ its out of my broke-ass budget

crimson galleon
#

there are some out there for that much

celest python
#

AI plugins is damn expensive in UE

crimson galleon
#

sometimes its worth spending 50 on seomthing that may take you 4 months

plush pasture
#

that is right

celest python
#

Otherwise you get burnout ๐Ÿคฏ

#

Which is a thing programmer should avoid at all costs ๐Ÿ˜ฌ

plush pasture
#

there is a learning variable too

crimson galleon
#

yeah, might not be able to grasp AI or something

plush pasture
#

im pretty happy with where im at i just need a good navmesh

#

i started generating with suggested settings, will see how it goes

#

takes long tho

crimson galleon
#

navmesh and navmesh agent, those are two places to be playing in

plush pasture
#

what do i need from navmesh agent except for radius?

crimson galleon
#

do smaller areas to test if its taking too long

#

i guess nothing else if you dont need it, just mentioning it in case, some ppl forget about that part

plush pasture
#

right, thanks

#

its weird how agent radius doesnt work in navmesh settings

crimson galleon
#

?

plush pasture
#

in generation settings

#

you can change it but it doesnt work

#

you need to add an agent and set it there

crimson galleon
#

not sure, but there are agent specific settings in Navmesh System

plush pasture
#

does holes like this impact navigation?

crimson galleon
#

I dont think so. Navmesh queries are projected in z.

tardy talon
#

I want to get eached sensed stimuli and perform an action depending on whether its hearing or seeing. The following setup will return True False for some reason it can perceive the player, but it wont succesfully sense it. Any reason why? (Testing the hearing, seeing works fine)

#

...

#

I just saw it

#

ok weird when I collapse the nested loop to a function it doesnt work correctly, but when the nodes are expanded it does

ocean wren
#

Unreal Engine baby! ๐Ÿ™‚

misty wharf
#

@tardy talon it kinda depends on how the loop is set up. If it doesn't work as a function, my guess is that the variables are behaving differently perhaps as a result of being made function-local

keen crow
#

Is BT decorator conditional loop supposed to be working? this return true confuses me๐Ÿค”

mossy nexus
rugged tree
#

Hello, I ve some nav mesh volumes at a level. But they dont work. Everything is looking ok when i press p but when i run the game i see only there is only one active nav mesh

fickle schooner
ocean wren
#

Hmm, so facial mocap is kind of fun

#

I might need to explore further

pseudo brook
#

I'm trying to get a very simple EQS query for finding spawn points, but the result always returns false & locations are origin.

#

the EQS tester looks good

#

the spawn point is the same EQS tester

#

The docs seem to suggest that Querier must be a pawn that is currently possessed by an AI controller. Is this the issue?

fickle schooner
#

uh
how do u do delete this
everytime i delete it
it comes back
i want to keep navmesh
but not recast navmesh default

crimson galleon
#

you need it to keep navigation

fickle schooner
#

yes

#

but i dont want them in streamed levels

#

i only want them in the persistent level

#

but i cant delete them from streamed level

#

help

#

any1 know what this

#

menas

#

"does not have any geometry"

midnight scroll
#

@pseudo brookYour issue is that the Query likely wasn't done if I'm not mistaken.

#

You're looking to do something like this instead.

pseudo brook
#

ahh the query is async and need to bind an event?

#

ty @midnight scroll

sour fable
#

Hey guys, I'm making a zombie game and have human (soon) and zombie AI, right now they will both only attack the player but I want a test to determine for each ai if the other ai type or player is closer to it, as such; it will follow and attack that pawn instead. Any ideas?

haughty edge
#

Hi guys, do you have to enable client side navigation in order to use navmesh walking for multiplayer? It seems like the client side is having a lot of trouble predicting the movement and is shaking a lot while moving :P

cunning lantern
#

Hey guys, how can I enable EQS?

#

I don't see the option in the Editor Preferences

crimson galleon
cunning lantern
crimson galleon
#

sure, bt or bp. BT its RunEQSQuery. You need to make an EQS asset.

cunning lantern
#

Alright, thanks

lyric flint
#

When I use the NavModifier in UE5 seemingly every cell that touches that actor gets its nav data reset to default values rather than what I've entered in the project and recast settings. This is debilitating since it removes navigation from certain areas of my map

simple crest
#

is EQS not an experimental feature which you need to explicitly enable anymore? (Conrad/OverG0d)

crimson galleon
#

you have me second-guessing myself about it now...

midnight scroll
#

It's no longer that in 4.27 at least. I never enabled it and I'm using it.

crimson galleon
#

huh... i dont think i did in 4.26

#

or else i did looooong ago

#

sorry if that caused confusion

simple crest
#

no that's cool i'm surprised and never realized they finally FINALLY changed that ๐Ÿ˜‚

crimson galleon
#

right? eventually things come out of experimental - sounds sarcastic, but really is it?

mossy nexus
#

given the state of the AI module I'd say everything is experimental, labels or not ๐Ÿ˜…

celest python
#

Let the AI rotate to target by and apply spread to its weapon

haughty edge
#

Hi guys! I don't know if I am imaging this but when the server is using navmesh walking, The client-side AI will constantly adjust its Location Z, so it looks like it's going up and down real fast :P

naive flower
#

Is their a way to use event dispatchers in BTs? I have a event dispatcher that throws out a int when the time of day changes. Now i need to get that information in my BT

magic jasper
#

Not really, you would need to query the value when the BT is running

naive flower
#

Okey, so should i run the dispatcher in the AIC and then cast to get the value in BT?

misty wharf
#

It depends on how you want to use it

#

Does a specific BT task need that information? Or is it used to update your BB and the BT reacts to it? And so forth

magic jasper
#

^

naive flower
#

I many need to get it in here, im checking if its after the NPC start working hours and before the NPC stop working hours, i need to check this to the time of day

#

So i need to update a BB value

#

This is the original event graph

#

Converting it to BT now

misty wharf
#

Updating the blackboard would probably be easiest done in the AI controller

#

so you'd bind to the event there and update the BB, and the BT can just react to the BB changes without having to know where the data comes from

naive flower
#

Something like this? This is in the AIC

misty wharf
#

Yep

#

You can simplify it a bit though - instead of using a branch, set the value from the AND directly as the value for your bool

#

this way you don't need the branch and you can just use a single set value as bool node as well

celest python
#

This looks so confusing ๐Ÿ˜– (found this message while searching for examples in discord)

pine steeple
#

:/

#

basically you just want to counter rotate the root bone till the angle hits X degrees

#

then interpolate that yaw offset back to 0

#

so your capsule keeps rotating, but the mesh does not (only your aim offset rotates the mesh)

celest python
#

Hmm, when you explained like this it looks easier now

pine steeple
#

end up with something like this

celest python
#

Are legs playing montages?

pine steeple
#

no

celest python
#

Normal animation then?

pine steeple
#

correct

celest python
#

Alright, thanks much Kaos ๐Ÿ™‚

pine steeple
#

this is the node, as you see its - on the ActorYawOffset

celest python
#

So to put simply, when actor starts to rotate you detect it and start incrementing the offset, then counter rotating to negative offset value and if it hits X value you interp it back to zero

pine steeple
#

yep in a nutshell

haughty edge
#

Hi UKaosSpectrum! Sorry to bother you but can you tell you how did you set up navmesh walking!?

pine steeple
#

just enabled it on the CMC

#

then i have a check in the CMC to make sure if it gets flipped to Walking (which can happen), it reverts back to NavWalking

haughty edge
#

I see

#

I'm also having some issue when playing as a client, have you noticed anything odd when the server is navmesh walking? I disabled Client Side Navigation because it will cause my AI to float :P

#

My Client-side AI will shake a lot during movement, especially when jumping . Maybe it's a down side of navmesh walking!?

pine steeple
#

i dont have shaking

#

nor do i have AI floating in the air..

misty gale
#

shaking, could it be from server correction?

pine steeple
#

or crowd avoidance, without a video hard to know

haughty edge
#

AI will only float when client side navigation is enabled, both Server and client will be in navmesh walking mode

#

It's pretty weird, seems like Client-side AI cannot find a place to land so it's constantly floating, the FindFloor function can't find a floor.

#

I'll try to capture some on a video :)

misty gale
#

How does it walk on the server?

haughty edge
#

I have the AI set to navmesh walking on the server, but the client will still use standard move because there is no navmesh

misty gale
#

I ment is it shaking on the server aswell? ๐Ÿ˜›

haughty edge
#

It's really awkward they way it adjust itself when jumping

#

oh no no it's completely find on server

#

standard navmesh walking tho, weirdly smooth :D

#

it's very prominent when walking up stairs but that might be the capsule component adjusting itself?!

misty gale
#

Sounds like server correction, but video might shed more light on it. Glad i'm not touching multiplayer for a while ๐Ÿ˜›

haughty edge
#

I am uploading right now if you don't mind please take a look :P

misty gale
#

That does to me look like server correction

haughty edge
#

Hmm, maybe it's the capsule on the client that made it go off trace so the server had to correct it

dawn loom
#

Exactly my thoughts

#

I've been trying to test visAI and see what all this "time saving battle ready systems" are so I opened their FPS template

#

I've never seen worse FPS AI in my life not even placeholder

celest python
#

You can debug server corrections

#

There was a console variable to visualise them

pine steeple
#

@haughty edge its only happening on stairs right?

#

cause we had the same issue with heights

#

this is normally caused by turning on Project to navmesh

celest python
#

Server corrections happen in a distance threshold, with that lower difference in server - client position I dont think its related with networking

pine steeple
#

or some kind of collision

#

(we have seen them jumping if they are inside a blocker for example)

trim fiber
dawn loom
pine steeple
#

is that the full BP one?

dawn loom
#

but it's sooooooo bloated and it's not something you can literally slap on anything as they say it's meant to

dawn loom
pine steeple
#

if so, wonder what the performance costs are..

haughty edge
#

But I swear to God it's happening on flat ground

dawn loom
#

that's what I was wondering too, but I'm not going to have a lot of AI so I was like if it's really that easy to just jump in and get going I'll use it

#

except it's not

pine steeple
#

we rock around 100-150 ai (max cap of 200)

haughty edge
pine steeple
#

@haughty edge you have project to navmesh on?

haughty edge
#

Yes

dawn loom
#

in fact their "super duper useful" starter content is basically useless

pine steeple
#

try turning that off

#

and see if it fixes it

trim fiber
#

Vis ai using utility like method. We are currently adapting our design to utility style.

dawn loom
#

it has an AI that shoots when it doesn't have LOS, runs away weirdly when it has targets and takes super weird decisions

#

and it would take me longer to learn this bloat to fix this

#

than to make my own from scratch

#

so I'm reverting my workspace to before installing this plugin

#

๐Ÿ˜

celest python
#

You got the Division 2 AI and you're complaining /s

pine steeple
#

or try my settings

haughty edge
#

Roger Roger

pine steeple
#

Division 2 AI was weird, sometimes it was like, damn that was smart, but that was once in a blue moon

#

most gun fights felt easy against the AI, not sure i struggled at all

celest python
#

They just run the whole combat system based on a ticket (token) system

pine steeple
#

yeah but we do that also in RS2

#

maybe not the entire system

#

but least for attacking, etc

celest python
#

I use it too for spawning ranged enemies and making them select targets, but with a TPS it gets too repetitive and schematic over time

#

After some time you already know which target you should shoot first before triggering a combat

hearty niche
#

is there any way of making an AI react differently to different sounds? Like gunfire vs a teammate calling out?

pine steeple
#

send a noise event with a specific noise tag?

hearty niche
#

oh wait thats what the tag is for?

hearty niche
#

also any way of sending a tag with the other stimulus?

pine steeple
#

no

hearty niche
#

then why does it have a tag?

pine steeple
#

Damage and Noise

hearty niche
#

ok

pine steeple
#

so you can do custom logic

#

based on what type of noise

#

(Gunshot, Explosion, etc)

hearty niche
#

but the stimulus class itself seems to have a tag paramater

hearty niche
pine steeple
#

correct but the report functions do not

hearty niche
#

so basically any stimulus apart from sound and damage will make no use of the tag?

pine steeple
#

correct

hearty niche
#

oof

pine steeple
#

Sight, etc dont use thag

#

but why would it?

#

Sight is sight..

hearty niche
#

I was about to say friendlies but there is different logic for that

pine steeple
#

Noise and Damage make sense, cause you may want to know what caused the damage (ie type, etc), or what the sound actually was (Explosion/Gun shot/Water)

#

cause we use gameplay tags extensively

misty wharf
#

That's a good idea. Does it convert it into an FName since the event normally doesn't carry a gameplay tag?

hearty niche
#

oh yeah if I rememeber correctly Stranger was doing it.

pine steeple
#

custom sense

#

we do additional stuff

hearty niche
#

ahh so no need for engine source

#

I mean modding it of course

pine steeple
#

you could make the function and convert it, etc

#

Tag -> Fname and use the standard sense

hearty niche
#

what are the benifits of using gameplay tags?

pine steeple
#

less mistakes?

#

You mistype a FName, and boom, logic broken

haughty edge
pine steeple
#

we use GameplayTags everywhere, from Game Logic, to UI, to audio, etc

#

Missions, Achievements, Events, etc all GameplayTags

hearty niche
#

I see. Epic should make this change then I guess. Remember seeing many absurd things stick around before (widget interaction component had pointer index as a float data tye in 4.25 for example)

pine steeple
#

they were going to make GameplayTags default at some point

haughty edge
#

I'll try to find the issue tomorrow, kinda late here, and I'll let you know if I figured something out!!

pine steeple
#

ie actors have a GameplayTag container on them, etc

haughty edge
#

That would be awesome

pine steeple
#

but yeah, quicker they get off of the FName stuff for tagging, etc, the better ๐Ÿ˜›

#

get more people using GT's

hearty niche
#

Out of context but am I weird to be imagining whatever you say in a scooby doo voice ?๐Ÿ˜†

pine steeple
#

heh, probably not lol

hearty niche
#

always had that thought for a year since I joined slackers ๐Ÿคฃ

celest python
#

Kaos had a black background and an axe profile picture once, and a text ๐Ÿค”

mossy nexus
#

in before mod times ๐Ÿ˜”

keen crow
#

If I was to make a custom EQS generator that queries all actors of some base class "X" and a custom RunEQSQuery BT task descendant, how could I parametrize the query from BB key with a specific class which is an X descendant?

digital steeple
#

Is there a way to edit navigation paths after the move request went through? Or would I have to do it before that?

hearty niche
digital steeple
#

pretty much. Then I will do it like that. Would have done it that way anyway, just wanted to test it before, but then I'll do it right away.

#

Thanks

hearty niche
digital steeple
#

I mean in the end I want to have it like that I was just prototyping and got the FNavPathSharedPtr or however it's called and thought for prototyping I could maybe just alter the Path points in there to see if my other stuff is working. But it didn't seem to work, probably because the points itself do not get used anymore and are only as reference to use outside.

hearty niche
#

Again, better if someone more qualified answers

tardy talon
#

IM SO HAPPY, made so much progress on my AI today. Got proper basic pathfinding working for now (EQS is next!) and they go into all the states

#

Only thing to fix now is that its set up now so that if the enemy is attacking and hears something it will investigate the sound before continueing its attack

cunning lantern
#

Hey guys, apparently EQS is in a experimental state and the unreal engine 4 website says it shouldn't be used on a shipped product, is this true?

simple crest
#

as long as you're using any recent engine version it's totally fine, go ahead and use it

cosmic heart
#

Is code for AI usually becoming convoluted nearing the end? I remade my AI like 3-4 times now and even tho I always think hard to make the code as easy as possible, there is just too many little issues that I can't solve without making a specific code just for this one exception so there is a lot of "duct tape" code all over.

#

I wonder if I'm still doing things in a wrong way and AI can be relatively easy or if AI is one of those things that no matter what if it's suppossed to be good it's gonna be a pain to work with.

celest python
#

Is there any possibility you are trying to handle everything in the BT?

cosmic heart
#

Not really, BT and BP got quite big

#

I would say I handle more in BP

celest python
#

They have gigantic amount of nodes and a huge (really huge) codebase in Division 2, so having sphagetti codes around or having complex trees are completely fine

#

But you shouldnt abuse the BT by overdoing some stuff on BP or as you said 'duct tapes'

#

AI is mostly complex when you dive into low level stuff

celest python
cosmic heart
#

@celest python I will, haven't seen this before, thank you

haughty edge
#

@pine steeple When using Navmesh Walking on Server, The Z location is a bit different compared to standard walking, so the server will constantly correct the client's Z location and create the constantly bouncing effect.

pine steeple
#

i don't have that issue though

#

server tells the client the correct Z

#

clients should not be doing anything (like tracing the floor, etc)

haughty edge
#

The client will always have a different Z because it's still trying to use standard walking :P

#

I hard lock the z location in the function SmoothCorrection to remove the bouncing, it's not very ideal :P

pine steeple
#

client does not care for the movement modes tho

#

(simulated proxies)

#

unless your talking about autonmous proxy

#

but simulated proxies (the AI on other clients)

#

runs through SimulatedTick and then SimulateMovement

haughty edge
#

yeah

#

doesn't simulated proxy still try to move on it's own!?

pine steeple
#

no

#

it always moves the capsule

#

to where the server says, but then lerps the mesh

#

you dont have the AI skeletal mesh set as replicated?

haughty edge
#

I don't think so, let me check

pine steeple
#

ive seen that causing this issue

haughty edge
#

I don't have it set as replicated, should I set it to true?

pine steeple
#

no it should be false

haughty edge
#

oh

#

ok

pine steeple
#

these are the settings i have

haughty edge
#

let me try always check floors!

#

no luck :P

#

Is there a difference in Listen server vs Dedicated?

pine steeple
#

our game is listen server

#

but there will be no difference on the simulated side

haughty edge
#

Are you on 4.26? but I think the odds of it begin a version issue is quite small.

#

These 2 are the comparison between Server Navmesh walking vs Server standard walking

hoary forum
#

If anyone has some knowledge on navmesh generation pls dm me! I really need some help with dynamic generation. Thanks so much! ๐Ÿ™‚

misty wharf
#

You're going to have to be much more specific about what the problem is if you want help with it. Nobody is going to be able to guess how to help you

ocean wren
#

They interviewed a bunch of AI designer/programmers from the games industry and identified key problems

#

I'm of course working on fixing some of the issues using machine learning ๐Ÿ™‚ because why not!

celest python
#

I heard multiple times from you about Microsoft's papers

misty wharf
#

they've been doing that for a while now I think

#

Microsoft Research is basically doing nothing but lol

ocean wren
#

Well, they've got some people doing games tech research

#

As do all the tech sector companies

#

games are obviously important entertainment tech for microsoft, google etc.

#

Most large organizations have something to do with games tech. I've been to Disney research in Zurich a few years back. Lots of their stuff was games-adjacent

#

And obviously metaverse and the like.. have sparked a lot of work

celest python
#

Yeah many computer science related things coming out of video game industry I guess

#

From Carmack to Tim Sweeney, 3d graphics tech etc

#

But seems like Microsoft paying a special attention to AI

midnight scroll
#

Not surprised though. AI is useful in a lot of scenarios for many non gaming things as well. But AI also has been a little stagnant for a while in comparison to many other tech related fields.

ocean wren
#

Well, MS research have been going for a long time at this. MSR did stuff early XBox etc.

#

I don't know why you think AI has been stagnant ๐Ÿ™‚ I guess if you discount ML and whatnot then maybe? but there's loads of work around planners and whatnot too

#

But yeah, ML has taken a lot of the heat away from pure game AI I suppose

#

Look at recent GDC's and there's a ton of ML based talks.. clearly it is in our domain area ๐Ÿ™‚

celest python
#

Yeah actually, now I realized when you say.. Old game AI papers > new ones

#

There a lot of useful ones before ~2015

#

After that time it's way lesser

ocean wren
#

I guess it depends what you're looking for

celest python
#

Innovation

ocean wren
#

Because I have waaaaay more papers on ML than anyone can reasonably read

#

innovation in what way?

celest python
#

Like how Valve and other older studios invented new things, or somehow created a new one on top of other systems

ocean wren
#

I mean, there's been a few years of things being a bit messy ๐Ÿ™‚

#

Valve invented what? you mean like GDC talks and such?

celest python
#

Haha no ๐Ÿ˜… They just researched nice things, shared them publicly, made the industry move a little bit forward. All the things they've done in the industry was helpful for creating a new systems on top of the current systems. Not just Valve though, I just had a feeling like game AI researchers and the industry was more serious before

ocean wren
#

Give me an example?

celest python
#

I was a kid back then, didn't see with my eyes like you ๐Ÿ˜„ But development of previous game AI methods, talks.. just feels more professional and innovative

celest python
ocean wren
#

I mean, I take the point that game AI specifically hasn't particularly advanced.. evidence all the people struggling in this channel ๐Ÿ™‚

#

But that doesn't mean that AI as a subject hasn't advanced (it has, but in strange directions)

celest python
#

Just the 'game AI', not the AI itself

#

Behavior Trees, Utility systems

ocean wren
#

So a lot of the latest academic research in games is about a thing called MAP-Elites, which is a form of evolutionary algorithm being used in games PCG for lots of things

#

the reason for that being interesting, is because Ken Stanley and Joel Lehman showed that objective functions (used commonly in ML) are actually bad for really large leaps in advancement, so they proposed a more quality/diversity approach

#

diversity being one way of trying to find new ways of solving a problem

#

So people are using MAP-Elites for things like PCG level design applications

celest python
#

For example, MAP-Elites could search in the space of all possible robot designs (a very high dimensional space) to find the fastest robot (a performance criterion) for each combination of height and weight.
Interesting

ocean wren
#

Now admittedly, not really valve etc.. but thats mainly because these methods aren't complete yet

#

the games AI scene is pretty conservative

#

and lets face it, unless players vote with their wallets, the powers that be who fund stuff couldn't give a crap about game AI, hence the lack of dev in UE4/5

#

Game AI could be easily enhanced commercially by just fixing usability of current tools ๐Ÿ™‚

#

But yeah, I think you'll find stuff slowly creeping in from the ML/RL sphere

#

like that Ark Raiders robot ML movement balance controller thingy

celest python
#

I value your thoughts about AI

#

I guess I should get started with ML soon too

celest python
ocean wren
#

Nexon conference.. let me find it

#

Thought it'd be on Embark Studios youtube, but apparently not: https://www.youtube.com/watch?v=yED9t2tImog

Embark Studios procedural artist Anastasia Opara shares a sneak-peek into Embark's experimental project Kittiwake, where our team set out to explore a feeling of co-creation with a procedural system in a dialogue-like interaction.

Interested in how the visualizations were made? check out Anastasia's Houdini files on GitHub: https://github.com/a...

โ–ถ Play video
#

Oh it is!

#
NDC

โ— ์„ค๋ฌธ์กฐ์‚ฌ:ย https://forms.gle/kCBbY3VeXY664E7JA

โ†“ ์•„๋ž˜๋ฅผ ํŽผ์ณ,ย ์„ธ์…˜ ์ƒ์„ธ์ •๋ณด๋ฅผ ํ™•์ธํ•˜์„ธ์š”!

โ— ๋ฐœํ‘œ๋ถ„์•ผ:ย ๊ฒŒ์ž„๊ธฐํš
โ— ๋ฐœํ‘œ์ž:ย ์— ๋ฐ”ํฌ์ŠคํŠœ๋””์˜ค Tom Solberg
โ— ๊ถŒ์žฅ ๋Œ€์ƒ:ย Game Designers, Animators, Technical Animators, Animation Programmers
โ— ํ‚ค์›Œ๋“œ: #Physics #Emergent Gameplay #Robotics #Reinforcement Learning #Animation

๋ณธ NDC ๋ฐœํ‘œ ๋™์˜์ƒ(์ดํ•˜ โ€œ์ €์ž‘๋ฌผโ€์ด๋ผ ํ•ฉ๋‹ˆ๋‹ค)์— ๋Œ€ํ•œ ์ €์ž‘๊ถŒ (2์ฐจ์ ์ €์ž‘๋ฌผ์ž‘์„ฑ๊ถŒ ๋ฐ ํŽธ์ง‘์ €์ž‘๋ฌผ์ž‘์„ฑ๊ถŒ ํฌํ•จ)์€ ํ•ด๋‹น ์ €์ž‘๋ฌผ์˜ ์ €์ž‘...

โ–ถ Play video
#

about 4:30 into that last video

celest python
#

Awesome, thank you ๐Ÿ™‚

ocean wren
#

ML is definitely a good thing to at least understand the basics of if you're into game AI, becuase it will impact you job wise if you don't understand it ๐Ÿ™‚

celest python
#

So they made the robot learn to move by training it for 2 days, finally robot learned to move.. Just one question comes to my mind, why prefer ML over just scripted movement?

#

It's not like something people can interact it in daily life, or even if it's ultimately huge dynamic landscape that robot is moving on, they could cover it up with something else, IK on bones etc

#

Why waste 1.5 years to teach robot a move? Just for research or to implement to project

ocean wren
#

Because the learned movement is robust to changes in the level architecture

#

and has a more natural appearance

#

and yes, people can interact with it in the game, so you shoot off its legs etc

celest python
#

How they move the learned 'movement' data to animation pipeline?

ocean wren
#

yeah, exactly

#

its basically what robots do

#

think of it as procedural animation

#

where the procedural bit is a learnt motor controller

#

So they train it with a physics engine running millions of simulations, with an objective function to retain balance etc

#

and it learns from maximizing an objective function

#

pretty straightforward until you try doing it ๐Ÿ™‚

celest python
#

Another naive question, what about the performance? Without ML (or RL) data, you just process the steps defined before in the code, trace towards the ground, adjust the bones etc.
But with ML way, it has to process the training data, it literally has a brain to think about what it's trained for

#

Which means additional step(s)

ocean wren
#

Well, the training is all done offline.. you learn the matrix weights for the model, the runtime is called inference and is basically a bunch of relatively simple maths inside the matrix

#

so its pretty quick, because the expensive stuff is done outside of the game (you can do it at runtime too, but that would take time to train)

celest python
#

Hmm, makes sense now

#

Just like neurons lol

ocean wren
#

Its a bit like how IK works, you know

#

yeah, its basically just a bunch of simple maths in parallel

cursive stag
#

Is there a way to mark a nav area under a car as obstructed? I need the navigation to still generate under vehicles but canโ€™t have ai constantly trying to walk through the vehicles.

misty wharf
#

primitive components should have a setting for changing the nav area type, if you set it to NavArea Null or whatever it was that might do it

misty gale
#

Obstacle* i think

misty wharf
#

Yeah that might be it :)

magic jasper
#

null = never path here, obstacle = only path here is there is no other possibility

#

IIRC though you also need runtime navmesh modifiers enabled at the project level to support it on a moving primitive

cursive stag
#

Thank you!

tawdry yew
#

Hi im trying some basic stuff with ai. I tried aiMoveTo on a pre-placed actor and it worked perfectly fine, the actor moved.
When I'm trying to spawn an actor and then aiMoveTo the actor won't budge.

crimson galleon
tawdry yew
#

thank you, I used this node (instead of spawn actor from class) and it seems to work

turbid sky
#

hey all hope everyone's well - ive got a AI/C++ Q. so i'm doing some experimenting and i wanted to make my enemy character move to its original location after the user leaves the agro sphere and i'm running setGoalLocation, which takes in a vector, but it doesn't seem to move back, is there something else that needs to be added for it to move or do I have to use a different method? thx in advance!!

silent ivy
# pine steeple we rock around 100-150 ai (max cap of 200)

So you know, with VisAI you can get around 250 pretty easily; more with optimization. There's a ready-to-go example map that'll test 250 AI. (woodcutter) Simple steps taken for optimization.

For BP it's incredibly performant; mainly due to the utility-influenced decision making. In C++ it'll be multitudes faster (coming in v 2.0)

celest python
autumn hollow
hearty niche
silent ivy
silent ivy
silent ivy
ocean wren
#

Morning

#

GOAP is like 20 years old now? sheesh

#

You'd think we'd be talking about more recent planning algorithms ๐Ÿ™‚

#

I blame Jeff ๐Ÿ™‚

silent ivy
ocean wren
#

Well, you were talking about GOAP, so ๐Ÿ™‚

#

There's a huge volume of planning literature since goap

#

Dammit, I want to do some novelty search now!! ๐Ÿ™‚

hearty niche
ocean wren
#

Lehman and Stanley definitely have some answering to do ๐Ÿ™‚

silent ivy
silent ivy
tawdry yew
#

I have an issue with aimoveto node
It always returns success, even when I clearly block off my agents path. To be precise it fires the on success pin and then the movement result is also success, always despite agent not reaching its destination, because the path of clearly off limits.
Agent comes as close as he can, towards its destination, then stops

ocean wren
#

Yeah, for that kind of thing, a utility based decision is pretty common. There's loads of presentation from GDC on Utility based AI decision making on YouTube

#

The basic idea is that you score the options using some numerical value

#

and then choose from the top N percent of scored options

#

so for your case, distance to target might be part of the scoring function, or number of targets, or amount of ammo etc

#

Kevin Dill did some work on this for the US military while he was at Lockheed Martin

#

and has a few papers on it

#

Also see the book by Dave Mark on this kind of thing

#

The idea of Utility is pretty understandable.. scoring functions etc. But there are caveats etc.

#

Have a watch of Kevin's thing for execution

#

Also, Tom Looman did a utility AI thing for Unreal Engine

mossy nexus
#

@ocean wrenwhat's your take on Tom Looman rejecting BTs over utility AI?

ocean wren
#

I've got some sympathy, I think both are kind of wrongheaded in different ways ๐Ÿ™‚

mossy nexus
#

so reject BTs, reject utility AI?

#

do nothing?

#

๐Ÿ˜…

ocean wren
#

A mixture of both is useful

#

but yeah, I kind of moved away from both, because both have fundamental flaws

#

BT's have the issue of boolean logic being too hard a condition selection mechanism, utility has the problem of redundant calculations and maintaining momentum in a decision

#

I mean you CAN use either and both and they work.. I just think they're not ideal for my own thinking, they're hard to design because humans are bad at specifying behaviour

#

I am bad at specifying clearly what I want an AI to do. Because my mind can't comprehend all of the really fine detail edge cases that commonly trip us up.

#

I'm moving towards using learning behaviour by example being the way to address it. So stuff like reinforcement learning and the like, but using fewer examples and generally learning from video-based examples

#

The challenge being to have explainability in those kinds of systems

#

The whole "why is it doing X, how do I make it not do X"

mossy nexus
#

I wonder if people should start looking at AI design problems modeled on real life human behavior. like for instance, could you make an AI have ADHD?

ocean wren
#

You'd need to define what it is first ๐Ÿ™‚ or at least how it is exhibited

mossy nexus
#

I'm sure there's an ADHD definition described by professionals somewhere

misty wharf
#

abort task if other stimulus received and time passed > 5

ocean wren
#

But how to portray it usefully?

misty wharf
#

Does ADHD portray itself in any useful way in real life either? ๐Ÿค”

mossy nexus
ocean wren
#

I meant useful in terms of believability

#

how do you sell it in other words

mossy nexus
#

as a human behavior (tm)

misty wharf
#

honestly this would be pretty hard to "sell" in any way

#

I can't really tell my friend has ADHD when I talk or play games with him :P

mossy nexus
#

the idea is that rather than looking at AI from a perspective of purpose it would look at them from the perspective of a model

ocean wren
#

Well, anyway, believability is more than just having boolean conditions for excluding things

mossy nexus
#

it's having several of them ๐Ÿ˜Ž

celest python
#

You can tell he is ADHD if you play a boring game ๐Ÿ˜„

#

Or talk about history (if he is not interested in) instead of his favourite band

#

I think you can make a sim (from Sims game) ADHD very easily

#

When you have a perfectionist character in there, you cant make it watch movies

#

Same structure should allow getting bored of actions too ๐Ÿค” Wonder how they do it.. I remember there was a thing called smart-objects for their design

ocean wren
#

Yeah, smart objects was from Will Wrights original sims game

#

later they used rule based systems written by Richard Evans as the basis for stuff in Sims 3 along with the smart objects

tame cedar
#

Hi guys, looking for a suggestion of how to implement the finding target logic for a group of actors to fight against another group of actors. I tried to let each actor find the nearest enemy, but that will look really wired when the fight begins. Is there any other approach for this?

celest python
#

I timed the video

#

Set a prior focus and proper 'positioning' for your AIs and then let them select the other focuses based on other factors

#

Might help the gameplay

ocean wren
#

Not a bad read about Killzone's approach from the second? game

#

TLDR, its all about the space ๐Ÿ™‚

tame cedar
#

Thank you guys, I will take a look!

sleek igloo
#

hey, one question? Is there any reason to make AI behaviour in BPs instead of BT?

ocean wren
#

Not really

#

Woo! I got a small grant to pay for a decent GPU!

#

A6000 here we come!

bronze yacht
#

So if I want to generate a series of spots around the player, would I attach the EQS to the player character?

#

for the AI to teleport to

fickle schooner
#

theres no class called envqueryitemtype_actorbase
how do i get this

bronze yacht
#

wish arc direction could be from -360 to 360

winged pasture
#

Currently im trying to make some AI Concepts/Designs, but I couldnt really find any cool examples that sparks new Ideas - all Im finding is people talking about that enemy has to be predictable/cohesive/feel fair etc. but I cant find a single page showcasing different mechanics the AI can do and what pros/cons can evolve from this - If anyone has some references for that - would much appreciate it - right now im mostly looking trough game footage to get ideas, but I dont have that much exp with the design of it, so I would love to hear a bit more insight on how specific enemy abilites have different effects.

bronze yacht
#

Can I set a blackboard key value in the AI controller?

haughty edge
bronze yacht
#

figured it out, thanks!

broken ember
#

@mossy nexus thx Dude sorry for the late Response was pretty busy the last Days ^^

well i did it now via animnotify instead within C++

mossy nexus
#

think you tagged the wrong guy tho

west trout
#

I have some custom functions that handles movement and animation in a top down game. The required AI only responsible for move on screen and shoot. The only way for AI to play animation is use this custom functions. They normally takes axis input from player. Should i use behaviour tree, blackboard, AI controller, etc or just write code in enemy pawn?

crimson iris
#

hey guys, a pathfinding question. on the image I have the following setup: all red ships are ai agents, and the blue ship is the player pawn. now, the one in the blue frame is supposed to follow the player, but instead of creating a proper path (illustrated with the green arrow) it tries to move directly to the player (red arrow) and of course fails, since there's an agent blocking its path. if I remove the agent blocking the path, then it can properly move to the player. I'm wondering if my setup is wrong somehow - e.g. agent parameters for avoidance or something like that, or this is just not possible with the built in nav system? I'm using crowd detour ai controller btw, with RVO avoidance disabled, and avoidance weight set to 1.0 on all agents. other settings are default. any advice?

ocean wren
# crimson iris hey guys, a pathfinding question. on the image I have the following setup: all r...

Avoidance doesn't really deal with pathfinding, it deals with collision avoidance. So you'll never get a path like you want in that image unless you have your agents on a grid and represent the grid being blocked by agents at positions (there's a grid pathfinder in UE). Avoidance is really to push agents apart and avoid local collisions when agents are moving around near each other. My advice would be to turn off rigid collisions for your ships and then tweak the collision avoidance to make it interesting

crimson iris
#

thanks! yeah, I figured it out eventually. looking into modifying navmesh dynamically using UNavModifierComponent for characters when they don't move

errant phoenix
#

is there a way to retrigger execute in a btt task?

crimson galleon
errant phoenix
#

You mean the BB @crimson galleon

crimson galleon
#

BB just holds keys

errant phoenix
#

i mixed the two sorry lol

ocean wren
#

If you're "retriggering" a task, I'd say you're thinking about it wrong

#

the BT will basically retrigger itself when it comes to evaluate the branch if nothing else has priority

errant phoenix
#

Well the task has priority, but it seems slugging at the move to points, like it needs a second to calculate

#

might be how im using the execute finished

ocean wren
#

You mean it stops and then moves on? because that's a different issue really

old adder
#

Hello, I have group AI into one group.
Instead of every AI find it own path, I tried to make only the leader find the path and then offset the FNavPathPoint to makes lanes and move in formation.

#

However I think that because Leader pathfinding is in Async? Therefore other AI need to wait for path to be calculated, is there any event that I can register for that?

lofty radish
#

can someone help me out with interface communication between the AI and the player? I have an AI that can throw a grenade at the player, and I want to use an interface event inside the player to tell the player blueprint to create a widget that will warn them of the incoming grenade.

#

unfortunately I cant seem to get the event inside the player running

midnight scroll
# lofty radish can someone help me out with interface communication between the AI and the play...

I'm not sure I would bother with communication between the AI and Player so much. AI doesn't have to care about the grenade after throwing it. Grenade doesn't have to care about anything except existing and calling damage functions. The player itself should have a system that can detect dangerous things around it and notify it's controller's AHUD to create a widget with a passed in actor reference that can add to screen. The Widget can just exist in screen space and do it's own ticking to update screen location/visibility based on the actor passed in. Grenade explodes, does damage to stuff, marks itself for destruction, widget should be validating it's pointer often when updating screen space. If pointer invalid, remove widget from parent and let it die as well. This keeps your classes encapsulated and very clean without having to worry about which classes know about what.

lofty radish
#

Thanks for the reply, ill look into this solution durin my next work day

restive coral
#

Hi, I've only just started with AI in Unreal Engine and Iโ€™m trying to create a custom MoveTo task in c++. Basically, my enemies are tanks and I want them to patrol the specific area but at the same time they will move turrets left and right trying to look for the target. What is the correct way to approach this? Should I create a custom task and add the functionality there, or should I code it inside Tank class and call the functions from the behaviour tree(Iโ€™m not sure if this is possible). I have the patrol part working, where AITank moves from one point to another using the base MoveTo and I tried to create a custom MoveTo task but I got lost in the documentation.

#

btw: enemy Tanks are derived from Pawn class, not Character

ocean wren
#

Here's how I've done it in the past...

#

I had a system like the pawn actions, where you could add multiple "actions" for the system to execute simultaneously, so think about making independant layers for turret and main tank, so I'd treat them as seperate channels that have an enter->update->exit style loop (look at pawn actions)

#

So my AI itself, would simply add appropriate actions to the queue of actions for each layer of the tank, I had a "commander" layer, a "gunner" layer etc.

#

The parts were coordinated using message passing between the agents that made up the tank, each having a custom behaviour tree for their own activity (this wasn't an UE implementation btw)

#

For the most part, the simpler parts of the tank crew, like loader, gunner etc were simply state-machine like

#

But the more complex ones like target selection (commander) and navigation (driver) were more typical behaviour trees

#

The main thing was that there was the layering of behaviour functionality, you could add a move order to the driver and the movement action would be pushed onto the drivers queue, commander would evaluate threats and push commands to the gunner, who would move the turrent orientation towards the target via another action in the gunners queue

#

I've used similar queue-layered event based AI for stuff like chain of command stuff in a squad based AI using custom code in Unreal Engine and it worked out pretty well

#

I'd recommend looking at Pawn Actions and MessageEnpoint classes as a starting point

#

Might be overkill if its a simple tank game of couse

#

and these days, you'd maybe rely more on the gameplay abilities system

#

But I liked that seperation of decision from action, plus the message passing stuff was a nice architectural design I think

#

Then again, I'm from a distributed systems background anyway, so biased ๐Ÿ™‚

#

think of it as a message based multi-agent system if you prefer ๐Ÿ™‚

celest python
#

This might be a naive question since I didn't use EQS enough to completely understand about it, is it possible to find the obstacles with almost half-height of the querier with EQS only? or do I have to write a custom system? (simply they should find a position like the image 1 and avoid the 2nd)

#

This is for ranged AIs that prefer to be behind of a small cover

#

If we could do multiple traces with EQS tests I could provide a Z and check their blocking hits, and that would be hella easy but I guess we dont have that option

#

Though in that case I would need to find a way to provide the geometry (meshes) location to EQS ๐Ÿค”

midnight scroll
celest python
#

Yes

midnight scroll
#

Get points between ai and target, filter by tracing to target if can reach, discard. Use remaining to trace from higher point to target. You can offset the trace z

celest python
#

Actuaaallly... We can just place two trace test right ๐Ÿคฆ

#

You're right

#

Thanks for reminding me ๐Ÿ˜„

#

I was overthinking with trying to do multiple traces with single test, didn't think of adding multiple tests instead

midnight scroll
#

EQS on the brain lately. Fun note, BP point generator crashes in 4.27.2.

celest python
#

How surprising ๐Ÿ˜„

#

Can EQS do async traces btw?

midnight scroll
#

I think the entire query is async.

celest python
#

Nice

pine steeple
restive coral
celest python
#

Why AI module takes UObject parameters as references on functions?

#

Is it some kind of blackboard thing or servers anohter purpose?

void estuary
#

Hi guys! AIPerception Wait is not updating? How Can I access the updating value shown in the video in UE5?

#

As you can see in the Blackboard list (middle top of the screen) the "Perception Age" is not updating. I've connected it in blueprint as the image below.

But the age is updating in the sphere in debug mode. So what am I missing? Is it a bug? How can I access the updating value?

ocean wren
#

Have you checked the values coming into the blueprint to see if they're changing? try doing a printstring on the incoming values

void estuary
#

yeah they're not

#

or the age isn't

#

The Successfully Sensed is changing as you can see in the top middle of the video (the blackboard that reads the values)

ocean wren
#

Suggests you're not getting the updated senses quite right

misty gale
#

Have you set a max age for the sense?

#

Also, you can check the get known percieved actors array to see if the data updates there.

#

Feels like you're just reading cached results

#

Event lastly triggers when player leaves vision

#

Pretty sure you need to fetch from the array..

void estuary
#

Thanks guys! How do I get access to the array?

#

Is there any documentation or do you have any tip?

pastel drift
#

Have people used some extra ways to get AI Perception Sight to work at a bit higher granularity? I have a guard bot and it can only see the player if the root location of the player is within the line of sight. This isn't great when the player is clearly visible to the bot just above the waist line. I think I could just put a big overlap sphere on the player and do custom linetraces to all the bots it can overlap with, but... I'd rather use the in-built system if possible.

pastel drift
#

Alright, overriding a function from IAISightTargetInterface worked, there was actually someone who pretty much had a working solution on a blog page

#

You'd think you could just add sockets directly as AI detection points tbh

sour fable
#

Anyone who is interested I am making a zombie game with human and zombie AI
ive added both of them but now I might think of scenarios such as both AI fighting each other along with the player if anyone has any concepts or hints I would really appreciate it ๐Ÿ™‚
its hard to think on how to implement this final feature but if I can it would make my game so much better!

#

any ai experts out there i would appreciate any ideas

manic fossil
#

artificial intelligence

ocean wren
celest python
celest python
#

Yeah that seems to be working, probably we're adding the offset by contexts

celest python
#

Is there any way to visualize EQS on gameplay debugger when not used with BT?

ocean wren
#

use EQS pawn

hearty niche
#

how do I check if the enemy is in front of player? I want the enemy to recalculate its position if it is not in front of player to stand in front of player when attacking (first person)

celest python
#

Use Player's values for BaseLocation and BaseRotation, provide your AI's location for OtherLocation

#

CosTolerance would be 0.7f

#

It will return true if it's looking to your player

#

You also need to trace first to see if it's blocking hit (AI might be behind a wall, in another room etc.)

hearty niche
#

actually I wanna place the AI in players LOS if in combat cuz it is an fps and for balancing purposes. I wanted to detect if the enemy is still in LOS once it reached its location and if the player turned recalculate.

Why could I need trace here (AI only attacks when it sees our player and the eqs placing the AI has a trace check for visibility )

celest python
#

If EQS already traces for you you dont have to trace

#

The function I sent you will do a dot check, if the value is higher than 0.5 it's in front of the player, if its higher than 0.7 its more closer to the cone

#

1.0 directly in front of the player

#

That just provides you info about direction rate

hearty niche
#

ah so thats how dot produxt is supposed to be used. I knew that it was needed but not how

pastel drift
#

dot product lets you know if you are facing towards or away, cross product lets you know if you are facing to the left or right

void estuary
errant phoenix
#

How can you avoid the game being stuck at trying to spawn at a location where it cant?

misty wharf
#

Check after spawning if the actor is valid or not

#

If it doesn't get spawned, then the returned actor is null

errant phoenix
#

Already doing this, but the spawning node itself gets stuck at trying to spawn it and doesnt execute if it gets stuck

#

and just freezes everything

#

guess a linetrace is the solution then

celest python
#

There is a collision checking option

#

For BPs its on the K2 node

#

For C++ iirc you need to set it somewhere on the constructor

misty wharf
#

๐Ÿค”

#

I'm fairly sure it will not get stuck in a loop like this unless your own nodes cause it to do so

#

Even with the attempt to adjust location setting it has a limit of how far it tries so it won't just go forever

celest python
#

It could fail

errant phoenix
celest python
#

What its set to?

errant phoenix
celest python
#

Set it to ignore collisions?

errant phoenix
#

Wont that cause issues if they spawn on eachother?

celest python
#

It might. Other option is you can randomize the spawning location in a radius and keep the current setting

#

Or have multiple spawning points

errant phoenix
#

Im already randomizing within nav radius and kept the current setting, which causes the engine to freeze 1/3 times when spawning

celest python
#

That's odd

errant phoenix
#

yeah thought of a grid

celest python
#

Randomizing the spawn location shouldnt be an issue

#

Its not an expensive function

#

At least not that expensive

#

Something else is wrong

#

Probably logging

#

Spawning itself is also an expensive thing by the way

errant phoenix
#

how would you decrease that cost?

celest python
#

You can pool the actors

#

For frequently spawning things its almost mandatory

celest python
#

on deactivated, hide them in the game, disable tick, movement etc

errant phoenix
#

wouldnt a massive active call also be expensive?

celest python
#

It's easy to do, I have some example repos for C++ but I don't have one for BPs sadly

misty wharf
#

It's not that expensive unless you're spawning a lot of them

celest python
#

Yeah, frequency matters

#

If you spawn each 0.2s it's a problem

errant phoenix
#

Frequency of spawning?

#

okok

celest python
#

Yeah

errant phoenix
#

soo an average spawning above delta tick would be less expensive?

misty wharf
#

It again depends on how many you're spawning

#

(and how complex the actor you're spawning is)

celest python
errant phoenix
#

so say spawning one actor per 0.5 would be much better?

misty wharf
#

If you're spawning 10 actors it costs next to nothing to spawn them with that interval

#

but if you're spawning 100 then yeah

errant phoenix
#

hmm

celest python
#

Profile your spawning cost by the way ๐Ÿคทโ€โ™‚๏ธ

#

Spawning cost depends on many factors

#

For example BP spawn node uses deferred spawn

#

~%30 expensive than usual one

#

Your freezing issue might be related with something else

misty wharf
#

It's almost guaranteed to not be spawning unless he's spawning several hundred

celest python
#

Maybe its just logging

errant phoenix
#

hmm okay ill do a profiling and make spawning happend slower, and also make a grid

misty wharf
#

I sometimes spawn large numbers of actors in one tick and while it causes a noticeable hitch, it doesn't freeze the game

errant phoenix
#

im spawning around 30 to 50 depending, its a small pigeon

#

no complex code running without minigame running

misty wharf
#

If it's mostly for visual fx you may want to consider using particle systems, I think niagara handles skeletal meshes

celest python
#

People at #cpp talking the exactly same thing lol

#

Nice coincidence

errant phoenix
#

@misty wharf
Hmm thats interesting, make the ones that are not interactable VFX hmm

foggy hazel
#

Hey, what's the difference between AISense_Sight_VR and AISense_Sight? Does the Sight_VR look for the HMD?

pallid trout
#

Why is my EQS not recognizing actors that have been spawned at runtime?

#

Working fine if I place in editor

midnight scroll
#

Quite likely the item generator you're using to find those actors.

#

If it's using a system that caches actors, and doesn't update that, it won't know about anything spawned later.

pallid trout
midnight scroll
#

Dunno. What item generator are you using?

pallid trout
#

I'm just generating all actors in a radius inside the eqs query

midnight scroll
#

Are you using multiple levels?

pallid trout
#

No

midnight scroll
#

Just looked at the code for that. All it's doing is using the QueryOwner to get World. And using that to iterate over all actors in that world of the class type, and doing a simple distance check. So if it's not finding your spawned actors, either they're the wrong class type or they belong to a different world for some reason.

pallid trout
#

My actors were spawning above ground level so the pathfinding test was failing. I checked by manually setting the Z of the spawn location and it worked. Although the static mesh of my actor was going through the actor previously so idk how it wasn't able to pathfind.

tardy talon
#

I have this task in my behaviour tree

#

But in the enemy blueprint the values come back as 0 and -1

#

Any idea why?

#

ok now its just -1

#

So the message is called in the BTT -> then the event fires off but the variables dont come through correctly

sharp light
#

I'm currently using MoveToLocation to move an actor to a location. However, I have a need to be able to get the status of this movement to query if it's still executing. In digging into the AIController.cpp I see there's a handful of functions for AI movement but nothing seems to fit what I'm looking for and Google has been less than helpful. Can anyone suggest a function that might be more suitable for this?

#

Oh, looks like I can override OnMoveCompleted and that should solve most of my problems

tardy talon
sharp light
#

Is there any way to get the path an AI is using for a moveto? I know I can use FindPathToLocationSynchronously to find the path ahead of time but I figured it must be saved somewhere during a request

misty gale
#

Sounds like internally in the pathfollowing component

sharp light
# misty gale Sounds like internally in the pathfollowing component
    if (Controller)
    {
        AAIController* AIController = Cast<AAIController>(Controller);
        UPathFollowingComponent* PFComp = nullptr;
        if (AIController)
        {
            PFComp = AIController->GetPathFollowingComponent();
        }
        else
        {
            // player controller, most probably using SimpleMove
            PFComp = Controller->FindComponentByClass<UPathFollowingComponent>();
        }

        if (PFComp != nullptr)
        {
            const FNavPathSharedPtr Path = PFComp->GetPath();
            if (Path.IsValid())
            {
                // we don't care if Path->IsValid(), we're going to retrieve whatever's there
                ResultPath = NewObject<UNavigationPath>();
                ResultPath->SetPath(Path);
            }
        }
    }

    return ResultPath;```
#

Found that in UAIBlueprintHelperLibrary

#

I'm trying to wrap my head around solving this problem. I have an AI moving on a path, the AI can be interrupted at any point in that movement. When interrupted, I need to figure out how many units they moved.. and since the path can bend I can't just get the delta from the starting point to the end point. I need to somehow figure out where the actor is on the path they used.

misty gale
#

There should be a distance variable

#

You could track distance moved since started moving by delta capture of the location

sharp light
#

I would need to capture it at every path point though and I don't think there's any hook into an AI reaching a path point

#

Hmm. I can use UAIBlueprintHelperLibrary::GetCurrentPathIndex though to get the last path point they reached when the movement was interrupted.. add the deltas for all the previous path points then add it to the delta for the last path point to the actor.

misty gale
#

On move completed?

#

Unless thats the entire move.. not sure

sharp light
#

They don't necessarily move in a straight line

misty gale
#

From path point to path point?

sharp light
#

Crude MSPaint of what I'm talking about. From start to end is 300 total units. But if the movement is canceled at the red X, I need to be able to calculate that the AI moved about 290 units. I can't get the distance from start to the interrupted point because it will be far less than what they actually moved.

#

I do think I can use GetCurrentPathIndex to get that the last path index was "1" (or maybe it gives me "2", not sure) and then manually add up all the distances. But it sure would be handy if it tracked it somewhere

misty gale
#

Right,

#

But if you start capturing the delta at start, you'd get an accurate measure

#

Not just start loc and stop loc

sharp light
#

But .. how/where would you capture it?

misty gale
#

But (current frames location - last frames location ) length

#

Atleast i think this would be accurate

sharp light
#

On tick?

misty gale
#

Thats what im thinking ..

#

Unless you wanna check between current pathpoints location and lastmpath points location..

#

But then you need the points..

sharp light
#

I just put this together (currently untested)

{
    TArray<FVector> PathPoints;

    const UPathFollowingComponent* PFComp = GetPathFollowingComponent();
    if (PFComp && PFComp->GetPath().IsValid())
    {
        PathPoints.Reserve(PFComp->GetPath()->GetPathPoints().Num());
        for (const FNavPathPoint& NavPathPoint : PFComp->GetPath()->GetPathPoints())
        {
            PathPoints.Add(NavPathPoint.Location);
        }
    }
    return  PathPoints;
}

float ABoardGameAIController::GetTotalDistanceTraveledInCurrentPath()
{
    float TotalDistance = 0.0f;
    
    const UPathFollowingComponent* PFComp = GetPathFollowingComponent();
    uint32 CurrentPathIndex = PFComp->GetCurrentPathIndex();
    
    TArray<FVector> CurrentPathPoints = GetCurrentPathPoints();

    // Add up the distance from the start to the current path point
    for(uint32 i = 0; i <= CurrentPathIndex; i++)
    {
        TotalDistance += (CurrentPathPoints[i] - CurrentPathPoints[i+1]).Size();
    }
    
    TotalDistance += (CurrentPathPoints[CurrentPathIndex] - GetPawn()->GetActorLocation()).Size();

    return TotalDistance;
}```
#

Which I think should work ๐Ÿ‘Š๐ŸŒฒ

#

Hmm, doesn't work quite right. I think CurrentPathIndex is giving me the current path point the AI is trying to get to, not the last one it reached

misty gale
#

Yeah sounds about right

sharp light
#

oops, crashed it. hmm something is a little faulty in my logic

misty gale
#

Idk it does sound like my vector delta should be easy enough to capture but ๐Ÿ˜… untested, unverified. Only tried in my head :p

sharp light
#

I try not to do stuff on tick when I can avoid it. And while I don't need 100% accuracy, it does seem like adding up the distance between points will be slightly more accurate as it's possible for the movement to end between frames

misty gale
#

True, with your method you'd only have to calculate it once, even if its a tad extra

#

Wha, it can?

sharp light
#

I doubt it would be very likely but why not?

#

hm

#

actually, no that really doesn't make sense

misty gale
#

May i ask what this is for anyways ? ^^

sharp light
#

Movement in a turn based combat game. I am limiting how far the player can move and they can interrupt their own movement mid-move

misty gale
#

Right

#

Running this a check on tick during movement doesnt sound like the worst thing imo^^

sharp light
#

It would probably be fine

misty gale
#

But your apprach is surely reasonable. Getting the last and current path locations + adding any previous points distances should give you an accurate result afaik

tardy talon
misty gale
#

In regards to path length it may even be more accurate than my suggestion due to height differences if such were to occure

sharp light
#

Think I got it working now, just had to tweak the for loop to i < CurrentPathIndex . Turns out the current path index IS the previously hit path point

lyric flint
#

Anyone able to help, Have an issue that if I tell the AI to go to an actor etc works like a charm. If I however change it so it goes to another actor then on success then to the actor that it used to go direct to it don't seem to work

#

gets to the Go Via we will call it turns in steps to direction of next actor it will go to and just sits dosen't move and I can't work out why direct it works but go to another actor first don't

#

not make any sense

lyric flint
#

Is there a setting to disable navigation on top of a mesh? I have chairs that are by default being labeled as navigable rather than just blocking navigation

crimson galleon
#

make sure your chairs also have collision

lyric flint
#

no

#

It generates navigation on top of the chair, that setting disables it beneath it

#

or if it's supposed to disable it above it doesn't do that

#

They don't seem to have collision though, let me fix that rq

#

Okay that all fixed it. That's so weird I thought for sure it had collision.

crimson galleon
#

sounds weird that it had navmesh on top without collision

#

there is also this setting in the static mesh editor fwiw

lyric flint
#

yeah that's crazy. It the navmesh was being built on top of it

#

I use dynamic for my doors atm. In UE5 the other common solution resets the navmesh settings

crimson galleon
#

eww

simple crest
#

can't you use nav link proxy's for doors? (i actually don't know, don't do much ai level design)

crimson galleon
#

i think so, only familiar with using nav link for jumping