#gameplay-ai

1 messages ยท Page 138 of 1

nova prawn
#

Does not run and shows no output "Hello from Parent Tree"

#

So if its not sharing the same Blackboard the Run Behaviour Node will not run the other Tree.

#

Any ideas why ?

pine steeple
#

Harvester is a child of Master?

nova prawn
#

yes

#

but if they both have different blackboards then Harvester cannot call Master in I tried a couple f different setups.

#

This is what I found out.

#

If you have 1 Parent Tree and then in this example 2 different types of Units (Harvester and Military) you can call the Children in the Parent like so.

#

and then if you get the children to use the same Blackboard Asset as the Parent

#

They will run but the second you try to give children their own blackboard it fails.

#

Even if you try to call the parent in the child it has the 2 blueprints have to use the same blacboards, Which I do not quite understand.

prisma blade
#

Is it best to use custom decorators to apply conditionals to nodes rather than using conditional logic in task nodes which could return the node failed?

pine steeple
#

that is what decorators are for

#

stop access to the lower part of the tree or allow access to the lower part of the tree

prisma blade
#

is there any reason you would specifically want a task node to return failed?

#

or is just there as another way of doing things

cursive vector
#

i made a simple behavior tree where a melee enemy walks to a position near the player based on an EQS query. but the player move around, of course. so during the movement, the player might have moved. what is an elegant way to rerun the eqs and then move to the new goal? i think i might put a bool in the BB, something like "player is still there", then run a service that sets it to false and so cancels the moving. is that a good way?

misty wharf
prisma blade
#

Ah okay makes sense thanks

pallid trout
cursive vector
#

@pallid trout in my game, the enemies currently know where the player is at all time. i put in an EQS query to pick a location near the player and told them to move there. but while they move there the player might have moved somewhere else. so i need to pick a new target location and move there. question is how best to do that in BTs. i now put in a new bool in BB that gets set to true by a service when the player is too far away from the target location

pallid trout
#

oh

#

run the eqs in a service

cursive vector
#

but that wouldnt actually cancel the current moveto task when the target location changes

cursive vector
#

oh, thanks, ill try that @pallid trout

torpid juniper
#

I have a navmesh for a normal sized agent (green) and a big agent (blue)

#

err... nvm I was going to ask why the smaller agent is less sensitive to slopes... but now I realize its just the blue navmesh avoiding the same spots by a wider margin wider actors

fresh remnant
#

Anyone have any ideas for a good algorithm to create jump-links in a nav mesh? Here's what I have in mind so far

  • Every time a navmesh tile is updated, separate tile areas that go together using a flood fill, then loop through the updated polys and if the flood fill group is different, find the closest poly's verts to each other and see if they are within a set jumpable distance. If so, add the jump connection between the two polys. This is slightly worse than an N^2 algorithm, tho the flood-fill-check fast exits out of having to compare verts for all the polys. Slightly worse than n^2 because I have to query more polys than the ones that were updated, have to do a box query on surrounding polys to update them too since their jump connections can change.
#
  • And I'm actually not sure based on the order of updates for the tiles, if the work will often have to be performed twice on the same update because of how the async tasks batches the updates.
misty wharf
#

How would you do multiple sight settings for different objects? Eg. I want certain items to be seen at a further distance, and others at a shorter distance, and some items with a smaller cone, and others with a larger cone

#

I could probably just have two separate AI perceptions for example but that seems kinda clunky

pallid trout
misty wharf
#

Does it make sense to use EQS like it was perception though? Eg. running it on a short timer or something ๐Ÿค”

misty wharf
#

I dunno, is it really meant for that :D Feels similarly clunky as having a second ai perception component

cold trout
#

Have it perceive everything in the furthest radius and only trigger behavioral changes based on distance?

pine steeple
#

@zomg just change the sight angle and length in the perception component?

#

@misty wharf

misty wharf
#

Yeah but then it won't perceive the other things that I'd like for it to perceive at a wider angle/length

#

I just ended up having two separate perception components for it for time being which seems to work but I dunno if that's exactly optimal :P

misty wharf
opal bolt
#

What do I have to do to have Navmesh updates at runtime when physical actors are moving? I have nav mesh modifierd on the physical actors, and I changed relatime Nav mesh settings in Projectsettings to "dynamic". But still I see not that nav mesh is updating when physical actors move.

pallid atlas
#

I have a Character class which is using MyAIController (which uses MyAIBT and MyAIBB). One of the first things I need to do is check a boolean variable that was set upon spawning that Character actor. I'm getting a little confused: I should be using this boolean as a condition for a Decorator I would think, but how can I use a Decorator on the first Selector node if no BB keys have been set yet?

#

Can I just set the BB key before I run the BT (In the begin play of the AIController?)

patent hornet
#

@pallid atlas look into concept of BT-Service

pallid atlas
#

I was able to set that value from the possessed pawn in the AIController, before I run the BT

patent hornet
#

and services attach to nodes like decorators do

#

their purpose is to manage the BB

#

so whats the problem there?

pallid atlas
#

There wasn't a problem once I figured out how to set a BB key from the controller

#

It was just confusing to me, I saw the GetBlackboard node but the input didn't default to (self) so I was confused if it was correct

#

I have another question, though:

Why is the Blackboard even necessary at all?

#

i.e. why not just use the controlled pawn and get/set variables there, in BT tasks?

ocean delta
#

@pallid atlas i don't know the exact reason, but i can try to surmise why. basically, i believe it's a way of provisioning high speed memory for the behavior tree. by using the blackboard and controlling the type of information that can be stored in it, we're able to power hundreds if not thousands of AI using the same behavior tree. each of the separate blackboard instances have a specific size, so the engine can allocate that memory for each AI unit in advance

pallid atlas
ocean delta
#

๐Ÿคทโ€โ™‚๏ธ i don't know to be honest. i'm just letting you know why i think it's used.

do whatever you want. you seem pretty deadset on not using the blackboard.

#

another huge reason to use the blackboard is for easy access to blackboard decorators which you can use in your behavior tree. if you don't use the blackboard, then you'd have to create blackboard decorators that reach into your AI controller. if you're okay with that, then yea no reason to use the blackboard.

simple crest
#

data encapsulation/centralization

#

basic object oriented design principles

#

performance too, and they support the event-driven intent of the behavior tree. you're not going to get things like events on changes to basic variables in a blueprint.

#

@pallid atlas

pallid atlas
#

I'm not saying that I am not going to use it at all... just that, well, the docs and other tutorials I've seen seem to only use BB keys when a BT Task needs to pass information to another task; I'm just saying... if that variable is already in the controlled Pawn, what's the point? just use that and ditch the BB key, right?

simple crest
#

:feelsignoredman:

pallid atlas
#

?

simple crest
#

UE's behavior tree is event-driven... no BB? no events. you're opting out of a certain set of features

misty wharf
#

I use a bunch of decorators that just look at the pawn's state directly and it works just fine that way

#

The BB would just get incredibly full of random variables that aren't used half of the time and a ton of logic to push events when pawn state is updated in order to update the BB variables etc.

simple crest
#

Yeah you're slowing your game down a bit that way but if you only have a few AI at a time you probably won't notice

#

"And a ton of logic to push events" - well as long as you're aware that you traded that for polling variables on tick

Anyway. Blackboards do suck - the fact you can't put complex types in them without nesting in a dummy object, the fact that you can't organize them... But not at least "mostly" using them is bad practice, black & white

misty wharf
#

Yeah it seems like a mixed approach works best

#

I'm using some variables on the BB too, the decorators are mostly used to control the lower branches decision making so they're probably less expensive than if they controlled the branching on a higher level of the tree

pine steeple
#

i always use BB keys inside the BT system

#

yeah it may seem like bloat of having extra keys

#

but works well

low crow
#

Hello! ๐Ÿ™‚
Is there a way of rotation an IA even if the player/another character is really close to it?
My AI doesn't want to do any rotation if the character is next to it...

pallid trout
low crow
#

In the actor of task? @pallid trout

deft sedge
#

anyone here work with gameplay tags on your AI without the ability system? Curious to see what routes people decided to take with working with containers.

misty wharf
#

I'm currently using them with player interaction results which are used in the BT to make some decisions based on what the result tag was

deft sedge
misty wharf
#

my interaction menu is set up so that when the player chooses something from it, it calls and event dispatcher with the tag assigned to the player's selected item

#

I have a BT task for NPC's "Wait for Interaction", which has a BB key selector param, which then gets the interaction result tag assigned into it

deft sedge
#

isn't that too many dispatchers floating around?

misty wharf
#

No, there's an event dispatcher on the interaction widget, which is handled by just whatever is currently being interacted with and then any dispatchers used are removed

#

The wait for interaction BT task has an event listener for an interacted with event on the pawn but it also gets removed once the task is done

#

it's basically like this

deft sedge
misty wharf
#

BB's don't support gameplay tags directly so you can just convert it into a name, I have a separate decorator which compares it nicely with an actual tag

#

like this

deft sedge
#

I didn't realize you could do that though

#

what I was thinking of doing was setting tags directly on the character via an interface or something, but the native one doesn't work like that

misty wharf
#

Yeah your approach is good if you want to compare tags that are assigned directly into an actor or such

deft sedge
#

yeah that

deft sedge
misty wharf
#

Yeah, this is for making choices like "if user selected yes from the menu then do X"

deft sedge
misty wharf
#

What do you mean?

deft sedge
misty wharf
#

it allows me to do stuff like this

#

it chooses the appropriate sequence based on what the result from the interaction was

vast wharf
#

How do you debug AI without Numpad keyboard?

#

Seems like weird hardcoded half finished feature

deft sedge
deft sedge
vast wharf
#

Go it lol, so hacky

deft sedge
misty wharf
deft sedge
misty wharf
#

The menu closes on first click

deft sedge
vast wharf
pine steeple
#

@vast wharf :/

#

๐Ÿคท

vast wharf
#

Thanks, I knew there was a better way

deft sedge
#

does that accept combos?

cyan sigil
#

What's the preferred way to simulate Aim for an AI character? I have projectiles that obey Character rotation but only horizontally.

ocean delta
cyan sigil
#

Aiming with a character in a shooter can be done by camera if player controlled. I wanted to know about doing it for an AI

#

I spent the evening experimenting and I found that while I can set focal point, the AI Controller will automatically flatten it control rotation by default.

#

I may need to override it.

#

It also locks the character rotation to look at the focal target. I need to make them independent, or at least have a better design

unborn jungle
#

