#gameplay-ai

1 messages · Page 2 of 1

uneven cloud
#

There is a function on the NPC character to tell it to ignore collisions with a specific actor.

vivid jolt
#

thank you

lyric flint
#

Thought this would be useful for someone so I wanted to share this.

sacred shale
#

How would I make a Behavior Tree Service check to see if the player is within range of the pawn sensing component?

harsh storm
#

Then you don't need the service at all. It's handled by the sensor.

sacred shale
#

unless there's a more efficient way to do it (there probably is lol)

sacred shale
#

I'd have to update that through either service or tick since that needs to constantly be updated

harsh storm
#

The AI Perception component is what I'm referring to. Pawn Sensor is old I believe. AI Perception is the newer version of it.

sacred shale
#

ah alright

harsh storm
#

You slap it on the controller or pawn, give it a LOS config, then connect to the Perception Updated event

sacred shale
#

I'm using Pawn Sensing Component either way, I know it's either AI Perception or Pawn Sensing but I used Pawn Sensing since that was the one I've used before

harsh storm
#

When the perception updated event fires off, you just update the bCanSeeTarget (or w/e your project calls it). And you don't need a service for this at all.

sacred shale
#

hm alright, i'll look into that, thanks

#

the other problem I'm running into is that the way I'm doing it in the code above works fine, but if the player keeps moving, the AI will only move towards the last known MoveToLocation, so when it chases the player, it goes, start, stop, start, stop, start, stop so I'm gonna have to find a way to update the MoveToLocation constantly instead of just when the AI sees the pawn

uneven cloud
sacred shale
#

figured it out

delicate crow
#

I'm trying to make a super super simple AI work, but using the Spawn AIFrom Class node doesn't get me a character that spawns with an AIController and I don't know what to do now

#

The Is Bot Controlled node fails.

#

nevermind...
Checking via Is Player Controlled works perfectly fine. Guess the bot node is just faulty.

uneven cloud
granite pewter
#

is theres a way to set a command for every ai tree to do 1 thing when another thing happends?

for example i want all ais to start dancing when the player dies,
im using the behavior tree to control them

mortal umbra
#

how do i make an AI look at the rotation of a specific actor?

#

he has to walk rotate in place though

#

he can't just slide to look at

#

that looks weird

sacred shale
#

this is during the "wander" method

uneven cloud
#

You should project your points to navigation (in the generator) and add a batch pathfinding test to filter out all unreachable.

sacred shale
#

since the minimum distance is prob too high

#

i'll try, thanks

sacred shale
uneven cloud
#

The pathfinding batch test is actually a lot better.

sacred shale
#

sorry i didn't pick up on that initially 100% lol

celest python
#

@ocean wren did you see#generative-ai yet? I think you might like it 😄 You are only one using disco in this server

vivid jolt
#

hello - i am working on some "tasks" in my AI Behaviour Tree - but it seems I cant create the timelines there - I tried other things but nothing seems working. what i am trying is to get AI to location (working with move to) = I want to create a task "turn around" - rotate to new rotator - but smoothly

uneven cloud
#

Rotate To is a built in task that does that.

opal crest
#

It sounds like this problem is solved, but another trick is that you can create a "fallback" EQS by adding another generator and placing it to the right of the first generator. That way if there's no valid point on the donut, you might use a pathfinding grid or (maybe a smaller donut) to find a point that works.

north oriole
#

Hey guys how do you handle multiple AI actions in unreal?For example let's say there is an enemy which could chase the player if it sees it, moving towards an interaction object, or Just return to the respawn. Do you just order all of this actions in the Behaviour tree, or do you decide what to do in code (maybe a service) to have more control?

misty wharf
#

It depends™️

#

You can do it in any way of those you listed, or others too, it's just a question of what makes sense for you and the logic that you need

ashen mica
#

"Move To" Fails on all my characters. I do have navmesh bounds volume in level. Tried rebuilding paths. Patrol Location is set. Any ideas? Using UE 4.27.2

misty wharf
#

visual logger usually shows more detailed info on stuff like that so check there

ashen mica
#

I fixed it! I found this error in my output log. So I just deleted all the navmesh bounds and dragged it back in to recreate the recast navmesh and now it works

misty wharf
#

That's good to know, never seen that warning myself

ashen mica
sudden citrus
#

is there a way to set default Gameplay Debugger categories to be enabled or disabled? Only place I've found is the hardcoded value when they're registered.

sudden citrus
sudden citrus
#

a whole lot of navigation fixes lying in the main ue5 branch waiting for 5.1 hopefully

keen crow
#

is decorator's OnNodeDeactivation and services OnCeaseRelevant both guaranteed to be called when the execution flow switches to another branch by an another decorator higher in the hierarchy? In my case I have a core BT that has a selector with 2 "Run dynamic behavior" nodes and inside one of dynamic behaviors I have a decorator that relies on OnNodeActivated and OnNodeDeactivated methods and for some reason OnNodeDeactivated does not always gets called when the root BT switches to another dynamic behavior.

upd: ok I tried doing the same with services OnBecomeRelevant and OnCeaseRelevant and OnCeaseRelevant also doesn't always gets called when a higher priority decorator switches to another branch

upd2: ok nvm everything is working correctly, I had errors in my code

vale pawn
#

I tried changing my Tile Size UU value to be smaller in Project Settings > Navigation Mesh and now my Nav Mesh agents just don't work at all

#

I can't seem to get them to work with any setting changes

#

pretty sure I'm going to have to create a new project

keen crow
#

Is it ok and safe to store TWeakObjectPtr to actors in node memory structs?

ocean wren
graceful panther
#

I built some ais that seem to be slowing my game down is there a good way to troubleshoot what could be causing this? like to figure out if its related to the Blueprint or the AI controller? or all of the animation blending or something?

misty wharf
#

Unreal Insights can be used to profile the game and get information on what's taking time and where

#

there should be some docs on it somewhere

opal crest
#

I have used stat StartFile (do things) stat StopFile --> then open the file in the Session frontend to get decent profiling info on what's taking up frame time.

normal mist
#

Is there an easy way to visualize a FNavigationPath?

#

i.e. the path generated from FindPathSync/FindPathAsync

misty wharf
#

I think visual logger might have those at least in some cases by default

#

but if not, you could probably just use the debug draw helpers to draw it out as lines or arrows

normal mist
#

Thanks @misty wharf

sacred shale
#

would there be a way in C++ using a service to see if the path exists between an AI character and the pawn? I saw there was a function in the base UNavigationSystem called TestPathSync but I'm worried it might be expensive

#

right now my service is going "okay, if the target actor is not null, then set the Move To Location to be the main pawn" but I need to do another check, that being if the Path Exists, which the problem is that I'm setting the Move To Location in the service as soon as the player is within the line of sight of the pawn

#

i can probably cut this off into a separate service but yeah

#

being CheckReachable

opal crest
#

If there's anything like that the EQS Generator for pathfinding grid would be a good place to look for it (since that generator guarantees that all the points on the grid are navigable to from the context location)

#

I suspect it's just using TestPathSync, since that's decently quick for short distances.

misty wharf
#

FindPathSync and FindPathAsync which were just mentioned above should do it I think?

uneven cloud
#

Test Path Sync is a lot cheaper than finding a path, especially if you use the hierarchical test.

misty wharf
#

Sounds like that is probably the way to go then

#

Pathfinding is typically not that expensive to do, so if you need to sometimes check it, it should be fine. It's easy enough to spot if it causes performance hitches later on with more checks or whatever

vale pawn
#

Is there a way that I can tell my AI to rotate then move

#

But not just on the initial call

#

also like throughout the course of dodging obstacles, the rotation is very jerky

#

or will I have to design my own custom AI

sacred shale
#

basically, if I go from Move To -> Move Directly Toward just fine. but not the other way around, UNLESS the AI gets to the exact point that the main player is at, then it properly switches to MoveTo

keen crow
#

Remind me please how do I make an AI perception sight sense to detect only enemies/hostiles? So far I've implemented IGenericTeamAgentInterface::GetGenericTeamId on both player and bots classes to return different values and set custom attitude solver FGenericTeamId::SetAttitudeSolver(BotTeamAttitudeSolver) in one of constructors, but that doesnt work good. The attitude solver doesnt always gets called when the player gets in AI sight. Is there anything missing?

uneven cloud
keen crow
keen crow
#

do BT services run immediately when execution enters node/sequence? or do they tick only after first interval?

serene basin
#

Is it possible to replicate variables to clients from the BT server only logic?

uneven cloud
uneven cloud
serene basin
#

@uneven cloud yeah

left mist
#

Do i understand correctly that EQS dot test returns a value between -1 and +1?

#

And so if i want to make sure something alligns with something, i must do positive scoring?

solid pond
#

Every time I reset ue5 the speed variable keeps getting reset to zero. How do I fix this as it's extremely annoying?

quaint radish
#

What is a synonym for service?

#

Because I can't seem to make connections for when I want to use them. I have movement and queued movement working without services.

quaint radish
uneven cloud
# left mist Do i understand correctly that EQS dot test returns a value between -1 and +1?

The dot product is a test for how similar 2 vectors are. 1 means that they are in the same direction, 0 means they are perpendicular and -1 means they are in opposite directions. Here is a good visualization of it: https://twitter.com/FreyaHolmer/status/1200807790580768768

dot product - visualized ⚪

the dot of two normalized vectors, as shown here, can say how similar they are

a • b = 1, same direction
a • b = 0, perpendicular
a • b = -1, opposite directions

you might also be able to see why it's sometimes called scalar projection~

Likes

3178

Retweets

748

▶ Play video
uneven cloud
stiff gale
#

When I spawn AI why it causes hiccup, is there anyway to prevent that? Maybe I can manually init the Behavior tree or anything else after spawning.

#

Anybody knows?

celest python
#

you need to prove its because of BT first

#

so profile

#

you need to have a gigantic amount of BT node count and tons of hard references to assets in your BTTasks to cause a hiccup

stiff gale
#

good point. thanks

left mist
quartz oracle
#

Has anyone been able to get @buoyant geyser's cover system (https://github.com/GlassBeaver/CoverSystem/) working on UE5? I've had a go, removing checks for UE 4.26, etc. Project loads, builds and runs, but no cover points are generated at all.

celest python
#

It worked fine on 4.27, never tried on 5.0

#

You could ping him at HORU discord though, rather than pinging in here, since there is a specific channel for it?

quartz oracle
mighty bone
#

I want to handle agent rotation myself, including playing turn on the spot animations if the agent isn't moving.
Is this logic suitable for a service, or is it okay to include it as part of EventTick on the BP, or somewhere else?

buoyant geyser
#

that code will haunt me to the end of my days...

#

(I've not tried it on ue5)

mighty bone
#

I have, I got it working but saw warnings about Octree being deprecated in an upcoming release - to be replaced by Octree2 was it?
Not sure how long the warning has been there though, maybe it's always said that

buoyant geyser
#

ever since octree2 came out

quartz oracle
buoyant geyser
#

I've never bothered to upgrade

#

no I've nothing against the code itself, just that I'm not maintaining it anymore and people sometimes come to my server and ask about it

quartz oracle
#

There isn't much I can find about dynamic cover generation generally, so your article tends to be top of search results. It's excellent and very educational.

buoyant geyser
#

if anyone does manage to get it running on ue5 btw you can do a PR and there's a good chance I'll take it as-is

quartz oracle
gusty mango
#

What can cause a basic AIMoveTo to start failing after a while? My driven character starts just heading to a random place almost like it is being told to circle around a random point in space that isn't even inside my NaveMesh.

#

I put a placeholder sphere in the updated target, and it does a few, then just veers off wildly into nowhere

#

I'm thinking my NavMesh is configured poorly, but I've tried tweaking everything (which has certainly at least educated me more on how all this works!)

undone heron
#

How do I set the value as an actor instead of just getting it? there's no option to set it

mighty bone
#

Use Object

undone heron
#

what's the difference between getting it as an object versus getting it as an actor in that case?

#

does it still store the actor?

mighty bone
#

It seems to just cast it for you

#

Actor isn't a type the Blackboard stores, it's only objects. The Get function seems to cast it for you just for convenience sake

undone heron
#

ah that's cool

#

thank you

quartz oracle
left mist
#

I want to make AI detect ledges and position itself in such a way to kick player into them (i.e. walk around the player if needed to get into proper position). Here i use one EQS to get ledge context and trying to use dot test to make AI prioritise positions between player and ledge. But it does not work. Am i doing something wrong?

thin sandal
#

Is it possible to have a possessed player pawn use AI functions like MoveToLocationOrActor?

round sand
#

Hey,
In my game when I run as client and run the game under one process the bots in the game seem to be moving but when I run it under multiple processes the bots don't move at all but their tasks get updated. Looks like something is not replicated. I have replicated the task enum, and turned breplicates to true but I am trying to figure what is not making it to move

mortal umbra
#

when should you use EQS?

misty wharf
#

It's convenient for generating sets of points/locations or actors and filtering them based on various rules

mortal umbra
#

@misty wharf do you think that Splinter Cell used it?

#

@misty wharf as that is the kind of game i am trying to make

misty wharf
#

I've not played it enough to really be able to say

#

You could certainly use it for some kind of mechanics in a stealth action type game I guess, like finding cover spots or search spots or whatever

celest python
#

but no idea if its EQS or not

#

could be designer placed cover points too

north oriole
#

Hey guys, i'm using ai perception on my enemy. At some point, i want to extract the last sensed location of the player and tell it to go to that place. How do i do this?i try getKnownPerceived actors but it gives me only the actors not their last sensed position

north oriole
#

in the on sensed function(or how is called lol)?

round sand
round sand
misty wharf
#

afaik no but don't quote me on that :P

north oriole
round sand
mortal umbra
#

thanks for the help

#

i appreciate it

uneven cloud
uneven cloud
gusty mango
#

After the Character reaches and gets new points a few times, it just randomly (ignoring the last requested location) heads outside of the navmesh volume and starts going around in a circle. WTF, its like it is intentionally spiting my request and saying "no, I'm just gonna leave and run around in circles over there"

#

so it must be something to do with (a) my landscape, (b) my Character's CharMoveComp. or (c) some other objects within the navmesh volume.

keen crow
#

Can/should I abort branch in services (or maybe just disable services from ticking) if in OnBecomeRelevant I can understant that I am missing some variables (i.e. AI pawn is of wrong class). I can't call OwnerComp.RequestExecution(this); as it is usually done in decorators

misty wharf
#

Services cannot affect BT execution flow directly afaik, at least not without significant hacks

#

If you want a "service" which does that, make it a decorator... they can more or less do very service'y tasks plus affect BT execution flow

uneven cloud
gusty mango
opal crest
uneven cloud
uneven cloud
opal crest
#

Ah, I see. So it's particularly when using world partition that the mesh gets divided nicely.

#

Guess I'll be taking the scalpel to my landscape 🙂

uneven cloud
#

Yes. The actual navigation data is saved with each chunk and loads it when streamed in. Then you can use static, regen with modifiers only or full regen settings depending on your project needs.

opal crest
#

That sounds extremely nice. Definitely something I'm going to experiment with.

left mist
#

I am trying to put EQS into service, but it stops working. Any idea why?

#

service

mortal umbra
#

what causes this?

#

the behaviour tree keeps flashing

#

like it doesn't know what to do

#

i followed this guide

#

also, the AI is able to keep track of me through walls

#

which is not what i want

opal crest
# mortal umbra what causes this?

The flash tells you that it's returning to the root and re-evaluating the tree.

Here's what's happening
a) The first node is a selector: In Combat.
Your decorator is returning successfully so it enters the In Combat selector.
b) the first node of the selector is Attack: a sequence. This decorator is returning successfully, so it enters the sequence.
c) the first node of the sequence is Rotate to Face BB entry.
d) when this node returns successfully, the Attack sequence is considered successful, since it has no other nodes (Sequences are successful if every node underneath them succeeds).
e) So now we check the In Combat selector. Selectors are successful as soon as one of their nodes succeed.
f) This returns to your Root selector.
Root is also a selector and since the InCombat node is successful, it is also considered successful, and it returns to the Root of the BT. The BT debugger flashes to let you know that it's re-evaluating the whole thing.

mortal umbra
#

so what should i do?

opal crest
#

I'm not sure what you want it to do 🙂

mortal umbra
#

i followed the official documentation

#

i want the AI to look at the player and when he disappears behind a wall he needs to try and find him by going to the last seen position

#

as it does here

#

i am using older documentation because the images in 5.0 are broken

#

the guide is the same other than that

opal crest
#

I think, to get this BT to behave the way you want it to, you need targetActor not to be set.

#

Which means, when your player goes behind a wall, you need to clear targetActor from the blackboard.

mortal umbra
#

nope

opal crest
#

Watch the area in the bottom right of the BT debugger.

#

Does Targetactor ever go to None?

mortal umbra
#

the thing is

#

he also tracks me through wall somehow

opal crest
#

Yeah, I think the problem is related to the LostSight event.

#

You'll want to see if it's called.

mortal umbra
opal crest
#

Those nodes look right to me.

#

Check the collision on your wall. Does it block the Visibility channel?

mortal umbra
#

i am using a blockout plugin

#

i can't edit the collision on it for some reason

opal crest
#

Hmm. try just dropping a Cube Actor in and scaling it up?

#

That will let you see whether it's collision or not.

mortal umbra
#

i did

#

the same thing happens

lyric flint
#

help plz

#

i am making a little project for fun and am having ai trouble if anyone could assist me.

mortal umbra
#

@opal crest i added you as friend

#

@opal crest can we talk via dm?

opal crest
#

Sure, I can spare 5-10 mins.

mortal umbra
#

accept please

#

otherwise i can't message

lyric flint
#

anyone?

lyric flint
#

plz @ me if you can

harsh storm
#

Don't ask to ask - just ask your question.

gusty mango
#