Is there any way to stop these warnings when you load a level that has hidden sublevels? LogNavigationDirtyArea: Warning: Skipping dirty area creation because of empty bounds (object: StaticMeshComponent /

opal rain
#

I am using a move to node with a random location given by an eqs task, how could I achieve a more natural path like the on the right side?

simple crest
#

@cyan sigil IIRC if you use set focal point with a target actor it won't flatten it but if you use a vector it will. Kind of stupid

#

@opal rain Simply put you'll have to figure out how you want it to work and code something yourself (or find a solution on the internet), this isn't trivial

balmy geyser
# opal rain Hi!

maybe :interpolate direction that actor walks toward (you'll need to customize charactermovementcomponent for sure )

#

functions that you'll need to override are RequestDirectMove() and RequestPathMove()

opal rain
#

@balmy geyser Thanks, I will try that

balmy geyser
deft sedge
#

where should I ask about eqs stuff? I'm having some troubles getting a test to work.

pine steeple
#

here?

#

also do not cross post into other channels, you asked originally in the correct channel `

meager bobcat
#

is there a way to get an AI to path to somewhere outside the nav mesh bounds?

#

im using nav mesh invokers and they dont go far enough

fresh remnant
#

@meager bobcat no you can't path outside navmesh in general. Why aren't the invokers getting far enough?

cyan sigil
#

Is there existing tech to have a character path along a spline?

meager bobcat
#

because its for the player

#

im doing an RTS sorta thing

meager bobcat
#

Or I mean

#

The nav mesg

fresh remnant
#

@meager bobcat clip it to the navmesh boundary then, on your onclick

#

do a "FindCLosestPoint"

#
        NavLocation.NodeRef = RecastNavMesh->FindNearestPoly(InCapsuleLocation, Extent, nullptr, this);

        if (NavLocation.NodeRef != INVALID_NAVNODEREF)
        {
            if (RecastNavMesh->GetClosestPointOnPoly(NavLocation.NodeRef, InCapsuleLocation, NavLocation.Location))```
#

This is how I get the navmesh I want:

            NavData = Cast<ARecastNavMesh>(*candidateNavMesh);```
#

if u only have one mesh, just grab the first one

meager bobcat
#

Kk

#

Thanks

#

I've got another question, would it be a good idea to just create the navmesh for a 4kilometer x 4kilometer map in the editor

#

The navmesh invoker thing seems annoying

fresh remnant
#

@meager bobcat I'm doing a 40kx40k units navmesh on mine(also rts). Not sure how that translates to kilometers, never got around to figuring that out

meager bobcat
#

I think that's a lot of units

#

It's a 4033x4033 landscape

fresh remnant
#

I figure it would depend on ur tile size(mine is set to 1000) and also your navmesh simplicity/generation settings

meager bobcat
#

Icic

fresh remnant
#

is 1 unit = 1meter? Doesn't seem right compared to models I import, imported models usually like 300 units tall for a human

#

@meager bobcat u going to use crowd sim(detour?)

lyric flint
#

1 unit is 1 cm

#

but really 1 unit can be whatever you make it

fresh remnant
#

yeah, ok so mine is at 400 meters/400 meters technically, but relative to tilesize for navmesh, I have a 40x40 tile navmesh

lyric flint
#

sounds right

meager bobcat
#

Nah what's that

#

Also like rts isn't the right word

#

It's more like kenshi

#

No crowds

fresh remnant
#

Cool, no crowd tho? Still have a bunch of enemies no? squad based

meager bobcat
#

Mayb

#

How's the crowd manager work

fresh remnant
#

Crowd Sim basically keeps them not hitting each other when moving, or when they are moving into each other from different directions. Settings are fiddly but when you get it to work it looks pretty good.

#

@meager bobcat ANovaCharacterAIController::ANovaCharacterAIController(const FObjectInitializer& ObjectInitializer) //: Super(ObjectInitializer.SetDefaultSubobjectClass<UNovaCrowdFollowingComponent>(TEXT("PathFollowingComponent"))) : Super(ObjectInitializer.SetDefaultSubobjectClass<UCrowdFollowingComponent>(TEXT("PathFollowingComponent")))
Opening pandora's box for u ๐Ÿ˜„ jk, it's nice, but has a ton of hidden and undocumented settings

#

sorry that's old, updated with latest code

#

u can override it too if u want more control

cold trout
#

i get a lot of crashes on 4.25 with "An actor of name 'VisualLoggerRenderingActor' already exists in level" whenever using the visual log

#

even in a fresh new level

#

dunno if this is the best channel to ask, anyone else encountered this?

wary ivy
#
Factorio

Last week we mentioned the change to make biters not collide with each other,
but that wasnโ€™t the only biter-related update we released this past
week. Somewhat coincidentally, this weekโ€™s updates have included something Iโ€™d
been working on for a few weeks before โ€“ an upgrade to the enemy pathfinding
system.

Pathfinding

When a unit...

manic karma
#

what in god's name is happening to my navmesh?

#

it's fully built in the level

#

I start the game, and it's stuck halfway through a rebuild??

fresh remnant
#

could be something is turning itself on and off as a nav occluder?

manic karma
#

Even worse, if I move into a bad area, it generates itself in that area

fresh remnant
#

repeatedly

manic karma
#

I don't think I've added anything like that

fresh remnant
#

did u make ur character a dynamic nav occluder?

#

nav obstacle? (so many different terms for it)

#

when they move around, it forces regeneration, etc

manic karma
#

I moved and it generates some more

#

hmmm

fresh remnant
#

does it generate around the character that moves?

#

or always in that other zone?

manic karma
#

well

#

I moved out into a non-genned area

#

and it's genned more everywhere

fresh remnant
#

do you use nav invokers?

manic karma
#

the character is a dynamic nav_obstacle

#

and always has been

fresh remnant
#

so the problem is the red?

manic karma
#

Don't use invokers, I believe

#

well the red areas look like in progress navmesh generation

fresh remnant
#

so the debug view sometimes lies but I haven't seen it lie like that

#

if the character is stuttering, it can continually force rebuild

#

like if it has some walk code that makes it creep on the floor

manic karma
#

it's fine in standard editor view

fresh remnant
#

what's the other view?

manic karma
#

in game

#

this is after I've ran around the whole map

#

the AI can still path through the red in the middle

#

but in any case the nav just stops building until I move over there

#

real odd

#

i changed the recast to fully async

#

and now a red regeneration tile seems to follow my character around

#

you may be right with the dynamic nav_obs on the char

#

removing any navigation affecting component on the player does nothing ๐Ÿ˜ฆ

fresh remnant
#

yeah the dynamic nav obstacle is the red generation following, it probably is the character itself set on "ever affect navigation"

manic karma
#

nah

#

not set to that

fresh remnant
#

something has to be for it to generate that

manic karma
#

give up

#

I've reverted whatever unholiness I introduced into the project and it works fine now

fresh remnant
#

ah hmm, too bad can't compare uasset changes like what you checked off

#

would be super useful sometimes

#

I've done that too...just touched so much that I revert

#

@manic karma so u have a dynamic obstacle on the character still tho?

#

and not seeing red?...

manic karma
#

I feel like navmesh can only take so many changes before it just collapses though

manic karma
#

never been a problem

#

I'm gonna turn it off though now

fresh remnant
#

um

#

check ur navmesh settings see if it's on dynamic generation

#

if you have a dynamic obstacle, it shoudl generate red around the player

#

it doesn't mean it's a bad navmesh, just that it regenerates a lot(and debug view lags, the actual nav gen is super quick)

manic karma
#

yeah

opal rain
#

Hello, I have an AIPerception system with hearing configuration. The AI has to run away from my player when he hears him (that's working good), but if my player keeps making noise and still in range with the hearing system of the AI, the AI will first stop for a second and then will start running again. How can I avoid that stop if the player still in range? Thanks for your help

manic karma
#

show code for logic

fresh remnant
#

Anyone ever turn off overlap event generation to make character movement component faster? And maybe calculated projectile collision by themselves? I'm wondering how that will go.

#

hmm I just turned it all off, seems to save a bit of time (~4ms for 400 moving character components). Now it's mostly physNavWalking and UpdateChildTransforms which I don't think I can really optimize further. Since I don't have many real projectiles in the game(mostly hitscan type), I think I will be ok with not generating overlap events.

robust kelp
#

Is there a way like with Levelstreaming to get a good way to manage ai on a big multiplayer map?

ivory violet
ivory violet
#

Anyone knows if its possible for AI perception sound to be occluded by the wall, so the AI wont hear the noise the player is making if there is wall in between them? Or I have to make custom system for that

lone cloud
misty wharf
#

I implemented this for a project by creating a separate "sound" collision channel and then linetracing when the hearing perception receives stimuli

#

I don't think there's a builtin for it

#

by using the separate channel I could selectively block/allow sound to pass through certain things, you could probably use one of the builtins too but it'd probably block pretty often since a lot of stuff tends to block on visibility or such

lone cloud
#

Hmm

#

So when AI perceived sound it does a line trace to the origin of the sound?

#

And if something is blocking then choose what to do?

quaint hill
#

afaik, it does not to any tracing, only checks distance.

#

you have to do that logic yourself

wind coyote
#

no delay? put the wait inbetween them

fallow hound
#

hi all, I've heard epic has an example project where AI can figure out how to jump between gaps in navmesh dynamically

#

maybe its Unreal Tournament? if anyone can point me in the right direction I'd appreciate it!

lyric flint
fallow hound
#

ah thanks yeah I know about nav link proxy

#

I think UT4 solves that dynamically

#

no need for designer to place proxies

pine steeple
#

it does

#

but it requires some work and UT4 source is old, so you will need to disect it

fallow hound
#

Cool, thanks

fallow hound
#

yeah looks like they really customized the navmesh in ut4

#

looks like it builds a node network on top of navmesh data

pine steeple
#

it does

fallen otter
#

Hey folks, I'm looking for some clarity. I have an entity that I basically wrote all of their ability logic inside their BP. It's unique to them and won't be reused. For example, they have a fireball spell and right now the BP does all the logic to determine if it's on cooldown and who to throw it at. I was wondering if there was a point to split up the logic between tasks and services or if dumping it all into a task would be just as effective. I'm not exactly sure in general why I'd want to create all these BTTasks, Services, and Decos when I could just leave 90% of it in the BP itself and have the BT just run movement. Is perf and EQS really where I'd be getting value?

fallow hound
#

the value of the BT is the BT

#

if you are happy with your logic in a BP, than stick with it

lyric flint
#

I took the liberty to philosophically change the terminology in your paragraph, perhaps it helps clearing up. Or not. ๐Ÿ™‚
I was wondering if there was a point to split up the logic between *specific actions* and *generic conditions* or if dumping it all into a *specific action* would be just as effective. I'm not exactly sure in general why I'd want to create all these *specific actions*, *generic conditions*, and *specific conditions* when I could just leave 90% of it in the BP itself and have the BT just run movement.

fallen otter
#

Those answers did not clear anything up, but i appreciate you taking the time to write them

fresh remnant
#

@fallow hound I just finished a custom jump link thing this week actually. It's a lot of work but the overall concept is straight forward enough: During nav mesh generation callback, you can grab all polys that just got generated, compare that to neighboring polys in the same navmesh tile and adjacent tiles, check poly close enough, save your own custom data of PolyID->PolyID. Then you're going to have to change how dtNavQuery works, and as it loops through the nodes for A*(findPath() function), check for valid jump link based on PolyId it is iterating through and make it iterate through that new neighbor node. And finally, the animation part, I just hijacked Offmesh connection jumps, search for anim->tmax is where they set those things to trigger the jumping positions in detour. And during pathfinding, it checks if it's an offmesh connection, instead, I check if it's a jump link it's trying to go through.

#

the offmesh connections are the manual placed nav links, and you can just use the infrastructure that's there since you are changing it to your dynamic version anyway

fallow hound
#

Very valuable information, thank you!

fallow hound
#

if your needs are complicated, the purpose of tasks, services, decorators will eventually click

#

they are very useful tools to manage complex logic

deft sedge
#

somehow, even with partial paths disabled, my ai gets stuck in an infinite move to trying to reach a point that's about 50 units below them, which exists inside the floor. I have project to navigation enabled as well so I'm not sure how this happens.

Is the only solution to this to put a service that checks if the ai is stuck?

fresh remnant
#

@deft sedge I'm actually not sure for regular path follower, but for crowd follower, I think it just stops if it gets stuck after a while, there's already a check. Do a drawDebugPoint where your goal is maybe to see where the unit is trying to go. Partial paths probably shouldn't be disabled. The AI will try to get as close as it can to the point via the navmesh, but partial paths don't make AI stuck. Usually biggest reason they get stuck is if they wander off the navmesh and maybe start colliding on something.

deft sedge
# fresh remnant <@!180197146627145729> I'm actually not sure for regular path follower, but for ...

it is a crowd follower so this is good to know. However, from what i've seen it never abandons the move order. The agent is well within the nav area, the overlap test is also well within the range. Partial paths on or off gives me the same result with this bug. I like them off due to how I want my ai tree to abort when the path becomes partial.

I have a service which now tells me if the current path is valid or not and what I'm seeing is the "move to" node continues to fire even after the path is reported no longer valid. Could this be an engine bug?

fresh remnant
#

If you're not changing the behavior state after a moveto, it will just go back down that branch and try to go to the target again? If moveto fails, you should handle it by making sure it doesn't go to moveto again and tries something else?

#

In my case, if a moveto branch fails, I clear target position that it was going to, and set its AI state to a 'stopped' state

#

talking about this on a behavior tree level

deft sedge
fresh remnant
#

have you broken into it in a debugger?

deft sedge
# fresh remnant have you broken into it in a debugger?

not currently running in vis so no.

I have a slew of things that should fire if this fails. So I didn't think I'd need to go that far yet.

The circumstance seems to be that the moveto node continues to fire even if there is no path object.

fresh remnant
#

Yeah that's quite odd, usually it will aborrt

deft sedge
rapid ridge
#

Im cheking if the dot product is greater than some value to check if the target actor of the AI is in field of view in a behavior tree service, but even though the prints to the window are correct the behavior tree is acting strange, it switches at a fast pace between true and false whenever the AI is actually in FOV or out of it (also don't worry about the unreal engine scripting language I'm using, the differences with c++ are minimal)

#
{

    UPROPERTY(EditAnywhere, BlueprintReadWrite)
    float FieldOfViewToFilterDotProductBy = 0.5;

    UFUNCTION(BlueprintOverride)
    void TickAI(AAIController OwnerController, APawn ControlledPawn, float DeltaSeconds)
    {
        AActor TargetActor = nullptr;
        UASAIUtilityLibrary::GetObjectFromBlackboard(OwnerController, UKeysFromTestAIBlackboard::TargetActor,
            TargetActor);
        if (TargetActor == nullptr)
        {
            return;
        }

        FVector AIDirectionRelativeToTarget = ControlledPawn.GetActorLocation() - TargetActor.GetActorLocation();
        AIDirectionRelativeToTarget = AIDirectionRelativeToTarget.GetSafeNormal();
        FVector TargetFacingDirection = TargetActor.GetActorForwardVector();

        float DotProduct = TargetFacingDirection.DotProduct(AIDirectionRelativeToTarget);
        if (ControlledPawn.GetLocalRole() == ENetRole::ROLE_Authority)
        {
            Print("DotProduct Value: " + DotProduct + " Logical Value: " + (DotProduct > FieldOfViewToFilterDotProductBy), 10.f);
        }
        UASAIUtilityLibrary::SetBoolInBlackboard(OwnerController, UKeysFromTestAIBlackboard::bAIInTargetFOV,
            DotProduct > FieldOfViewToFilterDotProductBy);
    }
}```
ocean delta
#

i've run into this as well. you can prevent this by adding another sequence in between the nodes and then adding a decorator which prevents the node from executing at all if a condition is invalid

#

i was basically having all kinds of issues like this until i started adding decorators to the behavior tree and making sure that the nodes don't execute unless they absolutely need to

deft sedge
#

i can't get a cap of it, but when I highlight over timelimit it already says it failed with time 0, but the node never stops firing so .... could this actually be a bug?

wide field
#

Hey all, Anyone know of a way to handle AI hearing players above it in multi-floor buildings. I need a way to isolate its hearing to anything on the same level just not sure how to approach it.

pine steeple
#

sound sends in the location

#

so you can just check the Z

little hull
#

This prints right. but set key 0 always. Why?

#

Always goes to reply 0 which have key value 0

pine steeple
#

that callback inside a decorator?

rapid ridge
#

Is there a way to make the "Play animation" behavior tree task replicate to clients or do I have to make my own?

visual marlin
#

Does anyone have some problem with AI Move To that is not working with all characters?

pine steeple
#

no

rigid portal
#

What makes a AI agent move?

#

Thoughts on Agents driven by root motion?

#

Good, bad, no difference ?

cyan sigil
#

Anyone have some tutorials for having AI characters attack or move as a group?

rigid portal
cyan sigil
#

Is "Code like me" a youtube channel?

rigid portal
#

Yup

cyan sigil
#

Thanks. I'll see what I can do.

#

I wish there were more print resources. Videos are a pain.

rigid portal
#

Wrong age for print lol

cyan sigil
#

at least written, in text,

#

So I don't have to scrub 20 minutes of unscripted demo

nocturne ruin
#

So I'm working on a game where I need to make an animal ecosystem (I'm aware that there are other plugins on MP, but I want to make it myself).

Some questions:

  1. How would I make pack dynamics, such as pack of wolves assert a leader. One gets killed, the other run away. Deer travel in herds. Foxes hunt alone, etc. How would I do this in UE4 AI?

  2. Can I store a list of where things are in the blackboard, such as list of water source locations, food locations etc?

  3. Is there anyway to convert into C++?

Thanks

lyric flint
#
  1. Abstractly, you create two sets. Animal type <-> Behavior package. Then you use services ( generic conditions ), decorators ( specific conditions ) and tasks ( specific actions ) to flesh out your behavior that you assign to each animal type
  2. yes, you should be able to assign different types to blackboard keys
  3. yes, but why? ๐Ÿ˜„ (..SomePathToEngine\UnrealEngine\Engine\Source\Developer\AITestSuite\ for C++ examples)
nocturne ruin
#

Thanks! I will try and learn more about this stuff, and then try and attempt this.....

static crater
#

Hi, anyone here knows more about custom A* pathfinding and willing to help me?

old adder
#

Hello, is there anyway for a Decorator to get access to the Task that it is attached to?

fresh remnant
#

@static crater I've done some work on the A* in unreal, what do you need help with?

low path
#

hello chaps

#

my Move To node keeps failing

#

in my behavior tree

fresh remnant
#

MoveTo failing can mean several things @low path, path not found, stuck, etc. what follower component and movement component are you using?

low path
#

there are my stuff

fresh remnant
#

Does it fail right away? Does it walk sometimes?

low path
#

nope

#

it failes

fresh remnant
#

hmm does "GetRandomReachablePoint" need a Navdata?

#

You should print out the point you move to btw, so you know what it's looking for

low path
#

i did

#

it looked fine

fresh remnant
#

can you show navmesh in game?

#

press ` and type 'show navigation'

low path
#

i think i fixed it

#

had to move it down

#

but looking at it move, is there anyway to control its speed?

fresh remnant
#

control the speed with its character movement controller

low path
#

MAX ACCELERATION?

fresh remnant
#

max speed

low path
#

AH

#

caps

#

thanks

fresh remnant
#

there's a walk speed, swim speed, custom max speed

#

crouch speed

low path
#

yea

fresh remnant
#

just make sure u set the rigth one for the movement mode you are doing

low path
#

my tornado needs mega swim speed

fresh remnant
#

it's a tornado moving? interesting

low path
#

yes

#

rn trying to get help with the tornado in #niagara

#

cause i need it to bend and look blended and smooth

flint trail
#

I've been busy making anims for my AI, but now that I am almost done with it, I am thinking about turning in spot again. I found some decent explanation about mixing aim offset with montages and mixing it all with torso/legs split for animation. But all that was only covering vertical aim for player character or AI.

#

When Ai faces target (player or next patrol goal), the whole character turns to face it, right?

#

Does it mean that even if I have aim offset working on the upper body and have legs "stuck" in idle anim, the legs will turn as AI faces the target ?

#

Or will legs remain facing original direction while AI facing the target?

unborn jungle
#

So it seems AI controllers get automatically destroyed when their pawn does which is great, however how come future AI controllers that are spawned have higher numbers next to their name? For example if AI_Controller1 is spawned in the outliner and then destroyed, wouldn't the next one spawned also be called this rather than AI_Controller2?

#

Just want to make sure that they aren't actually hanging around and not properly being destroyed

flint trail
#

no one knows the answer to my question or is it just Mondays are quiet here ? ๐Ÿ˜…

nocturne ruin
#

Btw, I followed the tutorial that Epic Games made for Behaviour tree quickstart, but the problem is that despite following it perfectly, it doesn't result in a working bot. I tried debugging what was going on and triple checked every function, and every detail but it isn't working. I'm using 4.26, and so am not sure why its not working

misty wharf
#

You'll need to be more specific about what the problem is

hollow plinth
#

hello, i'm new. I am currently making cinematic for a project, do i use a.i to make a character move (for example move from a-b)? or are there other methods, thanks in advance!

flint trail
#

@misty wharf me?

misty wharf
#

No, that was for the guy whose name is impossible to type lol

#

Usually messages without @ are in response to directly above, unless you can tell based on context it's for something else :)

flint trail
#

well, do you happen to know about my question ?

misty wharf
#

Sadly no

flint trail
#

aye, np

misty wharf
#

I think there is a separate facing vs focus, eg. if you "focus" it'll rotate its head, but otherwise it rotates the entire thing

#

But that's about as much as I know about that topic

flint trail
#

I think there is only Set Focus node

plush tendon
#

My service don't update the key boolean

#

In attackZone boolean stay to false however i can verify its true by printing it on screen in my Blueprint

#

up there is the service updating the bool key

#

down in blue the decorator condition

#

Fixed , the interval was too short

clever tendon
#

Any idea how to get nav links to work when calling MoveToLocation in a ticking c++ task?

#

Or a simple way to force call Move To node without need to wait for it to finish

bleak plume
#

is recastnavmesh can be on client side when is packaged?

flint trail
#

I've been busy making anims for my AI, but now that I am almost done with it, I am thinking about turning in spot again. I found some decent explanation about mixing aim offset with montages and mixing it all with torso/legs split for animation. But all that was only covering vertical aim for player character or AI.
When Ai faces target (player or next patrol goal), the whole character turns to face it, right?
Does it mean that even if I have aim offset working on the upper body and have legs "stuck" in idle anim, the legs will turn as AI faces the target ?
Or will legs remain facing original direction while AI facing the target?

fresh remnant
#

@flint trail I think it's up to you what you want. If AI is the one that directly turns the movement controller, yes the legs will turn with it. If AI has a custom node to turn only when the angle is too big, then you can put in where it tries to turn the spine a certain angle to face the target and if it's too big, then do the actual leg turn.

#

but for the legs to remain, you have to manipulate the spine bone yourself in the animation blueprint

flint trail
#

right, I see

#

so basically I can't use Focus node ?

#

or just need to decouple AI controller tracking from movement component following AI Controller ?

#

@fresh remnant ^^

fresh remnant
#

focus node I think will force the legs to turn

#

I think make your own node, and ask that node to turn, check the current heading, if the angle is small enough, do a spine twist, if not, do a full focus turn?

#

or u can just use a decorator to check angles, if angle > Threshold, focus turn, otherwise, do custom spine turn

flint trail
#

I see, ok

#

Isn't there a way to decouple AI controller from movement component ? I could have swore at one time I had AI having mesh always facing one way when AI was moving around

fresh remnant
#

yeah it's in the movement component itself

#

you can decouple heading/direction from facing direction

#

use controller yaw or something

cerulean coyote
#

hello
I am trying to make my AI do a sort of "leaping" attack, where he will jump from where he is onto the player and then apply damage.
how can i have the enemy do this so that he travels in an arc towards the players location

#

like this

rapid ridge
#

I'm using RandomBest25pct but I get much more than that in the result of the EQS

          Result->GetAllAsLocations(ResultLocations);
rapid ridge
cerulean coyote
rapid ridge
#

I didn't know about that node either

fresh thicket
#

Hi everyone,
is this the right spot to ask about NavMeshes and Pathfinding? Because I have a problem where some of my selected units just don't want to move and I don't really know where to start looking for the problem... ๐Ÿ˜…
I've uploaded a 20s video to show the problem in action under https://files.mystyx.de/nav_prob.mp4 (beware Mobile Users, 80 MB!).
It would be great if someone could push me in the right direction. Thx! ๐Ÿ™‚

patent hornet
#

@lyric flint its a point of balance

#

having AIController subclasses for characters that share sets of behaviors is a good thing

#

specializing them completely, i think not

#

you might want to separate those

#

animal is not intelligent

#

it decides what to do and how to do it differently

#

our monsters can be categorized in groups

#

dogs, burrowers, zombies, flyers...

#

each of those shares a set of behaviors

#

we have multiple monsters in each group

#

and each group has a controller subclass

#

they decide how and whom to target differently

#

they move differently

#

they path differently

#

that is all in the controller

#

nothing set in stone

#

but it is difficult to juggle potentially lengthy tasks from BTs

#

like movement

#

as the task remains active until the AI reaches its target

#

which can make it a problem for it to do anything else

#

on the other hand, if you're doing something like sims where they go and chop wood

#

integrating movement in the BT is perfectly fine

#

the important part is

#

Pawn knows how to execute its actions

#

and Controller just decides what actions to execute

fresh thicket
#

@lyric flint Hmm... Just an idea: Maybe you could also use the "Run Behavior Dynamic" node to insert BTs into your "main" BT according to whatever your NPC is supposed to do? ๐Ÿค”

thin stag
#

i have a question, maybe somone can help me. Ive started a game on my own and created a somewhat working AI system. Recently i have started a Perforce Server so my friends can work on it remotly with me. everything worked fine until i loaded it to perforce and then Behavior tree is acting weird and wont change tasks. anyone ever had this issue before?

#

it like flickers between two and the AI wont move ๐Ÿ˜ฆ

misty wharf
#

means the task is failing, check that your navigation mesh has correctly generated

opal rain
#

Hello, I am using AIPerception and I am getting a different actor, each time, between my PlayerCharater and GamePlayerController . So when I get the wrong one my stimulus behaviour doesn't work properly. How can I always get my player character? Can't understand why I am getting different results each time. Thanks

misty wharf
#

sight works automatically on certain things like pawns, so if you have other pawns like npc characters they will possibly be perceived as well

thin stag
#

@misty wharf thanks so much i will check that

misty wharf
#

you need to compare the actor to the player pawn, not the player controller.. .it should work then

opal rain
#

@misty wharf Thanks!

fresh remnant
#

@fresh thicket you have your pawns set as a navmesh obstacle/occluder. That's why you don't see navmesh underneath them. They will try to find the nearest point to the navmesh but will oftentimes fail if there is no navmesh to path on. You have to turn obstacle generation off before you issue a move order(set ever affect navigation in character I think, or could be character movement controller), and maybe turn it back on when they stop if you want other characters to avoid it

thin stag
#

@misty wharf THANK U SO MUCH!!! for some reason the old nav mesh was not functioning properly so i replaced it and now it works. ur amazing. i owe ya a beer haha

misty wharf
#

Yeah I've had the same problem a couple of times :) When a move thing doesn't work it seems the first thing to check is the navmesh

thin stag
#

weird, but great to know. i hope u have an amazing day my friend

fresh thicket
#

@fresh remnant Thank you very much! It was indeed a "can ever affect navigation"...^^

jade oak
#

Hey, so I'm having an issue when I set up a decorator, and have the is Set. I am making it check a literal name, and setting it to "CanSeePlayer" which is a boolean. The issue is that no matter when It sees the character it never notices it as "seen" and changes the bool wont change the bool to "true". So it never does that, and it just ignores me and just continues on my patrol path in an infinite loop, rather than breaking it and chasing me.

humble prism
#

wheres the difference between these ?

fresh remnant
#

@humble prism 1 and 2 are the same, gets a random point on navmesh (1 calls 2). 3rd one is get a random point on navmesh that you can reach from your origin(meaning it is not an island and there's a path through the navmesh to reach it)

humble prism
#

I see :o Thanks ^-^

timber mortar
#

can you link a Behaviour Tree to Anim BP? or how would you do it most efficiently?

timber mortar
#

nevermind

prisma blade
#

anyone know if there are any prebuilt components that use boids algorithm for character movement?

ruby bluff
#

does anybody knows hot to make AI to teleport? Navlinks for some reason stop work if their points are too far away from each other.

celest python
wide robin
#

I am trying to enable the EQS (Environment Query System) on my project but can't find it under Editor Preferences (UE 4.26.1).

outer dragon
#

Hey guys, we're having some issues with our AI sometimes not being able to execute the MoveTo player task, sometimes it moves to the player correctly and sometimes it doesn't and then fails, when that happens it will just stand still and stay locked on to the player before giving up. We've tried checking if it can find the player, and it can, but it won't move to it. I've included the stack trace of when the MoveTo fails.

glossy spire
#

@outer dragon maybe one of the actors is off the nav mesh?

fresh remnant
#

@outer dragon type 'show navigation' in the game console and check to see there's a valid navmesh underneath them, make sure actors do not have 'ever affect navigation' to true, it should be false when they move

#

the point that you ask them to move to also has to be valid nav mesh position

rare spire
#

Hi, what is Ai in unreal engine perspective, and what tools use it?

slim dome
glossy spire
#

@slim dome there is a decorator called cooldown

lyric flint
#

Hi guys! I'm wondering if anyone has experience using AI for purposes other than just patrolling around and attacking in Unreal. I want to try and use the AI program to take player inputs from a controller and recognize various combinations to form a sort of vocabulary system. For example, my character would speak 3 different "words" in this speech system I set up and the AI controller would use those "words" to return an item. Or, I would, say, drop a combination of items in front of it, it would read what those items are and act in a way I see fit. (Maybe a certain object in proximity makes it want to sit down and start singing, and adding another flower nearby makes it want to get up and dance, and afterwards it spits out an item.) How would I go about implementing this? Is AI even the appropriate good route?
Basically what I'm asking is, is there a way to create/modify behaviors beyond basic movement/attacking that seems standard with Unreal's AI?

#

I think regex string patterns can help you. You don't need Unreal AI for this though. I'll explain a little bit

#

Say an AI want you to make an omelette for it. So you go, grab the item called egg, The item call frypan, and the item call matches, etc. then you drop these items next to your AI. There is a broadcast event every time you drop an item in a proximity of the AI. The AI checks the names of the items and if it founds all the expected patterns, says thank you. Your items may be chicken egg, duck egg, goose egg. Or ceramic pan, iron pan, steel pan. Etc.

#

and that's it

#

check for string patterns such as egg or pan, and so on

cold trout
static crater
#

Hey, so does AI Behavior Tree actually relies on AINavigationSystem ? could i use it for my custom AI system?

lyric flint
#

Hi all got a question, is there a way to have my AI use rm when there walking around essentially moving

#

I've notices doing 24 frame walk cycle the AI partially looks like it slides slightly

lyric flint
#

Got another question if anyone has the answer.

#

lets say My AI is "Flying" from one level to another. would it be a simple as setting charactor mode to flying in the animation blueprint so it plays a different set of animations

#

also what would be best way to check if charactor is moving from one level to another so that when the charactor jumps the does not see this as a normal jump ??

#

sorry it does see it as a normal jump

rapid ridge
#

is an environment query request supposed to be handled right after the request is executed, or does it take some time?

pine steeple
#

takes time

#

you need to bind to the callback

#

its async

fresh remnant
#

@lyric flint I think most of your questions have to do with animations. The sliding is an animation sync thing to your walk speed. You have to set up animation blueprints that get the character's speed and change the animation timing appropriately. Same with flying, you have to check walk mode, and force that to change animation state to one with flying animations. All of this is Animation Blueprint stuff. Going to have to learn how to set up animation states, transitions, grab variables off the character to time your animations.

lyric flint
#

so i can do pretty much that so that's good

#

was kind of double checking my thinking on the approach was t or at least in the right ball park

#

my plan is to has charactor check wether they are on he floor or flying with line trace

#

and if line trace distance is over a certain amount from when gave started then to set two bool to appropriate values which i'm then gonna have the animation BP force essentally only certain set of animations to play

#

I would think one question though is i will have multiple children from my main BotBase Charactor is cast to the base actor still going to work okay when it's the children of that base actor which are going to be placed around

#

also the charactor sorry is the AI not the player

#

i say charactor as that is what the AI bp are based off

candid tree
#

is there a better way to pause my behavior tree than setting a bool and blocking every sequence on it?

#

like just pause the aicontroller altogether?

fresh remnant
#

@candid tree yes, call "stopLogic()" on brain component

candid tree
#

thanks

fresh remnant
#

when you're done call StartLogic()

#

saves so much cycles/compute when they idle

#

GetBrainComponent()->StopLogic

candid tree
#

I have to possess the character with the playercontroller to use GAS locally so the AI needs to go away for a minute lol

misty wharf
#

Probably technically in the actor.. the code for it goes GetOwner() and uses that

gilded echo
#

Does anyone have any experience with setting up a vehicle to follow a player? I can set it up to follow splines all day and that's been fine, but following the player has been absolutely murderous.
I'm trying to get an AI that will chase and ram the player when possible, but I can't seem to get it to chase them at all. Google only points to two possible answers, both of which are outside my use case and really vague.

fresh remnant
#

@gilded echo If you can follow splines, just plop down spline points every X seconds that is the player's position and follow those points as part of a new spline you make?

#

basically create a dynamic spline that is based on the player's position and follow that

gilded echo
#

And that's usually only if the player does some kind of crazy maneuver that results in loss of speed

fresh remnant
#

@gilded echo That's kind of realistic right, a person can probably dodge a car better than a car can try to run him down if the car isn't already going super fast with the player having no time to react

#

so what I would do is this, take the player's position + velocity*(deltaseconds into the future) and that gives a point where the player "Would be" in the future

#

and make a spline from that

#

you will always try to run towards the player's future position, and the player can only juke it if he fakes the car out and doubles back real quick after the car has almost completed it's path

gilded echo
ocean delta
#

is it possible to store a gameplay ability spec handle in a blackboard?

#

nope, looks like there's no way to store structs

simple crest
#

But you can store custom classes with struct in them smoothbrain

ocean delta
#

yeah that's a good call

#

i guess i'll try that

little valley
#

Hey there. I'm having an issue with navmesh smartlinks => my object overlaping with the starting smartlink node is not recognized as an agent. What is considered an agent ? How could I add this state to any object ?

#

(the object can use the navmesh successfully and is considered as an actor)

#

(I'm using BP and the event ReceiveSmartLinkReached)

rapid ridge
#

I have an environment query, and I have a Max Distance in a Test to filter out locations of the grid that are outside the distance, but the test doesn't seem to filter distances out of range

pine steeple
#

@ocean delta why do you need to store the handle?

jolly knoll
#

hello i am trying to make a new task in my AI behavior tree and when i click the new task button it just gives me this drop down and doesnt make a new task

#

can anyone help me fix this?

misty wharf
#

click on BTTask_BlueprintBase

jolly knoll
#

Oh!

#

thank you!

#

i am new to making AI still a lot to learn haha

misty wharf
#

yeah it's not super obvious :) You can also create them from the content browser similar to other assets, they should be under the AI menu in it

jolly knoll
#

i tried that but i wasnt sure what exactly to pick

#

and under AI it doesnt give you the option i believe its under blueprint

misty wharf
#

Oh yeah you're right, misremembered it

jolly knoll
#

lol no big deal, thanks for the help ๐Ÿ™‚

ocean delta
urban wadi
#

What do you guys recommend using for AI states ENUM or Blackboard variables

#

?

patent hornet
#

gameplay tags

urban wadi
#

@patent hornet so is your AI in BP or C++

real arrow
#

i've had this question for a while, does anyone know the difference between observer aborts self vs observer aborts both

#

@urban wadi I'm not advanced to know if there's any difference performance wise, but if performance doesn't matter then it's really up to your both work equally well but if you are using a behavior tree blackboard variables might be better as there are additional options you have

#

I'm assuming by enum you mean just using a normal variable

vocal sinew
#

Hi guys, I'm trying to use Sub Behavior Tree to run a certain state of a character. But subtree never executes it's sequence..

What may be the reason?

wise iris
#

That's a requirement AFAIK

#

If so, are you confident the BT itself is running?

#

What happens when you run it, does it actually show the flow here?

vocal sinew
#

Yeah, I didn't have the same Blackboard.. Thanks

untold whale
#

I need some help, what is the best way to make an (ranged)npc from stopping a certain distance from the player, because this service barely works properly.

misty wharf
#

If you're using move to, have you tried increasing the acceptable radius to whatever distance you want it to stop at?

#

That service looks like it should work though ๐Ÿค”

#

Or rather, it probably should run that on the service tick event so it tests it more than just once - iirc activation only runs when the node where the service is gets activated

untold whale
#

moveto sets a radius which allows the npc to move anywhere inside that radius, which is not the desired result of allowing a ranged npc to run in melee range completely ignoring the service condition.

misty wharf
#

Ah right.. well in that case try changing that service so it runs that logic on tick, I think that should make it work correctly

#

at least based on that pic I'm guessing that's the problem

untold whale
#

il try it out, thanks

charred lava
#

I have a BTTask that activates an Character Ability and on Finish Executing it calls my BP_AIController function "OnAbilityUsed" which sets a Timer, that when finished sets a Blackboard bool value "CanUseAbility" to true, so the AI doesn't spam abilities one after another.

My Implementation has a Circular Dependency (BP_AIController -> BTTAsk_UseAbility -> BP_AIController)
which I want to avoid.

Now my question, how do I set an asynchronous task (which won't block the flow of the behaviour tree) that just flips a blackboard bool after some time?

#

Services seems to be the way to go with Asynch actions, but I want a one time action and not a repetitive ticking one. How can I solve this?

ruby bluff
#

Is there a way to affect SmartLink's participation in pathfinding for a specific pawn? I've set up a jumping navlink, connecting two platforms, one being 300 units above other, and storing that height in itself as a float. Now my AI correctly notices and attempts to use the smart link, but one ai's jump height is 100 units while another is 400 unit. How can I make only the second AI to view the navlink as a viable pathfinding route and first AI to view the link as an impassable route? It just perpetually stuck, trying to go through the navlink despite being unable to jump that high and ignoring the alternative routes.

fresh remnant
#

@ruby bluff you using crowd follower?

#

I remember looking over that code in crowd follower at least, it didn't look like it ever used agents jump height, it's not even a part of the agent's data in detour.

#

one way to force it is using nav filters for agents, and setting that particular navlink with a poly underneath that it can't /shouldn't get into

#

I ended up changing how navquery findpath worked instead in c++

ruby bluff
fresh remnant
#

yeah I'm not sure what the regular path follower does actually, I don't think it would check either though

#

nav filters is probably ur best bet, maybe there's a way to include it as part of th efilter somehow that I don't know

ruby bluff
#

It amazes me how UE is so advanced in some areas while being completely neutered in other areas.

#

Well, for now it seems like I managed to fake what I need by turning off the smartlink for a split second when AI reaches it and tries to go through.

rancid haven
#

I cannot for the life of me get this simple behaviour tree working

#

Not sure How to debug it

#

I have the BT open, and it just flicks through all the branches

#

No the Wait

#

So its not getting line of sight

#

Which is not something I care about anyway

#

But it doesnt ever happen

#

I dont know how the enemy actor is set

#

The value of it is actor

#

Yeah I understand that.

#

But I cant see how to set it to the player character

#

Oh dear lord

#

The key attached to Set Value as Object

#

It was this bit

#

Guide wasnt super clear on that.
That or I'm just blind

#

So. My problem is.... I am unsure as to why that works now.

Why it functions that way

#

We are setting the value of the key name to Enemy Actor...

#

OK. I think that makes sense

#

I now want to remove the line of sight, and make sure that the AI will always move to the player

echo eagle
#

Hey Guys... Don't know if this is the best channel BUT...

So, i'm making a simple AI character to my game but i didn't even started the AI programming and there's a problema that's boggling my mind
When i walk to the character it's like i push him and he jumps away when both bump.
I searched for this but i didn't find any solution that worked on me.
I tried deactivating ALL physics and collision things but none of it worked.
Do anyone know how to solve this?

#

gonna send a vid

cyan sigil
#

Where is a good resource for information about AI that's deeper than "Move to where the player is" and "This is how EQS works"?

#

I am attempting to make a relatively simple AI that seeks the player when they go out of sight, but I'm having a tough time deciding how to organize the data in AI controller vs Blackboard, etc.

cyan sigil
#

Like, is it usually better to have unique blackboard keys for all reason a character might want to move? Or should I have one MoveTo key and manipulate it via AI Controller/BehaviorTree?

candid tree
#

I'm not educated in AI design or experienced in UE4 but from a general design perspective, I'd try to find the set of variables that spans all of those behaviors and then reduce it to an outcome in the behavior tree

#

so everything like "what enemies can I see," "how far away are they," "what are my current needs," "what items are in reach" etc. Then in the behavior tree make decisions about what your highest priority goal is from that data

#

so instead of like, keys for reasons to move, more like keys for stimuli that might produce a reason to move

fresh remnant
#

@cyan sigil I've seen more have keys that can be pass between different nodes, less unique keys

cyan sigil
#

I see. Thanks.

#

Currently wrestling with an EQS that is making the character wiggle back and forth

#

I am trying to use the EQS Testing Pawn. I can configure distance values but not populate blackboard values. Any idea how to do that?

#

The AI Controller doesn't have a blackboard.

#

Anyone have advice on how to configure EQS Testing pawns to use EQS that require knowledge of other actors? They don't seem to start with a blackboard. My current idea is to adjust my custom context (that simply retrieves an actor from the blackboard) to detect if it's being used by an EQS Testing Pawn, cast to a subclass of my own device, and retrieve configured values.

cyan sigil
#

Unless it's possible to make and edit an arbitrary blackboard

#

Second question: is there a way for an AIPerceptionComponent to ignore particular kinds of actors instead of treating them all equally? My AI is now noticing my EQS Testing Pawn and treating it as a target.

lyric flint
#

Implement some logic e.g. Pseudocode

if (GetGroupId(oCreature) == GROUP_HOSTILE) //we care only about hostiles
{
  //do stuff
}
#

You can set up your own keys via C++, e.g.

FBlackboardEntry KeyData;

KeyData.EntryName = TEXT("TargetToFollow");
KeyData.KeyType = NewObject<UBlackboardKeyType_Object>();
Cast<UBlackboardKeyType_Object>(KeyData.KeyType)->BaseClass = AActor::StaticClass();
BlackboardAsset->Keys.Add(KeyData);

BlackboardAsset->UpdateParentKeys();
thorny jay
#

Hi all, I have a really odd problem with EQS queries. I am using an AI Service to run a query to help the AI determine where they should form up, which runs an EQS query and then binds the OnQueryFinished handle to a custom event like so:

#

The problem I have is that if I have 8 AI in a match, then the custom "Company Position Finished" event never gets called

#

The AI just sits around

#

If I have 6 AI in a match, then it gets called just fine

#

and the AI take up positions as expected

#

I thought maybe the EQS was too heavy and was timing out with 8 AIs, so I tried reducing the number of points it was generating down to 1/4 of what it was, but it still happens

#

This is the profile for the offending query (the selected one):

#

Doesn't seem like it would be chugging things too much

#

I tried deleting all my binaries and recompiling the project from scratch, still doing it

#

Any ideas on what could be causing this? The truly bizarre thing is that this service has been working just fine for weeks with any number of AI, and suddenly it no longer works. The only changes I could have made would be to OTHER services or EQS queries, which to my understanding shouldn't be impacting the functionality of this EQS test...

thorny jay
#

I just tried several things, including reducing all the EQS tests down to just scoring by distance to the querier and returning the best item, and running it as a task in the behaviour tree rather than within a service, and the EQS query still never finishes. The tree just gets stuck on the run EQS query permanently. Is this an engine bug? I just don't understand why this would be working fine one day and suddenly it's so broken I can't even get a simple EQS query to complete the next...

charred lava
#

I have a BTTask that activates an Character Ability and on Finish Executing it calls my BP_AIController function "OnAbilityUsed" which sets a Timer, that when finished sets a Blackboard bool value "CanUseAbility" to true, so the AI doesn't spam abilities one after another.

My Implementation has a Circular Dependency (BP_AIController -> BTTAsk_UseAbility -> BP_AIController)
which I want to avoid.

Now my question, how do I set an asynchronous task (which won't block the flow of the behaviour tree) that just flips a blackboard bool after some time?
Services seems to be the way to go with Asynch actions, but I want a one time action and not a repetitive ticking one. How can I solve this?

thorny jay
#

Ok I found the answer to my problem. The DetermineBestEnemyLineMelee query in my above screenshot was extremely heavy on resources and was presumably blocking other EQS queries from completing within a reasonable timeframe. That query was running a pathfinding test against a batch of character references to ensure the AI doesn't try to engage targets in melee that can't be reached, and that test on its own was more expensive than the entire FindOpenCompanyPosition query! Does anyone know why this is? I presume it's not using hierarchical pathfinding to test?

misty wharf
#

@lyric flint isn't there a Loop decorator?

slim dome
#

Hello! My AI is getting stuck on a nav link proxy ONLY when it runs.

#

Any ideas why?

#

That's the video of the issue, the issue occurs at 0:20 but before that it shows the normal behavior (when it walks)

pine bolt
#

anyone know a good way to setup a smooth 360 degree rotation on a behavior tree task with blueprint?

pine bolt
#

@slim dome is the only way to navigate the obstacle by the nav link? If there is a navmesh under the door could the cost of taking the link proxy be higher when running and therefore it just tries to run through?

slim dome
glossy spire
#

Is it sane to have a service or decorator that resets properties just in case a BT sequence is interrupted? Or does that indicate I'm doing something wrong...

#

For example I have a character who changes their idle animation while doing something, but is interrupted by a stun

pine bolt
pine bolt
opal rain
#

Hello guys, How can I have a spline based movement for ai using BT?

pallid trout
glossy spire
#

@opal rain spline components have a function to get the location at a given distance

slim dome
#

Hello, me again. I have a strange issue. When I first boot up my UE4 project, my AI doesn't take the nav link proxy I set up for him. But if I play the game like 5-10 times, it begins to work and every time after that it works without issue.

plush tendon
#

My custom task never finish

#

its stuck on launch firebolt

#

How to end a custom task?

#

found

verbal violet
#

Hi people i have a problems with Detection by affiliation. I've override methods GetGenericTeamId (in EnemyAiController and PlayerCharacter) and GetTeamAttitudeTowards (in EnemyAiController ).
I had also set true ONLY on Enemies in Detection by affiliation in AIC_CH_Enemy (BP of EnemyAiController).
I have two "room" separated by one wall and put same enemy in each room, when I remove wall (in runtime) they wouldn't see each other by this setup?
Because they still CAN see each other

#

Idea is to make feature where my player can temporarily to "possess" enemy, to force it to fight against its friends

#

so i need easy way to switch side/team of enemies

#

i understood that if I put they in same team OnTargetPerceptionUpdated not be executed anymore for Friendly actors if I previously set set true ONLY on Enemies in Detection by affiliation in AIC_CH_Enemy ?

#

Does I not understand something or this just doesn't works?

#
misty wharf
#

Not sure but I seem to recall someone mentioning the point one can return things that are navigable but not reachable... The naming is definitely pretty vague so might be a good idea to just look at what it does in C++

lyric flint
#

Perhaps you found the answer already, but Point one is deprecated, and currently points to Location one

    UE_DEPRECATED(4.22, "This version is deprecated.  Please use GetRandomLocationInNavigableRadius instead")
    UFUNCTION(BlueprintPure, Category = "AI|Navigation", meta = (WorldContext = "WorldContextObject", DisplayName = "GetRandomPointInNavigableRadius", ScriptName = "GetRandomPointInNavigableRadius"))
    static bool K2_GetRandomPointInNavigableRadius(UObject* WorldContextObject, const FVector& Origin, FVector& RandomLocation, float Radius, ANavigationData* NavData = NULL, TSubclassOf<UNavigationQueryFilter> FilterClass = NULL);

bool UNavigationSystemV1::K2_GetRandomPointInNavigableRadius(UObject* WorldContextObject, const FVector& Origin, FVector& RandomLocation, float Radius, ANavigationData* NavData, TSubclassOf<UNavigationQueryFilter> FilterClass)
{
    return K2_GetRandomLocationInNavigableRadius(WorldContextObject, Origin, RandomLocation, Radius, NavData, FilterClass);
}
lyric flint
#

is there a way I can see that without looking up the C++ for every node?
I don't know :(, I do pretty much everything in C++, but I used Total Commander for 25+ years to search for strings in files/subfolders, so it's very fast for me to look anything up ๐Ÿ˜„

#

can I somehow call a BTTask from another
For sure you can do this C++, but I don't think it's the desired design, the tasks are meant to be the differentia with no overlap or direct connection to each other without a genus/parent (Apologies, I am using my own familiar concepts from logic Genusโ€“differentia)

#

Meaning to be atomic and not divisible in nature

#

Hello. How can I adjust navigation bounce volume in order to make navigation more detailed , wider. Where is this setting. Thank you in advance.

misty wharf
#

Been wondering about this as well... I'd imagine there might be a tiny overhead from having the node ๐Ÿค”

lyric flint
#

@lyric flint Thanks found it

pine bolt
#

hey my ai character keeps getting stuck on these arched doorways even though my navmesh radius is set correctly, any thoughts? I am using moveTo behavior tree component and it seems to run outside of the navmesh

dusk kelp
#

Hi guys. Is there any function that will fail all AI MoveTo's to the actor?

#

I just have pawn that moves to other pawn and I want second pawn to be able to fail first pawn's movement

pine steeple
#

AICOntroller->StopMovement

fresh remnant
#

maybe remove the wall and see if it's a navmesh issue vs. a collision geometry issue

#

(well the wall is needed to generate the navmesh maybe)..maybe make the pawn collision really small. Navmesh uses agent radius to generate, but if your actual agent radius is bigger than the one used to generate, or there's a vertical collision that it doesn't account for, then you will get stuck

plush tendon
#

I need help please , the node "findPathToActorSynchronously" always return an invalid object , even if this ennemi can moveTo his location

#

I have tried to print the last index of the points array , its always 0,0,0

#

because the path returned is invalid

#

the function getPathLength returns always -1

lyric flint
#

You are correct. The overhead, if any, is asymptotic to zero, there is no valid scenario (that I can think of) where you would end up with a complex tree where the quantity of GetNextChildHandler that queue up during the tree evaluation would have an impact on performance, as it's basically performing a handful of operations on ints. I think ๐Ÿ˜„

pine bolt
#

Ok, I know I am passing the correct location to go to. Yellow circle is where it started, and was supposed to move to the other group of circles (specifically the purple one is casted to navmesh), instead it runs backwards and up the staircase to the upper level of the building. Any ideas? I've been stuck on this for about 8 hours ๐Ÿ˜ฆ

#

This is my blueprint for move to location

real arrow
#

@pine bolt just check what the other messages above were saying, it seems like itโ€™s not a code issue but is a nav mesh/collision geometry issue

pine bolt
real arrow
#

oh, weird

#

if there's no vertical collision or some invisible collision and your radius is matching the radius navmesh is generating then I Don't know

#

and your actor is actualy using that navmesh and not something else

thick surge
#

Hey guys can you use the eqs test of gameplay tags on blueprints ?

misty wharf
#

You probably have to implement IGameplayTagAssetInterface or whatever it was called, which can't be done in Blueprints. However, you can create a C++ base class which implements it, and then have a BP class extend it

thick surge
#

@misty wharf Is there a way to just use regular tags ?

misty wharf
#

afaik no unless you implement a custom EQS test which looks at those instead of gameplay tags

wise iris
#

I remember that post ๐Ÿ˜„

#

There's 3

misty wharf
#

hmm?

wise iris
#

Don't have editor open, but IIRC:

Navigable:
1 - Pure
2 - NonPure

Reachable
3 - Separate function

misty wharf
#

Ohh right

#

yeah the guy with the difficult to type name said the two nodes are the same, the other one's just deprecated

wise iris
#

the guy with the difficult to type name
๐Ÿ˜†

lyric flint
#

heh

plush tendon
#

Anyone please?

verbal violet
#

Hi people, does anybody knows is there some easy way to reset ai perception component? I succeeded to change team of one my enemy and it start attacks its teammates but only if it hasn't seen them before, so i need a way to clear already seen characters (Updated Actors in OnPerceptionUpdated to be empty)

thick surge
#

Hey guys how can I project a location I have to the nearest navmesh point ?

wary ivy
#

there should be a project function

#

it takes maximum extents as a parameter

#

at least in c++ side there is ๐Ÿค”

pine steeple
#

same in BP

gentle smelt
#

Hello everyone!

#

May somebody help me?

#

I write a custom sense for AIPerceptionSystem on c++

#

And on the method RegisterStimulus from FPerceptionListener i have a strange exception

#

Array index out of bounds: 13 from an array of size 13

#

Provided that I use: for (auto &Hit : HitResults)

#

This is problematic block of code

#

Thank you in advance for your attention))

wooden brook
#

Anyone know how you can temporarily disable a nav link proxy entirely (without actually deleting it)? Using the "Set Smart Link Enabled" to false does not seem to do the job, unfortunately, and I can't access the PointLinks from blueprint (maybe cpp) to try and modify the area class to Null

#

Would like the AI to ignore it entirely for their pathing/route calculation

shell dock
#

ah i guess you can create your own nav link proxy BP and change the supported agents?, but i am not that familiar with nav links atm

wooden brook
#

Whoops. Didn't realize it but there is a simple point link made by default in the base class. Deleting it and then just using smart links allows you to enable/disable properly it seems. Seems the simple link still gets used despite smart link being enabled/relevant.

wooden brook
#

Another strange issue that I haven't seen online.... If a pawn is inside a nav mesh obstacle, there is a pretty severe engine hitch while the nav mesh is rebuilding? anyone else ever notice that?

misty wharf
#

I guess it's possible it'd hitch if something triggers a complete navmesh rebuild

#

But having a pawn inside an obstacle shouldn't do that unless the pawn is set to affect navigation, which seems it could be an error if it is

wooden brook
#

As far as I can tell, the pawn does not affect navigation in any way. The capsule component is listed as an dynamic obstacle as well, but disabling that does not remove the hitch

misty wharf
#

does it have "affects navigation" ticked?

#

(might not be called exactly that)

wooden brook
#

It did not. Turns out my nav mesh generation somehow wasn't being done asynchronously... enabling "Do Fully Async Nav Data Gathering" under the projects Navigation Mesh settings fixed the issue. Not sure if its enabled by default, and if so, how it got disabled ๐Ÿค”

glossy spire
#

Hey folks, I'm having an issue where my custom decorator isn't resetting its values after each use

#

Basically I'm trying to have it conditionally allow a loop decorator

neat parrot
#

DOES ANYONE KNOW WHAT HAPPENED TO THE AI EQS SYSTEM ENABLE BUTTON? im using 4.26 and its not there anymore under editor preferences???

patent hornet
#

maybe they decided that 13 versions is long enough for it to be experimental?

thick surge
patent hornet
#

you can't

#

it will take the smallest profile it fits into

wooden brook
#

@analog mural not sure how your "ChasePlayer" works but if it's really just a simple move too it's probably because it's reaching the player and finishing execution without the melee ever executing. It looks like the tree does execute but your cooldown then also blocks for a small amount of time too. You should probably update the player location in the service maybe, or store a reference to them in blackboard, and use that in the move to. Perhaps put your melee as the last thing in the sequence, and get rid of the simple parallel?

swift bolt
#

Is it possible to invert a nav mesh block volume ?

#

So that the area inside is Green and everything outside of it is not green

eternal grotto
fathom cobalt
#

Anyone knows how does AIperception detects sound?

lyric flint
#

Maybe AISense_Hearing via FAINoiseEvent gives you an idea?

fathom cobalt
#

not really

#

I just want to print a message if the AI hears something

lyric flint
#

In simplest form is distance to sound, hearing range and loudness.

#

If your AI is 300 m from the sound. And its hearing range is 290 m, Then fail if loudness is less than 10 and succeed if more than 10.

#

This is just conventional methodological math operations, because of course the AI doesn't hear a sound like us ๐Ÿ™‚

#

so it's up to you, but the gist is the above...

#

This is the relevant code from AISense_Hearing.cpp

        for (const FAINoiseEvent& Event : NoiseEvents)
        {
            const float ClampedLoudness = FMath::Max(0.f, Event.Loudness);
            const float DistToSoundSquared = FVector::DistSquared(Event.NoiseLocation, Listener.CachedLocation);
            
            // Limit by loudness modified squared range (this is the old behavior)
            if (DistToSoundSquared > PropDigest.HearingRangeSq * FMath::Square(ClampedLoudness))
            {
                continue;
            }
            // Limit by max range
            else if (Event.MaxRange > 0.f && DistToSoundSquared > FMath::Square(Event.MaxRange * ClampedLoudness))
            {
                continue;
            }

            if (FAISenseAffiliationFilter::ShouldSenseTeam(Listener.TeamIdentifier, Event.TeamIdentifier, PropDigest.AffiliationFlags) == false)
            {
                continue;
            }
            // calculate delay and fake it with Age
            const float Delay = FMath::Sqrt(DistToSoundSquared * SpeedOfSoundSqScalar);
            // pass over to listener to process             
            PerseptionSys->RegisterDelayedStimulus(Listener.GetListenerID(), Delay, Event.Instigator
                , FAIStimulus(*this, ClampedLoudness, Event.NoiseLocation, Listener.CachedLocation, FAIStimulus::SensingSucceeded, Event.Tag) );
        }
solid bear
#

Anybody can help me, please. I disconnected from Root Node all Seq and Selectors. But my AI Pawns also still is working as if I didn't disconnect BT nodes from Root Node.

patent hornet
#

save the BT?

solid bear
#

Yep.

#

Well.

#

I disconnected from Seq Nodes child nodes and, finally, my AI Pawns are not moving.

grim lily
#

Got an intresting question. How hard would it be to make a simple car ai where the police car spawns behind the player and disappears after a certain time. Can't find a video or anything on this haha. Please @ me if you reply. Thanks raised_hands_tone3

lyric flint
#

Should be easy. The spawn location is easy to determine, take the player forward vector and Its current location and work with that. The certain time is just a timer, it's up to you, You can do it with a delay and a loop, it doesn't really matter. You don't even have to actually hide the police car, you can just move it out of the view, because if the player doesn't see it, then it doesn't exist ๐Ÿ™‚ Also, this is not #gameplay-ai (Behavior trees and EQS) ๐Ÿ˜„ If you plan to use blueprints, try #blueprint , if you go cpp then try #cpp @grim lily

grim lily
verbal violet
#

I used ForgetActor but that forget it forever, ai can't detect forgotten actor after change team id

meager imp
#

Please lie to me and tell me that converting my blueprint BTT and BTS to c++ will be easy ๐Ÿฅบ

misty wharf
#

I haven't tried it but I don't see why it would be particularly hard ๐Ÿค”

#

(Unless your BP versions depend on a lot of things that aren't already in C++)

meager imp
#

I spent my weekend trying to understand custom thunks and failed miserably, I have a small ptsd ๐Ÿคฃ

bold vapor
#

Check out the Module "Testing the Behavior Tree" in this course https://learn.unrealengine.com/course/3318392. It will show you how you can use breakpoints and step backwards in time through your behavior tree, which will allow you to compare actual values in the system to what you expect them to be and find discrepancies

lyric flint
winter comet
#

Can anyone help me with my problem? My NPC does not play the walk animation after completing a Play Animation Task in the behavior tree. The capsule moves the NPC but the animation stays in Idle while moving.

glossy spire
#

Can someone explain the red and green arrows that flash when reaching a breakpoint in a behavior tree

#

Is it like, green means the task was successful?

neat parrot
#

how would i get the ai to teleport towards ai and then once in a radius around player they ai teleports around player and attacks player?

#

i have the ai teleporting around player but it does it no mater how far away from player as long as ai can see player

glossy spire
#

@neat parrot could add a cooldown to the teleport

neat parrot
#

a cooldown?

#

can you explain to me how a cool down would make this work?

glossy spire
#

I dont know exactly what you're doing, but a cooldown would prevent the sequence from being selected again for a while

#

in general you want to look into decorators

neat parrot
#

im trying to change the location of the teleport to around character using that eqs only if its in a radius around player

#

right now it just teleports towards player

#

how would a program a decarator to get is in player radius??

misty wharf
#

compare distance to player pawn location or something like that

stable void
#

how do yuu avoid this?

#

should I manually create points around the target for the ai to test ?

misty wharf
#

Is it trying to path to the target or something and it causes it to loop around it for some reason?

reef birch
#

Im not rlly experienced in navigational meshes, but how come there is no green area inside the garage and under this area at the door? anyone knows how to solve this?

stable void
misty wharf
#

Have you tried adjusting the acceptable radius for the movement?

stable void
reef birch
#

@stable void i can walk fine there myself, just ai cant get in garage

#

@misty wharf i tried all settings, made the agent radius as small as possible, it wont go in garage

misty wharf
#

sorry my answer wasfor silveregg

#

I was gonna suggest for you to try moving the garage doors higher up

reef birch
#

@misty wharf oops srry

misty wharf
#

so there's a bigger space between ground and the top part of the door

#

just to see if height might be an issue

reef birch
#

i made a nav link proxy and then it goes in, something else missing

#

it just wont generate any "correct" path

misty wharf
#

navlink proxies ignore navigation problems like not having enough space to fit

reef birch
#

inside the garage

#

what u mean then enough space to fit? as u can see on the left side of the building it generates a navmesh

misty wharf
#

Yes, but the doorway itself might be too small

reef birch
#

is that based on capsule?

misty wharf
#

iirc it's based on the navigation mesh generation settings in your project settings

reef birch
#

so where do i determine this "height". cause whatever settings i try , nothing seems to matter

#

lemme show another pic

misty wharf
#

Agent height is the one that controls it I think

stable void
reef birch
misty wharf
#

you may also have to delete the previous nav mesh and regenerate it if you adjust the settings for the generation

misty wharf
reef birch
#

i also tried that a couple of times, i doubt its gonna help another time

misty wharf
#

The other settings in there could in theory affect it as well, since they control how big the nav mesh polygons and such are

#

so if for some reason it doesn't manage to fit the generation logic into the space it probably gets left out

reef birch
#

so is this in project settings, or the navmesh itself

#

im getting confused

misty wharf
#

in the project settings under navigation mesh

#

that controls how the navmesh is generated

reef birch
#

thx

#

got it

#

its in the the recast nav mesh inside the level,. called: Agent Height

#

default is 144, changed it to something lower

#

thx for the help @misty wharf

misty wharf
#

keep in mind that the one in the level is the one that's already been generated

#

you'll also want to adjust the settings in the project to match if you modify it in the level, since otherwise it will be generated with the incorrect settings

reef birch
#

kk

lyric flint
#

@reef birch Not necessarily directly related to your problem, but you may also want to consider, especially in situations of entrances, such as doors and such , although I may be wrong ๐Ÿ™‚

stable void
misty wharf
#

that's pretty weird

#

the agents themselves aren't navmesh obstacles are they?

#

that could cause weird behavior if they are or if they can otherwise affect the navmesh (eg. they have "can ever affect navigation" enabled and you have runtime navmesh generation on)

stable void
misty wharf
#

that could maybe affect it, not really sure what else would cause them to behave in that way

stable void
#

i've tried waiting a long time after the component has been deleted and there is the same issue, the component isn't there anymore because the visualization turns yellow again

#

odd

fresh remnant
#

@stable void enable navmesh drawing, console command 'show navigation', you might see holes in the navmesh if they are taking that round about way. Just really doesn't happen otherwise. It can't go around something it doesn't know is there so there is usually data saying there's some obstacle or nav area cost modifier or something

stable void
fresh remnant
#

what's your tile size, it could potentially, meaning that the area there isn't yet generated, or is continually being dirtied

fresh remnant
#

if your actors are set to navmesh obstacle and are moving, they may be forcing the regeneration too. Maybe first turn them off setting themselvs as obstacles

fresh remnant
#

can u type that command show navigation

#

it will help a lot, will show you the navmesh generating

stable void
fresh remnant
#

so maybe ccheck what's causing them to regenerate, looks like those medium humans are nav obstacles still

#

see the holes?

stable void
#

I want them to be obstacles when they aren't moving though

fresh remnant
#

yes you can do that..

#

but they are doing that while moving

#

in general, you should not have dynamic obstacles be nav obstacles while moving

stable void
#

no I can see that they are not, wait i'll make gif

fresh remnant
#

you have to set a callback and figure out when they stop, so then u set the Can Affecft Navigation to true

#

then when they move, set Affect Navigation back to false

#

If you want dynamic obstacles use crowd simulation instead

stable void
#

the green is moving

#

the red is target

#

you can see at the end the moving takes a stroll

fresh remnant
#

ah ok, so seems like a case where there's too many actors moving and stopping

#

so it just keeps regenerating

#

thinking, there might be a way to increase the frequency of checking a repath

#

which may help

stable void
fresh remnant
#

btw so y ou know the regeneration takes a lot faster than that, it's just the debug view showing it so you can see it

fresh remnant
#

so yeah one actor, but it's timed too perfectly

#

it stops, the other stops, tile is being generated, can't path

stable void
#

I see

#

that makes sense

fresh remnant
#

are you using crowd follower or path follower

stable void
fresh remnant
#

when it starts moving, you dont' see any red?

#

oh actually

#

when you move, it forces regeneration

#

because you're covering your hole back up

#

so maybe set affect navigation false, wait .1 seconds, then move

stable void
#

This is the path the visual logger is showing

#

then is does this

fresh remnant
#

hmm

#

are you using two navmesh?

#

or what's ur agent radius for the navmesh? and the actual agent radius itself?

#

seems to me like the other objects are forming a wall, and the agent radius is too big to go through

stable void
#

one for each agent size right?

fresh remnant
#

they match but what is it, is it too large maybe?

#

yeah so the holes you saw earlier were for a different navmesh maybe?

#

and the holes these agents actually make might be much bigger

stable void
#

this are the settings

fresh remnant
#

for their navmesh, hence they form a wall, I would reduce agent size, but also keep in mind that nav mesh generation will temporarily make a bad path till it repaths

#

65 = 130 diameter, so you need each nav agent to be 260 units apart(from their center) to allow other agents to walk through

#

so yeah looks like they are forming a wall to me that you can't path through

stable void
#

looks to me like it should at the very least take the blue path ?

fresh remnant
#

where is it heading?

#

like the actual point, how do you generate that point

#

if the point lands on a hole, it will teleport to the nearest navmesh point maybe, and it may be on the other side completely

stable void
fresh remnant
#

in general navmesh doesn't really screw this up, there's usually something blocking

#

yeah could be cost related but the other side still is cheaper

stable void
# fresh remnant

yeah sometimes my agent will go around the target a bit for some reason

fresh remnant
#

If your dummy models represent the actual physical size, your agent size seems too large

#

it's going to annoy players because they see a big discrepency

stable void
fresh remnant
#

ah ok maybe its fine then? Maybe it won't look so weird if you have the actual spiders there and it would make sense that they are going around each other?

#

but I think make sure your target location is valid so it doesn't shift it for you

#

it has to FIT in that location

stable void
stable void
fresh remnant
#

for my RTS, when I have 20 units selected, whether the movement is for the AI to move to or the player, I use the same function to find valid points based on each unit's radius, not just a valid point on the navmesh, they have to fit, and not collide with each other once they get there

stable void
#

Thank you so much for your time @fresh remnant you're a gem! Got to run now, have a good evening!

misty gale
#

Is there a default method to split the path from one vector to another, into several sub vectors ? So that each vector has a max distance of X to the last vector

#

Not sure if AI is the right place to ask but

misty gale
#

guess its just sub stepping the vectors

misty gale
#

Just splitting 2 vectors into several vectors

#

So VectorA 0,0,0 to VectorB 0,100,0 in steps of 10 would become
0,0,0
0,10,0
0,20,0
...
0,100,0

pallid trout
#

๐Ÿ‘€

pallid trout
misty gale
#

Im getting path points from the Nav system, where i want more control over the paths that the NPC take

#

so i want to convert a few points into many smaller pathpoints so that i can tune the movement better...

#

atleast, thats the idea

misty wharf
#

If you wanted to split them you'd just need to calculate the inbetween point

misty gale
#

yeah, its what i ended up doing

#

just wondered if there was some existing function in ue that handled this sort of thing ๐Ÿ˜›

#

feels pretty dirty like this

misty wharf
#

Yeah not sure, I don't think it's dirty if it solves the problem lol

misty gale
#

fair enough

low crow
#

Hello!
I have an AI that die when colliding with an actor that doesn't move. Is there a way to make them avoid this actor and not just go straight on it if this actor is between the AI and the player? x)

bold vapor
#

Hey everybody. I started playing with EQS while following a module at Learn Unreal, but it's apparent that there have actually been numerous regressions within EQS since the video was first created, so my confidence in using it is rather shaky.

Are there alternative frameworks within UE for composing AI or is it either EQS or roll-your-own?

misty wharf
#

What regressions?

#

EQS is only one part of the AI systems in Unreal, if you don't need its capabilities then don't use it... personally I haven't really noticed any particular bugs in it

pine steeple
#

i use EQS a lot

#

for everything from AI pathing decisions, AI target aquistion (finding target for AI), etc

#

i probably have aroun 15 custom tests and around 30-40 EQS queries

misty wharf
#

You wouldn't happen to have any idea how multiple generators in a single EQS query works? I could never quite figure out what the idea was with being able to do that :D

#

Does it just add all the results together from both for the final result of the query?

pine steeple
#

composite generators?

#

yeah so for my AI to find there target, i run 2 generators, one for grabbing pawn targets, and one for grabbing active taunts in the level

#

then i run them through the same tests

misty wharf
#

I mean something like this

pine steeple
#

can't do that

#

afaik

misty wharf
#

Right, it was a bit of a strange thing anyway lol

pine steeple
#

at least i could never get it to work, and i saw no code in C++ to handle that scenario

#

i have this for example for aggro eqs

misty wharf
#

Yeah that'd make sense

stable void
#

I'm under the impression that each agent (of substantial different size) needs it's own recast navmesh with different parameters, is that true? also how do I debug different navmeshes in game? I can only see one with the command "show navigation"

pine steeple
#

click the enable drawing

stable void
pine steeple
#

yes you can tick those in game

#

and see the navmesh

#

(as long as you set different colours)

stable void
#

oh, thank you. Do you perhaps also know how to force an agent to a specific navmesh? @pine steeple

pine steeple
#

well agents pick the closest navmesh to size of its capsule

#

so if your agent radius in the navmesh is 130 and your agent radius is 130

#

it will use the 130 navmesh, not the say 45 navmesh

#

you can lie about the agent radius in the CMC under Navigation

#

or pull it from the capsule

stable void
#

it's kind of sad that this is the state of most tooltips. Hard to know what anything really does :/

#

if that's correct I guess this in construction scrips should work

#

ok that's reading properly

#

Any reason why a path going from one agent size to another would always fail? Both partial and valid read false

stable void
#

actually the large agent doesn't want to go anywhere :/

night lintel
#

Hey all
Please does anyone here have experience with AIs Iโ€™m having issues building my melee AI and j need help
Thanks in advance

neon storm
#

How do I incorporate an AI behavior tree and perception in a 2D side scroller? Like for enemy patrolling?

fresh remnant
fresh remnant
neon storm
#

how to create an enemy that patrols, and detects the player(for a 2D side scroller)?

livid solstice
#

my goodness, I'm very sorry, little bit of a beginner here, but I have to ask... so I have a point and click character in my scene, I've set up the navmesh and have a simple move to location firing, the player controller seems to be correct since I've made sure to print out the AI Controller class

#

but when I click, the character doesnt move

#

his movement mode is set to walking, ive checked that too

#

and the location is correct, made sure to draw a debug point where I was clicking