Turns out it was because I had my animbp using the max walking speed constantly.

#

I think I should be multiplying the length of the last input vector by maxwalkingspeed as the best resulta so far, but it gets stuck somehow missing the target and looping around it constantly after a while.

#

Like, it is visually passing through the target point, it isn't just circling around it (which would happen if my turning params were wrong).

crimson token
#

Hi, I can't seem to set a blackboard's key.
As you can see, I'm giving the value pin an actual value (BP_MainCharacter), but the value inside the blackboard doesn't seem to change

#

Any idea what I'm doing wrong? Do I first have to set this key in the controller, somehow?

misty wharf
#

Is the blackboard key of the correct type? Have you selected the appropriate key in the BT properties for the node? How did you determine it isn't changing?

gusty mango
#

Has anyone quantified how/why blackboard vs blueprint is better for AI design?

misty wharf
#

It's quite easy to see if you try it yourself I think... BT's aren't better for everything but they do some things more easily than BP's

crimson token
#

Have you selected the appropriate key in the BT properties for the node?
Not sure what you mean with this though

misty wharf
misty wharf
crimson token
#

I'm sorry I'm really new to this

misty wharf
#

Correct

crimson token
#

How do I do that? I thought it was like the controller, and it would just set the BB key with the same name

misty wharf
#

If you click the variable and look at its settings it has a checkbox called instance editable or something like this - enable it

#

Assuming this is a behavior tree task node or such, you can then click the node in the BT, and it should show you a dropdown to choose the key

#

I'm not quite sure what you mean "like the controller and set ..." because I don't think anything gets set automatically anywhere unless I'm forgetting something :)

crimson token
#

Found the Instance Editable and enabled it though

misty wharf
#

what's the type of the variable?

crimson token
#

Object, BP_MainCharacter

#

Oh wait

misty wharf
#

oh wait it probably is blackboard key selector since it connects to that pin

crimson token
#

Yeah

misty wharf
#

if you click the service in your BT, it should show up a selector for it in the properties panel

#

similar to how you can change settings in the built in nodes

#

(you may need to press compile and save in the service BP first if you didn't)

crimson token
#

All I'm getting from the service is this

#

Oh

#

Oh...

misty wharf
#

It's there :)

crimson token
#

Damn am I blind

misty wharf
#

lol, yeah sometimes it's hard to see them for some reason

crimson token
#

Alright, everything is working, thanks a lot

misty wharf
#

👍

gusty mango
#

OMG. If you pull a random value for multiple inputs, set it to a local variable first, please. Sigh. So much time wasted.

misty wharf
#

Yeah that's a bit of a gotcha that most people run into at some point :)

#

All "pure" BP nodes (that is, nodes which don't have a white exec pin) will run the same number of times as they have pins going out of them

#

Randoms are just the one where this behavior tends to cause problems, there's a few other common gotchas relating to this with modifying arrays and looping

somber plaza
#

If an AI controller is not applied or is disabled on an actor, does a blackboard still fire its execution and attempt a MoveTo but it just wont move?

#

I think I am currently encountering this

gusty mango
#

So this is definitely an issue with AI with rootmotion or something. Eventually, some kind of calculated leftover accumulates and the Character will be left trying to hit an AIMoveTo target and keep having to circle it more and more and until it is left in a perpetual loop where it never hits. No matter the Acceptance Radius or other parameters. At first I thought it was because my animation Blendspace was too precise (accurately depicting the speed-playback curve), so I lowered the rates to accommodate. It helped. But eventually it still happened. The lower I set the rootmotion rate than what it "should be" the longer it takes to eventually enter an infinite loop. But it does, eventually, and the Character just keeps looping around the AIMoveTo target forever and never reaching it. Additionally, changing the z-axis rotation rate helps, but it still enter an infinite loop eventually!

uneven cloud
uneven cloud
gusty mango
#

it is a setup that works perfectly for 5-10 minutes, with success every 5-15 seconds depending on the target, and eventually it just devolves into a perpetual "spin around the target"

uneven cloud
#

Did you turn off using the bounds of the agent or the goal in the acceptance radius? Does turning off root motion fix the problem?

gusty mango
#

I mean, turning off the root motion turns off the movement, but in the spirit of the issue description seems disingenuous

#

how do I "turn off the bounds of the target agent"? what would be the implications? sorry, agent

uneven cloud
#

Does it turn off the movement? The point is to pinpoint if it's an AI problem or an animation problem. Using the bounds in the acceptance radius is a parameter in navigation. The problem that you are having is that the AI can't get close enough to the goal, so it'll circle the goal.

lunar grove
#

Ai is not chasing
Does any know what is causing issue with breakpoint not running and EnemyActor NOne & Sight false you can see in video end ?

fluid pine
lunar grove
#

i think something wrong in set value as bool & obj.
which don't understand

lunar grove
fluid pine
# lunar grove

Try this: On the blackboard decorator: Has Line of sight on the details panel ensure that you abort lower priority

lunar grove
#

OK

#

DOESN'T WORK

fluid pine
lunar grove
#

i was following ue5 off documentation quick guide

fluid pine
lunar grove
#

Hmm, than there nothing wrong in doc.

#

Let me check once again

#

AF PC

#

one more question: did this work for you i have use makeblackboardseletor node

#

for location patrol

fluid pine
#

Double check the variables of type name: EnemyActor and HasLineofsight

lunar grove
#

yeah i copy pasted that

lunar grove
fluid pine
lunar grove
#

this one ?

fluid pine
#

The value needs to match

lunar grove
#

with Name variable ?

fluid pine
#

Copy paste from the blackboard and paste there

lunar grove
#

yes, it work

#

Now

#

🥳

fluid pine
#

👍🏾

lunar grove
#

what is wrong with patrolLocation variable

#

its not showing value drop down ??

fluid pine
fluid pine
#

Not sure if that was the question

lunar grove
#

Patrol Location is not working as for me like image above im using makebBselector node

lunar grove
#

Default value is not changable right ?

fluid pine
#

What you can do is on the PatrolLocation variable in the details panel check the option Instance Editable

#

After that go to your behavior tree and select this task and there you can select the dropdown and choose the value that you like

vivid drift
#

I can't find any docs on navlinks. Can someone point me in the right direction?

I have a system of doors that open and close and affect a dynamic navmesh at runtime. I would like to be able to have enemies attack the doors if they need to get through them to reach an opponent.

#

And also don't understand if it's the nav link that would tell the unit to do the door attacking behavior or if it's just the navmesh says you would try to go through here and then another task would need to be triggered that says attack the door

fathom sun
#

I'm trying to create an AI, but for some reason things are called in the wrong order. In my behaviour tree I have 2 node which are connected to a selector node.
The left hand node checks if my character is inside a certain sphere collider, and if he's so, the enemy starts to chase him, otherwise fail and go on the next node, i.e. the right one. The right hand node checks if there is no character in the collider sphere, and if so, the enemy just patrols some area.
The problem is that for some reason whenever my character enters the sphere meanwhile the enemy patrols, the left node (the one for chasing) starts before the previous one gets terminated.
Patrol related functions set a boolean variable which makes the character have a run animation to false, but the chase function sets it to true before calling AI MoveTo function. So I have the following situation - The enemy is patrolling (the boolean variable is set to true), my character enters the agro sphere, the chase function starts running, while the patrol function keeps running, sets the boolean variable to true, calls the AI MoveTo, and only after that the patrol function ends and sets the boolean variable to false, making the enemy have an idle animation.
Any ideas what's wrong?

#

@celest python What exactly you didn't understand?

celest python
#

Basically somehow your bool is not what you wanted to be when your patrolling starts?

fathom sun
#

My bool gets wrong in my chase function

celest python
#

It's very difficult to guess what is going wrong since I can't see your code, did you debug to understand when exactly it's being wrong value after chase starts?

#

and if you are on BT, how do you call AI MoveTo?

#

Arent you suppose to use the BTTask

#

you can just set a service set a boolean on top of the BTTask

fathom sun
# celest python It's very difficult to guess what is going wrong since I can't see your code, di...

Yes, I did debug, by using strings obviously jekithCow
At the very beginning and very end of the functions I have a print string. Chase means Chase function call, Make accel means that the bool has been set to true just before the AI MoveTo, and Patrol Fail is pretty self explanatory.
Given these string I can understand that chase function is called before the patrol ends, I have no clue why it can be a thing.

fathom sun
fathom sun
fathom sun
celest python
#

You have a Chase BTTask right?

#

and when chase is active a bool is suppose to be true

fathom sun
#

Yes, both for chase and patrol functions

fathom sun
celest python
#

alright, instead of setting the bool in the code, you can just create a BTService and set your bool to true there, and on relevancy ceased you can set it back to false

#

No need to handle this inside of the BTTask

fathom sun
#

But the thing is that after the chase function the bool may be true or false, depending on the MoveTo result

#

Because if the enemy will fail to get the player, it has to run back, otherwise stop and do something

#

Is it possible to implement such logic with BTService?

#

I'm pretty new to AI though, just learning a bit about it since today

celest python
#

I think you should just use the Move To task engine provides, is there any reason you are not preferring it?

#

and handle the execution flow based on if that task is failed or not

#

this looks like a choice between handling the logic either on BT or either in BTTask graph, which is both fine and depends on the complexity of the logic

#

BTs will snap to most prior task so its not easy to branch and jump into different nodes

#

meanwhile BTTask are better at this but it has its own disadvantages too since BT is authoritative

fathom sun
celest python
#

Which book is that?

fathom sun
#

UE C++ The Ultimate Developer's Handbook

#

by Stephen Ulibarri

celest python
#

I didn't read it, but I'd say be careful with AI part of the development, you mostly learn UE workflow rather than philopsophy of AI development

#

though anyway, lets get back to topic

#

print this

#

and see if its failing etc.

#

and use visual logger

#

to see why its failing, or succeeding, or something else is happening

#

It's difficult to guess why it could be being false etc.

#

and debug with breakpoints

#

can't say much more than that

fathom sun
celest python
#

first pin

#

the one doesnt have a name

#

I assume thats where you set your bool?

fathom sun
#

Can I send the BPs somehow? Just to make it easier to understand

celest python
#

I think one way or another you'll end up debugging 😄

#

This looks like a debugging issue rather than something is wrong about UE framework

fathom sun
#

Why the chase function is called before the patrol function finishes though? I mean, is it even possible that two different functions run in such a simple tree?

celest python
#

I didnt/dont see a chase function in the images you sent

uneven cloud
clever skiff
#

what the best way getting the ai to shoot randomly towards you?

#

if i get the actor location and plug it in the line trace it to perfect. hit me everytime

clever skiff
#

blueprint.

celest python
clever skiff
#

ok.

celest python
#

Ignore the shotgun part, you just need "random point from circle" part

#

On part3 he explains how to make it more configurable by using curves, if you are also interested

clever skiff
#

alright thanks, been trying to rack my brain around it but bad with the math portion of things

celest python
#

Dw, this one is very easy

clever skiff
#

aight, bet. thanks again.

foggy pike
#

Does anyone have any earthly clue why nav link proxies simply do not work in UE4? I have never ever been able to get them to work in my project and it's super annoying. Like literally the nav link is right there, and he just ignores it. His move commands are just normal BehaviorTree Move To requests too, it's ridiculous. I have tried before to get it working with doors too and nope

#

rubberducked it and I think I know why, when player is spotted he does his chase routine in a parallel

fathom sun
fathom sun
misty wharf
#

That seems weird, nodes should have unique numbers

#

I would try moving or recreating the node that shares the 0 and seeing if it changes because it should

#

actually pretty sure only the root node of the tree should be 0 🤔

#

so if this is a custom C++ node your code may have some bug in it that's causing this

fathom sun
misty wharf
#

Okay, guess it was just a visual glitch with the BT editor then

fathom sun
keen crow
#

I'm trying to get a behavior when NPCs are avoiding going directly through player at some radius but still able to approach the player. I've tried adding NavModifier (and NavInvoker) components to the player character with a custom area with some reasonably high costs and created a NavQueryFilter which I've set to the NPC's controller default navquery filter. And it kinda works if I set the navigation mesh generation to dynamic in project settings but I'd like to keep it at least dynamic modifiers only. But when I set it to dynamic modifiers only the navmesh fails to generate around the player and NPCs can't approach the player at all. What am I doing wrong here?

granite pewter
#

my ai is stuck in root no matter what it wont switch states, the one on left is broken

#

i think my ai is not running the correct tree

#

oh i got it

#

aparently kill player was not working since the ai that was using that code wasnt bfeing casted inside

proven elm
#

🙂

uneven cloud
keen crow
#

Eh, okay, thanks

rapid garnet
#

Hello, people!
Do you know how to implement different navmesh for different AI actors? I want a specific type of AI actors can move through a duct but other type of Actors can't.
Thanks!!

little swan
#

@rapid garnet You can navigate to Project Settings->Navigation System and add additional "Supported Agents" and modify the required properties for each AI archetype there to allow/prevent certain areas for the archetypes. You will probably have to rebuild the navmesh for changes to appear on the map.

rapid garnet
celest python
#

no practical benefit

keen crow
#

what about avoiding casting on tick?

celest python
#

Cast itself almost has zero overhead

#

For BPs it would only matter if you have a lot of same instances of task/service

#

At that point avoid BP not the cast

keen crow
#

and if i'm already in C++? should I cache pointers to frequently accessed actors into TWeakObjectPtr in node's memory?

celest python
#

Caching TWeakObjectPtr is a good idea but not on the header, as a local variable

keen crow
#

how do i cache something as a local variable 🤔

celest python
#

What I'm meaning is avoid accessing your object via TWeakObjPtr's internals since its accessing global uobject array

#

Its still wont generate any overhead at all but you wont call operator[] on array each time

keen crow
#

every time? didn't know it, thx

clever skiff
#

is there anything i need to look out for when my ai doesnt move when i use randomnavpoint. i have a navmesh, and i set blackboardkeyboard vector and set all my nodes correctly. i see the vector being change and the behavior tree is succeeding but the ai is not moving

rancid mulch
#

this seems fairly straightforward. why is get controller returning null when i try to un posses an ai?

#

Do i need to RPC server call this or something?

sly shuttle
rancid mulch
#

I tried a server rpc, and the controller wasnt null, but un possess didn't seem to stop the running AI, should it?

uneven cloud
quaint radish
#

How does this decorator work? Should I be updating the Destination before this decorator? Currently if I remove that decorator everything runs the same. Just want some understanding about this.
Everything is working and would like to make it so MoveTo is interrupted when the Destination gets a new value.
Currently, If I press RMB, Destination is updated, but if I press RMB while MoveTo is running, the AI/BT just ignores this new value and doesnt change where it is moving to. AI just moves to the point it was moving to regardless of me updating the Destination while MoveTo is executing.

uneven cloud
#

Yes the destination needs to be set for the branch to execute. With move to you can have it update when the destination blackboard changes.

queen robin
#

Does anyone know how to stop a MoveTo if the capsule overlaps/bumps into another actor using a behavior tree? All my actors generate overlap, and my MoveTo has ReachTest and StoponOverlap checked. Thx!

ocean wren
quaint radish
ocean wren
#

you should idle in one subtree, then branch into a moveto if the conditions for moving are ok (i.e. has a destination set). The priority should be the thing that changes what you do.. i.e. if moving has higher priority than idling, then you should move.. the conditions for moving being able to take over are having something to move to right? so "aborts lower" should work when move to destination value is set

#

But watch out for those "is set" because last I tried at least, "is set" doesn't mean its actually a valid place.. just means it had a value at some point

#

To handle the moveto destination changing, you can just rerun on value changed

keen crow
#

is there significant difference whether to initialize service's node memory in OnBecomeRelevant or in InitializeMemory?

rapid garnet
# ocean wren Navmodifier volumes are the way to do that, set the navarea type so that only sp...

Thank you so so much!! We could finally make it!!
I'm sending de video!
https://www.youtube.com/watch?v=xwdVQQtQa8s&ab_channel=RamaUE4Plugins

You can download the project I created for this video here:
https://forums.unrealengine.com/showthread.php?3851-(39)-Rama-s-Extra-Blueprint-Nodes-for-You-as-a-Plugin-No-C-Required!&p=350702&viewfull=1#post350702

In this video I show you how to use UE4's AI Nav Modifier Volumes to create custom pathing for different types of units.

▶ Play video
ocean wren
#

Thats the fella

uncut python
#

Hi everyone, Im trying to debug why my AI is moving extremley slow, I notice during game play if i debug the navmesh looks like its z fighting. Could that be the cause?

#

checked my movement compenet and max speed is all setup

#

no collisions are detected

uncut python
#

Nvm its some new UE5 thing u have to check off in char

sterile hill
#

Is there some way to rotate an AI to a specific local rotation? for instance, when I spawn the AI i have them all looking as so:

#

When I move them, they look in the direction they were just moving:

#

I'd like them to start looking the way they were before, once they're finished their movement

#

The only rotation task I see is Rotate To Face task which doesn't help me at all

celest anvil
#

Hey all quick question with anyone familiar with EQS, is it possible to only query specific meshes (so spawn the points only on the surface of a mesh) rather than a radius?

pallid mica
#

You can add your own Filter fwiw

#

Or Test is what it's called in EQS land

celest anvil
#

yea was kinda wondering if I could hijack the eqs system for a demo project to create a priority item decoration system

#

so generate potential spawing locations for props based on input criteria like distance to another prop, proximity to focal point props etc

cerulean girder
#

@celest anvil I've seen someone use the system to test against threat levels for aggro, the custom test would all have to be written in cpp though...i would say its possible

thick ice
#

hey everyone, I currently have an AI build that is supposed to follow the player but also the different enemies are not supposed to overlap each other. but that leads to the enemies jumping around if they collide with each other. how can I change that?

#

As you can see they jump around. My behavior tree is quite simple

rancid mulch
#

If my state switches to attacking, the previous idleWander move to has to complete before i start following the new target. How should I cancel that?

#

I put a 'stop current movement' in the follow service, which did stop the old move to, but it also caused a stutter in the new move to

real dagger
#

hey everyone, im curious to see if anyone here has an idea on how i can spawn a character in UE5?

severe cypress
#

Performance difference with and without AI. Brutal.

civic bolt
#

Hi all, I'm facing this weird issue when using the a Behavior Tree with a Character Movement Component, when using the MoveTo task it doesn't trigger an acceleration value, so in my instance the walking animation doesn't get triggered

lyric flint
lyric flint
civic bolt
ocean wren
# thick ice

Turn off character collision on the character capsule.. use the detour crowd controller for navigation to keep them apart instead.

sudden citrus
#

A plugin for running self-contained behaviour trees etc. Pretty much the pattern that's been becoming the industry standard

#

anyone seen any communication from Mieszko et al about it?

#

Any current work?

harsh storm
#

What do you mean?

thick ice
#

@ocean wren thanks for giving me the clue! 🙂

ocean wren
#

Yeah, honestly, I always thought it was a silly idea to have character collisions like that.. but its REALLY bad for AI, because they get stuck on each other a lot 🙂

sudden citrus
harsh storm
#

I don't know how else to ask to be honest.

sudden citrus
#

I mean - does anyone know if there is any further work planned for that plugin, because it's pretty much a stub. I'd guess it's on its way to be abandoned in favour of an ever-growing mountain of Mass and ZoneGraph work but it's been added to the main branch late 2021 which isn't that long ago

harsh storm
#

A plugin for running self-contained behaviour trees etc. Pretty much the pattern that's been becoming the industry standard
This is what I was asking about

sudden citrus
#

Right, well basically at scale you shouldn't run your entire AI in one behaviour tree, you make one for each behaviour and you manually run them as directed by some other top-level decision system, for example utility logic

#

the idea that your AI should trigger one BT at startup and then run that forever only really holds up for very very simple AI

harsh storm
#

Sure - but as far as I'm aware, you can already do that

sudden citrus
#

and splitting them out into separate assets and using the Run Behaviour node doesn't fix things, you're still running them all in one stack

#

Of course I can, but there is boilerplate to make (currently doing that for work). That plugin is an attempt at having that boilerplate ready for everyone

ocean wren
#

I suspect statetree overtook this

#

They appear to be moving that to production status next release according to the roadmap I read the other day

misty wharf
#

Sure hope Chaos improves

#

The new AI features are kind of interesting but it's being so fussy with Chaos physics for me that I'm currently avoiding it :P

#

I managed to improve it a fair bit by heavily tweaking the settings, but I don't know if it's going to perform really badly or have some other sporadic issues that I currently don't have with physx

ocean wren
#

Why? whats it doing?

misty wharf
#

Things have a tendency to vibrate especially if stacked

ocean wren
#

Ooh, we kind of solved that two decades ago.. you sure there isn't a "go to sleep" value you can tweak?

misty wharf
#

Not an obvious one at least lol

#

I talked about it on the other channels and it was just like "yeah it does that" and "change the <whatever setting it was>"

ocean wren
#

There's usually some number you can tweak that basically says how long things should be simulated before sleeping.. they have the same in physx and havoc

#

havok

misty wharf
#

which did actually improve it but I had to turn it up a lot so I don't know how badly that would end up shooting myself in the foot in terms of performance or such

ocean wren
#

oh righty, yeah, hard to trust shit that doesn't "just work" aint it

misty wharf
#

I wouldn't mind changing settings if they actually had explanations on how the settings affect it and what are reasonable ranges for them for how many physics props and what to expect

#

But there isn't anything like that :D

ocean wren
#

Yeah, that doesn't sound likely ever 🙂

#

We all know how much Epic loves to document systems right? 🙂

misty wharf
#

Considering 5.1 is supposed to bring Chaos improvements I'll probably just give it another go then and see how it is

#

Thankfully porting the project is fairly easy

ocean wren
#

I'm starting a new project with my students in a month or so.. looking forward to doing some dumb game stuff again

#

mostly houdini based PCG and whatnot.. and ML powered PCG plugins for research

misty wharf
#

I'm writing an actual design document for my project to hopefully actually get it rolling into an actual direction again lol

ocean wren
#

shit, you know you're in trouble when you have to write a DD to ignore 🙂

misty wharf
#

hehe

ocean wren
#

I'm mostly just hoping to test out large scale terrains in UE5 right now

misty wharf
#

I don't know, I think it's just that the game is kind of complex and it's hard to kind of have a feeling how to do all things for it when you only have a bunch of random lists and wiki entries describing your random ideas

ocean wren
#

i.e. see how the practical stuff holds up across a large landscape

#

I suspect it'll be a shit show

misty wharf
#

it seems like it should probably work, weren't some of the UE5 demos kinda in that direction

ocean wren
#

trouble is, trying to actually use it properly? I mean do the nav invokers work with the new world system? and one file per actor and all that?

#

plus, I want to run this on the steamdeck eventually.. so that'll be an adventure

misty wharf
#

Ah yeah

#

I thought heard something about not needing invokers anymore with the new system but not sure

solid pond
#

Hey does anybody here know of any good tutorials on making quality ai?

harsh storm
#

Read books. Tutorials won't really do that for you.

#

You need to understand the overall concepts of various types of AI and then implement them.

#

Or just say screw it all and just implement with work, architecture be damned 😅

#

Game AI pro is available for free online. Good enough read

solid pond
#

I’ll check it out ^^

celest python
#

after getting some basics ofc

harsh storm
#

This is still the best overview on behavior trees in UE imo: https://www.youtube.com/watch?v=iY1jnFvHgbE

In this presentation, Epic's Paulo Souza uses Unreal Engine's built-in AI features to build smart enemy behaviors for a game with stealth-like mechanics.

By relying on the Gameplay Framework in Unreal, we're able to quickly create convincing AI using Behavior Trees. Behavior Trees are great for creating complex AI that can be presented in a way...

▶ Play video
quaint radish
#

Any tips for a nav volume that could generate pathing onto a sphere?
Seems I can only get the nav volume to project pathing onto horizontal surfaces, but would like to do that for a sphere/planet instead.

celest python
#

I doubt navigation system is able to do that

deft pumice
#

I wanna give working on AI another shot, I wonder how open world games have free roam AI work.
Like in ue4 we place a volume down and have it calculate all, I’d imagine this would be very costly for a big open world. So how would flying AI in particular deal with that?

celest python
#

Behavior LODding

#

but flying AI is another story

#

its not officially supported

#

so you'll have to roll your own framework

cyan sigil
#

Hi, Slackers. I'm pretty new to AI and am trying to figure out how to structure this behavior tree.

#

It's working okay for now, except that it relies on the FireAtPlayer node to finish execute on tick, so the tree re-evaluates every frame when shooting.

celest python
#

It's fine, BT will reevaluate tree every frame

cyan sigil
#

I thought you can have it stay within a particular task node?

#

Maybe I need a different structure? the problem I'm trying to solve is sending an alert when the turret changes from waiting to shooting.

celest python
#

Depends on what you mean by re evaluate though, BT will always check if more prior node is eligible to execute or not

cyan sigil
#

Maybe I can set the field every tick and just send the alert if the field is different.

celest python
#

Nodes from the left and current node will be evaluated every frame

#

if current one also fails, next one will be counted next frame too

#

until it reaches to the end point

#

this is how BT prioritize the tasks

#

you can't communicate with BT and say "hey you can evaluate the execution flow now"

#

it'll be authoritative about this

celest python
#

you can have that behavior in FSMs, you're the absolute authority with it but it introduces other problems etc.

cyan sigil
#

It seems like a FSM is more appropriate in this case.

#

I wish there were better examples of good AI available.

celest python
#

What you're doing looks suitable for BTs

#

FSM is only required when you need to jump from a node to another node

#

or when you need total control of execution flow

cyan sigil
#

So you're saying I should accept that behavior tree nodes will execute over and over and accomodate them?

celest python
#

Yes

#

They're perfectly optimized

#

You should worry about the content of your BTDecorators, BT's execution flow itself wont generate overhead

#

and if you use BTServices properly BTDecorator's context wont cause issues too

cyan sigil
#

If I understand, BTServices will run repeatedly as long as its task is active, and decorators will stop the task if the decorator is no longer valid?

celest python
#

and decorators will stop the task if the decorator is no longer valid?
If they are bound to selectors

#

Sequence will just skip and fail

#

composites have their own rules

cyan sigil
#

Right, sequences continue until a subtask fails, selectors continue until a subtask succeeds.

celest python
#

Root selector will continue forever

cyan sigil
#

What do you mean? wont it restart if a subtask succeeds?

#

It tries its child tasks until one succeeds

celest python
#

Root selector will be "active" or "relevant" forever and when reached to end point, will restart

#

each frame it tries to select the most left node in the BT

#

by their index

#

if something is found eligible, that composite (be it sequence or another child selector) activates and it does its own thing too

cyan sigil
#

Right, like any selector node. The difference is that since it's the beginning of the tree it will automatically re-evaluate after it succeeds or fails.

celest python
#

Yes

uneven cloud
celest python
#

Observer aborts can influence the execution flow but I wouldnt call it event driven at all

#

There isn't a top-down influence

uneven cloud
#

The tree isn't continuously evaluating. If you are in a move to node, the BT waits until it completes or an observer aborts it.

celest python
#

It's being managed in node's tick function though, not a BT functionality

#

BT calls FinishLatentTask by constantly checking path movement state

#

So until it receives Succeeded flag it waits but still continuously evaluates to switch to more prior node in the tree

uneven cloud
#

It does not continue to reevaluate.

celest python
#

It does though, it even aborts the Move To task

uneven cloud
#

Only if there is an observer abort. The entire tree does not continue to evaluate.

celest python
#

Maybe I'm missing something but I remember UE's BT implementation does not rely on observer aborts for the more prior tasks

#

So even if there isnt any observer flag it should abort the current one and switch to more prior one

#

Unless I'm misremembering they only affect less prior nodes

uneven cloud
#

It does not. "Event driven" is Epic's own explanation of it. Higher priority nodes will only cancel a lower priority node if there is an observer set.

#

"One of the ways UE4 Behavior Trees differ from other Behavior Tree systems is that UE4 Behavior Trees are event-driven to avoid doing unnecessary work every frame. Instead of constantly checking whether any relevant change has occurred, the Behavior Tree passively listens for "events" that can be used to trigger changes in the tree. In the image below, an event is used to update the Blackboard Key HasLineOfSight? . This causes any lower priority Task to be aborted in favor of executing our left-most branch which has higher priority."

https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/ArtificialIntelligence/BehaviorTrees/BehaviorTreesOverview/

Describes the concepts behind Behavior Trees in UE4 and how they differ from traditional Behavior Trees.

celest python
#

So to confirm, TL;DR are you telling me if the MoveTo in the middle is active and if ClosePlayer becomes valid while its active, BT wont switch to the MoveTo on the left and continue executing middle one even thought left one is more prior?

#

Because I think there is a misunderstanding going on, I agree observer aborts can skip the nodes on the right side of the currently active node but more prior ones always must be updated in selectors

uneven cloud
celest python
#

Interesting, if you say so, it's probably true. Actually I switched to FSMs a long time ago, and I remember we needed observer aborts to do that now. I needed a memory refreshing 😄

#

I was even confused about this and asked relevant questions when first time implementing the BTs

#

I remember better now

#

Thanks for taking time 👍

uneven cloud
#

You're welcome. It's a bit confusing, but it saves a lot in perf.

uncut python
#

Is there a way in blueprint to access each polygon on the nav mesh like in an array

uneven cloud
lyric flint
# celest python So to confirm, TL;DR are you telling me if the MoveTo in the middle is active an...

Well the question is also a bit tricky here. Because, Blackboard Based Condition of the most left mode could be set as observer and cancel the middle Move To. But it isn't: check the little description text below the decorator title, if there is no 'aborts' mentioned, it's not in an observer mode, such as it won't cancel the middle nor the right node. Only the middle decorator is set as observer and would abort the most right, if a 'Blackboard value has changed event' is send and the condition of the decorator changes.

unkempt pulsar
#

How can I make crowd avoidance work better than this? I don't like how the last skeletons take such a long time to find a standing spot. I'm using the CrowdFollowingComponent for avoidance

ocean wren
#

switch off collision capsule interactions between them

#

and don't try and make them go to the same spot

unkempt pulsar
#

If I make them chase the player, what positions should they choose then?

ocean wren
#

usually what you want is to choose a spot near the player, I usually use EQS to select the positions near the player within a certain distance

unkempt pulsar
#

And if the player is moving? Do you update the eqs at intervals?

ocean wren
#

There's an EQS generator that forms a ring around the target.. use that and select the position for each one based on closest distance

#

yeah, you can do different things for the generation.. look at the predicted position of the player shortly in the future etc..

unkempt pulsar
ocean wren
#

Yeah, been a while, but that sounds about right

unkempt pulsar
#

Thanks for the help, I will try it out 🙂

ocean wren
#

You might have to tweak the detour values to make them move the way you want to

unkempt pulsar
#

Which detour values give the most impact? I've tried most of them but haven't found any that makes it better

ocean wren
#

You probably saw a lot of issues due to the collision capsules.. once you turn those off you should start to see detour working properly

#

things like how far to sample in front, number of samples etc.

unkempt pulsar
#

How did you learn this stuff? I haven't found that much info about this system

ocean wren
#

You can get the original recast and detour codebase and take a look at how it works

#

I've known Mikko, the guy who wrote it for quite a few years.. so played with the code before someone at Epic used it

#

Mikko's demos are far more useful for understanding.. he used to have a blog called DigestingDuck that discussed the development of the library too

#

And we used to do a few conferences and stuff together, back when aiGameDev.com was still active

unkempt pulsar
#

Interesting, you've been around for quite some time then. Where is the original codebases, and is DigestingDuck still available?

ocean wren
#

it was a blogspot account, so you might have to use the wayback machine

#

the original codebase was on github, I should think its still there.. I think someone else took over maintenance

#

Mikko works at Epic now (back in the day he was at CryTek), so this stuff might well be changed in the future

#

A few months ago he was working on navigation corridors

unkempt pulsar
#

Whats a wayback machine, some software? Is navigation corridors like crowd avoidance?

ocean wren
#

its a website that keeps copies of other websites

#

if you google for it, you'll find it

#

navigation corridors is a way to store navigable space on the navmesh so that you can have crowd agents passing each other I think.. haven't really seen what they're implementing yet

unkempt pulsar
#

So it might be something like how crowds in real life seems to create lanes like this?

ocean wren
#

Yeah, might well be.. we'll have to wait and see I guess.

#

You can follow Mikko on twitter, maybe he'll post about what he's working on

unkempt pulsar
#

This gentleman?

ocean wren
#

Yep

unkempt pulsar
#

Thanks you've been very helpful zoombapup! Me and another guy's working on this game https://store.steampowered.com/app/1830730/UNAKI/ where our main issue is the AI sometimes acting weirdly (like crowd avoidance not being set up great), thank you for taking your time and taking us a little bit closer to the finish line 🙂

Unaki is an action-adventure set on a tropical island filled with cunning creatures and eager adventurers, all in search of the great treasure Unaki, unaware of the island's dark truth.FREE FLOWING COMBAT- Responsive fast paced combat- Weapon types with different attacks- Chain movement-combos to travel fasterUPGRADE YOUR GEAR- Upgrade any item'...

Release Date

Coming Soon

▶ Play video
ocean wren
#

looks good 🙂 nice art

unkempt pulsar
#

Thanks, that's @carmine ruin doing his magic

peak oxide
#

how to make the Attack task to be executed more than once until the wait time finishes

celest python
#

There was a decorator that limits the maximum time can be spent on given composite

#

Time limit or something

#

use it instead

celest python
#

Meanwhile time limit is active you can run attack more than once

#

with a delay of timelimit / numberOfLoops

#

or just use a loop with delay on the beginning

uncut python
# uneven cloud There is not. What are you trying to do?

Essential I’m trying to make a nav mesh like valves where there are different sections on it that have different tags, like mob battleground etc. I could manually do it but having access to each polygon I could assign a role so that it can be done more procedurally. That plus I’d like to use it as a flow map to track progress, as in how far the player has gone in the map, or more so if they’re backtracking or moving forward

peak oxide
celest python
#

then you need the info of how much that attack takes

#

and set the time based on that

peak oxide
#

i meant it takes u out after 3 sec for exampe

uncut python
peak oxide
peak oxide
#

he might attack once or twice

#

idk

#

just the needed time

celest python
#

time limit then? thats what it does basically

peak oxide
#

time limit: limit the time that u stay in a node

ocean wren
peak oxide
#

if a node takes 1 min

#

and u limit for 5 seconds

#

it will go to the next node after 5 second

celest python
#

so you want to range your attack task's time to a specific time?

ocean wren
# peak oxide

Add a time value to the BB which is attack duration.. loop the attacking branch if that value > 0 and have a BT service that reduces the time value over time

celest python
#

what attack task even does? it's up to context

#

playing animation? moving to somewhere?

peak oxide
#

calling it twice call the 2nd animation

#

3rd

#

and so one

celest python
#

ah, I see

peak oxide
#

on*

peak oxide
#

i mean if i am starting the time with 3 every time i get inside the branch

#

i mean the attack sequence

terse panther
#

hey there everyone
any idea why this might give error

if( !SightSense->GetSenseImplementation() )
{
return;
}

its rare but i am getting a crash here

uncut python
#

By writing a function

ocean wren
#

Yeah, don't see why not.. its definitely there in the navmesh code, I use it to grab the navmesh for cover point generation

#

I do wonder if they'll refactor for the new world composition thingy

uneven cloud
uncut python
uneven cloud
uneven cloud
# uncut python Yes kinda what I was thinking. Is there any documentation I can find on it?

There's a bit of documentation on nav areas. It's mostly focused on changing costs, but that's not the only way you can use it. https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/ArtificialIntelligence/NavigationSystem/CustomNavigationAreasAndQueryFiltersLanding/CustomNavigationAreasAndQueryFilters/

This guide shows how to use Custom Areas and Query Filters with the Navigation System.

uncut python
#

Does that sound feasible?

uneven cloud
#

Yes. If you know enough C++, I would hook into the navigation generation and do it when it's generated. You can subclass the nav mesh to add your extra functionality.

ocean wren
uneven cloud
ocean wren
ocean wren
#

at least for navmeshes

#

The whole thing needs a huge refactor to be honest

uneven cloud
#

It does have proper support for world partition. They just didn't need to make a lot of changes.

#

It does need a huge refactor. We switched to Havok AI a few years ago and it's significantly better.

ocean wren
#

Pity Epic doesn't really give a crap

#

I'd think they'd buy in one of the better nav middleware or something, navpower or something

#

I guess in reality every large commercial dev just licenses another solution if they need it

uneven cloud
#

Epic essentially just did a wrapper around recast. And the guy who wrote recast abandoned it years ago. To be fair it's easy to extend, but it certainly lacks the features of all the other available middleware.

celest python
#

When someone abandons Epic with an incomplete feature it takes ages for Epic to start reworking stuff sad

ocean wren
#

They actually employ Mikko now, but still it doesn't seem like they put a lot of effort into AI side of things

celest python
#

I thought they're putting some solid efforts on #mass though

uncut python
ocean wren
#

Its quite weird to be honest

#

or mikko?

#

I don't think Mikko does

celest python
#

I guess GB? 😄

ocean wren
#

oh glassbeaver sorry

uneven cloud
#

Mass and smart objects were made for the Matrix demo, but they aren't even close to the quality of the other systems.

ocean wren
#

erm... good question, I don't think so.. you can get their code off github though

celest python
ocean wren
#

Think so

celest python
ocean wren
#

Apparently smart objects are going to be production ready in the next release

#

I doubt the UX will be very nice though 🙂

celest python
#

I remember they will also finally include multithreading for mass too

uneven cloud
uncut python
ocean wren
#

Mikko was working on the stuff for the matrix demo apparently. Honestly its hard to get a read on what Epic are doing regarding dev.. so many features that seem weirdly managed

ocean wren
celest python
uneven cloud
#

I ended up completely rewriting smart objects, because you couldn't have players and AI use them in multiplayer. And the system is not exactly extendable.

The claiming is not replicated. It's handled in a world subsystem.

ocean wren
#

Yeah, I think for the most part if you're doing professional AI dev with Unreal, you might as well roll your own tech

#

or buy in at least the navigation and roll the rest

celest python
#

Turns out it was very popular already

uneven cloud
#

Nah there's a lot that you don't need to roll your own for. All the other systems are easy to extend.

ocean wren
#

Yeah, Matt knows what he's doing

#

I'd rather roll my own and actually have some usability, I don't much care for many of the setups because they're just not very designer friendly

celest python
#

If you are a slate wizard and have a lot of free time it's fine I guess 😄

#

Meanwhile I'm still trying to understand how to create multiple outputs for a custom BT composite

ocean wren
#

Honestly, slate isn't that bad.. I've been using QT for the last few months.. if you want bad 🙂

uneven cloud
#

I looked into Kythera, but it's usability isn't better.

ocean wren
#

I mean most UI stuff is kind of a sick joke.. but trying to get synchronized per-frame video ouput in a UI seems practically impossible apparently 🙂

celest python
ocean wren
#

QT will give you a signal per-frame, but it actually has another decoding thread, and doesn't advance one frame at a time

#

Yeah, building a viewer for video annotations

#

I mean technically I can do it by just ffmpeg'ing each frame, but I wanted an interactive scrubber

#

I'm even tempted to use a webview control in QT and do the video in the embedded browser.. using a video element

celest python
#

Is this for the pick-up line creator AI you mentioned at the earlier days of this year?

ocean wren
#

Its for a large scale effort to enhance video annotation using multiple ML models

#

based off of the movienet dataset

celest python
#

You work on too many projects haha 😄

ocean wren
#

things like per-frame skeletons, per frame facial features etc

#

Yeah, this is for my main research, although that's kind of sidetracked because I got some money to do a VR based voice-to-scene generator

#

using clip guidance

celest python
#

Nice

ocean wren
#

Got so many ideas right now, but not enough time, or students to make progress on them 🙂

celest python
#

Last time you were thinking about making your students work on Houdini and procedural generation?

ocean wren
#

Oh they're definitely doing that this coming semester 🙂

#

Theyre building a smaller version of houdini in Unity and using Houdini itself in Unreal Engine

#

Because I'm mean 🙂

celest python
ocean wren
#

To be fair, its not that hard.. basically write a single node class that does some simple vector maths

#

But whats good, is that its all unit tested, so I don't have to grade it 🙂

#

a single node class each week, pass the unit tests.. get marks.. easy!

celest python
#

Sounds fun tbh 😄

ocean wren
#

Houdini is a beast

celest python
#

Also unit test idea looks very clever

ocean wren
#

having fun playing with it for my notes

ocean wren
#

Yeah, most all of my students will have never done any Unit tests or CI/CD stuff, so figured it would be good experience

ocean wren
celest python
ocean wren
#

I'm half CS and half Games, but my research is mostly ML and my background is mostly AI 🙂

celest python
#

I think it's quite unique combo 😄

ocean wren
#

Yeah, tell me about it.. hard to get any funding

celest python
#

😄 😅

ocean wren
#

And kind of annoying that games industry doesn't really take ML seriously yet outside of casual games

#

and animation tech I guess

celest python
#

I think your students can come up with very cool things in the future though

uneven cloud
#

We pay attention to ML, but it's not close to being designer friendly

celest python
#

Especially since fresh (and rich funded) studios come up with ML solutions

#

like Arc Raider

ocean wren
#

Yeah, got a masters by research student starting this semester, hoping to do some fun stuff with him

ocean wren
#

in the meantime, its being used in a few places extensively and having quite a lot of $$ value.. so hey ho.

uncut python
#

This actually looks fascinating, I can make tiled sections as a component in bp

uneven cloud
ocean wren
#

Yeah, but you'd expect the CEO to know the direction of travel right? Look at other industry adoption? at least be open to it?

#

I mean this was just wilful ignorance

#

mind you, companies with CEO's who came to be CEO because they were early into the company is probably part of that

uneven cloud
#

It's going to depend on if the CEO started out making games or not. They know the business side and rarely the dev side.

ocean wren
#

Can't really say who it was.. but it was kind of a shock, they'd been in the industry a hell of a long time

#

I'd just assumed that savvy business people would be less conservative I guess

uneven cloud
#

Last year I went to a conference on ML held by Microsoft (I was working at an Xbox game studio at the time). So it's not the entire industry that is dismissive of it.

ocean wren
#

Yeah, I think the bigger publishers have an eye open.. EA Seed etc.. But even middle sized companies seem to be totally ignorant, unless they've got some savvy leadership I guess

#

Its not the whole industry thats ignorant, I know Zynga and the like do a load of ML, but I do worry about the SME's missing out

uneven cloud
#

At the end of the day though for AI behavior, ML is not yet to the point of designer tunable to be useful.

ocean wren
#

I'm not really thinking about it for AI behaviour, I'm thinking about it for tools and design and player modelling and such

celest python
#

I'd appreciate an AI that able to optimize lighting and manage LODding etc

ocean wren
#

and locomotion and learning editor preferences and generating cinematics and scripts

celest python
#

reducing designers "boilerplate" would both decrease development cost and effort

#

considering whats out in the market it doesnt even look difficult to maintain

#

in the end lighting is pure math

ocean wren
#

Well, we'll have some fun messing with it this year so will have a few fun demos to show

real arrow
#

If anybody is going to AAAI this year, i'll be there presenting some AI research I think

#

yeah ML is still a bit too difficult to integrate into games as of yet. I think RL seems to be making some big strides, but we'll see where that goes

#

also neurosymbolic stuff is potentially an option. I've been kinda doing that

#

anything that fuses ML techniques with symbolic representations

quaint radish
#

What scenario would you choose a selector instead of a sequence? I've just tried them in various orders with some waits and move tos and my stuff is breaking lol when im just trying to find the the different use cases.

uneven cloud
uncut python
#

Are there any tips on making pathfinding more realistic and randomized so to speak? My bots all kinda go the same way each time and hug corners, they look like they’re just taking the shortest route each time.

ocean wren
#

Thats exactly what they are doing 🙂

#

What is your use case? we did some stuff like jitter the navigation point of each patrol point for the squad members.. so basically each would get an offset within some radius of the patrol point and go to it.

#

Never give them just one point to go to if you're doing a group

uncut python
uncut python
#

Kind of like I have a 5v5 running and they all randomly pick and enemy to run to. But they all happen to run the same direction and they hug corners lol

#

Something like that might help them look less dumb maybe

celest python
#

This would require some C++ probably

ocean wren
#

It does string pulling as part of the funnel algorithm it applies, maybe you could relax the string pulling per-path?

uncut python
dim lynx
#

what is the difference between On Result Change and On Value Change? I need someone who can explain it to me 😄

#

in Decorators

#

when to use On Result Change and when to use On Value Change, some example

#

'On Value Change' - I think the point is how e.g. a Boolean variable will change to true or false

#

but On Result Change

#

I don't know what doing

uneven cloud
uneven cloud
ocean wren
#

Does that for the whole path once the path itself along the polygon's is found

#

if you follow the code for FindPath.... and see what it does, you should find a reference to string pulling or funnel algorithm

dim lynx
#

I have no idea, maybe someone will help me ... I have a object to which AI is to go and I would like it to walk towards this facility gradually, e.g. every 20 m, a break of 3 seconds and then goes again 20m etc.

#

how can i do that :p

#

I have the location of the object and the current location
AI, what's next?

uncut python
#

But in terms of AI hugging corners and path finding being really weird, I’m gonna have no choice but to go into c++

#

The default path finding is way to robotic looking

#

I mean unless I use EQS to add some calculated randomization

celest python
#

3rd option would be doing what Death Stranding did

#

but what luthage said makes more sense

#

Adding path offset to target movement goal almost always makes a visible difference and very easy to do

dim lynx
#

what is difference

celest python
#

EQS can be a part of BT

#

at most minimal level its just an object that processes the data you give and returns it back, can be implemented to anywhere

#

BTs has Run EQS nodes

dim lynx
celest python
#

It's just easy to design and very powerful, and probably wouldnt matter at lower scale but yeah its more performant

#

since it's time sliced

uneven cloud
uncut python
#

I don’t know if the EQS thing was referring to me, but I think that might be the best route for me to go because pathing in bp is not exposed and C++ is harder to be flexible with

#

Which probably means that I will have to find out some other way to move my ai other than the AI MoveTo node

dim lynx
normal mist
#

Has anyone here implemented some kind of task/order queue in conjunction with state tree or behavior tree?

#

I am trying to wrap my head around this

#

I am using a State Tree in conjunction with MassEntity

uneven cloud
normal mist
#

I think if I learn how MassStateTree manages the lifecycle of tasks, then I can do that manually for a queue

uneven cloud
normal mist
uneven cloud
#

It works great if it makes sense for the behavior you want. It will simplify the tree, but make debugging harder so add good logging. Have good fallback behavior if they don't have a task/order. And my typical advice: keep it simple and only make it complicated when you absolutely need to.

dim lynx
deft pumice
#

I wonder if DONs 3D path finding works with navigation invoking.
I looked into how open worlds deal with navigation, basically creating them around the pawn at runtime.

ocean wren
#

I doubt it

deft pumice
#

Would it be feasible to create my own A* 3D pathfinder for multiple small creatures or would that cause a giant performance bottleneck

celest python
#

Depends on how will you architect it, I'd guess any good optimized implementation would take some at least a few months

uneven cloud
celest python
#

I think 3D navigation data can be asynchronously created when any agent attempts to move somewhere though, if distance is relatively small it can be negligible

normal mist
#

Ruh roh. State Tree stopped opening up after compiling a change to one of my state tree tasks 😮

#

happens for new state tree assets that I make

#

I can't open up any state trees anymore

celest python
#

Remove Intermediates and try again

#

@normal mist

#

and check logs

normal mist
#

Thanks @celest python. I tried deleting intermediates and no dice. I don't see any relevent errors pop up in the terminal in jetbrains rider as I do a debug session. Do you know what log file I'd look at?

celest python
#

if you dont see it on output log, probably you wont find any on other place

#

i wouldnt think something like this be logged as verbose

normal mist
#

this file? /Saved/Logs/{projectname}.log

celest python
#

yes

#

its what output log displays though

normal mist
#

poopenheimer. I tried running a debug session of Debug Editor but it didnt catch any errors

celest python
#

Debug the function that opens the asset editor

#

the on run on double click

#

no idea what/where it is though 😂

#

at this point if no one encountered same error you're up to a hardcore debugging sessions

normal mist
#

lol

#

I even stashed all changes on the project, did a git reset --hard on the engine/editor itself, pulled latest

#

rebuilt the editor..

celest python
#

how about doing a full clean rebuild

#

and maybe backing up your saved folder

#

and removing it

normal mist
#

saved folder in the editor?

celest python
#

Project folder

celest python
#

by the way, did you have reinstancing enabled on live coding?

celest python
#

did you live coded?

normal mist
#

yes, ctrl + alt + f11

celest python
#

i bet it's the issue if you had reinstancing enabled

#

check it on project settings

normal mist
#

reinstancing is enabled

celest python
#

reinstancing == new hot reload

#

Epic bamboozled us by removing hot reload and enabling reinstancing by default

normal mist
#

lol

celest python
#

even if its not the root of the issue disable it to be safe on the future

#

but yeah its easy to blame as hot reload

normal mist
#

good to know, thank you

#

having trouble finding the onrun/double click function..

celest python
#

but you also say you rolled back your changes from VCS

normal mist
#

I found the state tree editor module folder

normal mist
celest python
#

I'm confusion ThonkRotate

#

How about

#

using widget reflector

#

and seeing if widgets are even being displayed

normal mist
#

what is widget reflector?

celest python
#

maybe just some GPU driver issue

#

some tool to debug slate

normal mist
#

holy shit

#

NOTHING OPENS

#

Double clicking any asset, nothing opens

normal mist
#

LOL

celest python
#

time to reinstall the engine party_manny

#

and update your drivers

#

and scream to the void to express your suffering

#

last one is optional

normal mist
#

the screaming sound snice

#

I've been saving the water that I use to pressure cook chicken wings (before I fry them), and I will use that water for deglazing or when boiling pasta or rice

#

Today I double dipped. I use the water that I pressure cooked chicken wings with a few days ago (I store the water in the freezer so it keeps for long time), and I used that to pressure cook the new batch of wings

celest python
#

is there any chance to minimized your windows sooooo small

#

and you wont be able to see them

normal mist
#

I used windows key + arrow key to full screen it and nothing happenned

celest python
#

maaaaybe mouse is not able to focus to the window

normal mist
#

holy shit

#

I opened up a different project, on a version of the engine from EGS (5.03), anD IT HAPPENS STILL

celest python
#
normal mist
#

I wish he replied later saying, "nevermind I solved it!" with no explanation

celest python
#

good news he seems to be an user of this discord channel

#

bad news he has no messages at all

deft pumice
celest python
#

It's a simple approach to this though, not an answer to everything

#

I was meant the theory behind it, (the math + algo) can be asynced easily to improve the perf

#

it relies on volumes to create the 3d path so not very nice

normal mist
celest python
#

so the link was just to provide an example to answer of "would it cause performance issues" question

normal mist
#

Wow they have an awesome icon - Raiden

celest python
#

lol @normal mist

normal mist
#

🙂

deft pumice
#

Ah i see, yea I just need a algo for many flying creatures in a big space.

normal mist
#

OMG

#

I disabled my third piece of shit USB monitor and it works

#

this was never an issue before

celest python
#

no idea though

#

just throwing random ideas

#

What I'd do is do a very wide research of this topic and ask on SO's gamedev topic, then after deciding on a specific implementation I'd constantly bother people in this channel to verify I'm not doing something stupid

celest python
normal mist
#

I documented my scientific findings to the forum in that thread

normal mist
#

ROFL

#

26

celest python
#

if AIs only active around the player you can even have a 3d navigation manager that just creates and destroys path points around player etc

#

which is something would act like an invoker at most minimal level, in theory

normal mist
#

regarding recast nav generation, is there some kind of callback delegate that I can subscribe to to figure out when the navmesh has been generated in that area?

#

I am utilizing the recast navmesh generation at runtime but am completely bypassing the invokers LmAo

#

Going directly to the source

const FNavigationInvokerRaw Invoker(Median, GenerationDistance, GenerationDistance * 5);
for (TActorIterator<ARecastNavMesh> It(World); It; ++It)
{
    It->UpdateActiveTiles(TArray{Invoker});
}
#

I'm using this to pathfind for off-road navigation. I'd like to get the path once its finished generating. However, what I'm doing now, is just continuously rechecking on a 1s interval waiting for it to generate

#

ALSO, it seems to start generating from world origin. This is on a world partition level (ue5). IDK whats up with that, if I am to blame, or where my family has betrayed me

deft pumice
#

That’s smart, in my project you have an airship with which you will explore the skies, I am yet unsure about the size of the environment since I have been so focused on the airships flight system and building aspect.

The 3D algo also needs to work dynamically so creatures don’t crash inside my ship

uneven cloud
normal mist
#

Thanks @uneven cloud. This is on a potentially 32x32km map. Is it feasible to pre-build a navigation mesh to accomodate it?

uneven cloud
normal mist
#

oh cool!