#gameplay-ai

1 messages · Page 3 of 1

hearty vale
#

Hello friends! First of all, let me apologize for any spelling or grammar mistakes I might do since English is not my first language.

I tried looking for an answer using the search function, but seems I can't get the answer I'm looking for, so I'll try to explain.

Ok, so when we want to reuse a class, we just make a child and can have it working the same way as the parent class, and we can expand it's functionality.

But when it comes to AI how does that work? I mean, I have created a simple AI for an enemy that when he sees me it follows me and attacks. No big deal, but I would like to know how should I approach having AI for other enemies? These enemies might want to fight you from a distance or have slightly different behaviour.

So, do I need to copy the "basic AI" (Ai controller, blackboard and behaviour tree) , give them a different name and proceed to change what I need or am I missing something?

#

Thanks a lot in advance for your answers

misty wharf
#

It depends on the structure of the logic and such

#

Typically I guess you would have a separate AI controller and/or separate pawn for each AI

#

This way you can easily control specifics for those specific AIs for example through changing their settings

#

you can share assets like BT's and blackboards, and you can also split your BT's into smaller ones which you call using the run behavior node

#

this may facilitate sharing of behaviors more easily

#

but in general there are no rules for it - you can just do whatever you find convenient

hearty vale
hearty vale
#

again, many thanks 🙂

misty wharf
#

👍

uncut python
#

could someone help me with GetDefaultSupport Agent? I cant figure out what id replace that with in UE5

deft lion
#

Hello.
Case to sense damage by perception.
In BP we use for this Report Damage Event.
Which function for this in C++?

misty wharf
#

I don't know the function off the top of my head, but find the function that the BP node uses. It's most likely called ReportDamageEvent or something similar

#

This way you can see what function it calls to do the actual logic (most likely it wraps some other func)

#

If that doesn't help, try looking for references to the damage sense class, it oughta show up there somewhere

uncut python
#

When you say adjusting the destination, wydm? Like offsetting it a little bit to add some randomness?

flint trail
#

has anyone done AI in zero-g ?

bleak valve
#

Hi I plan on controlling a vehicle using reinforcement learning. For my states/inputs, should I use data from the camera(computer vision)?

uneven cloud
uncut python
left mist
#

How to make EQS queries work as service?

#

They don't seem to do anything at all, according to debugging i tried

celest python
#

its latent

#

bind on finished

#

from this object

#

and I think EQS has a service for you already 🤔

#

in the engine

cursive stag
#

Do the AI specific blueprints like behavior trees provide any performance boosts when compared to just building inside of the actor itself?

uneven cloud
left mist
uneven cloud
uneven cloud
cursive stag
#

The first 2 leader ai dont move or anything. Just exist to send and receive info. The final pawn moves where told while spotting and shooting at targets.

hallow flint
#

there's tons of literature on learning vehicle control with RL so you could probably refer to that for the types of state information

#

Also it's important to point out that if it's very simple driving (like highway driving) or for some racing game, you can definitely do an okay job with RL

flint trail
#

so, hmm, has anyone done AI in zero-g ?

celest python
#

what is zero-g

uneven cloud
granite vault
left mist
#

I assume it could be because second query uses result of first query as item

celest python
#

check visual logger

left mist
celest python
#

result of eqs

left mist
bleak valve
flint trail
misty gale
#

Youd need custom setup yes

#

The defaul nav is based on navmeshes

#

Needs a surface etc

rugged talon
#

i want to check if my ai character is rotating . how do i check that

uneven cloud
uneven cloud
uneven cloud
rugged talon
uneven cloud
rugged talon
#

aaah

#

ok thanks anyway

left mist
flint trail
# misty gale Needs a surface etc

what if I have invisible surface (invisible floor/ground) ? How can I set up flying AI using nav mesh ? (obviously they won't be able to go under navmesh, even if player does)

flint trail
opal crest
#

Space doesn't usually required sophisticated pathfinding. You just go straight to your destination, and use steering behaviour to avoid other objects.

celest python
#

Either debug or keep trying with visual logger, literally everything is logged there

#

ensure your service is running

#

its also logged

misty gale
flint trail
#

why wouldn't work ? I thought UE's AI can "fly" 😦

celest python
#

Fortnite and Paragon didnt have flying AIs probably

#

so they didnt implement one

flint trail
#

sad but true

celest python
misty gale
#

Non-volumetric

celest python
#

I know Mieszko mentioned mercuria AI once

#

for flying

#

in twitter

#

probably expensive af but ¯_(ツ)_/¯

flint trail
#
For development budgets under $500k, we offer licences with limited support for £4,000 for Mercuna AI Navigation, or £2,000 for either 3D or Ground Navigation.```
#

maybe for part 2 or DLC 😛

celest python
#

its still expensive, but probably cheaper than others tbh

#

it probably means you can get 3D navigation for 2k only though, not 4k + 2k

#

limited support is additional 2k

flint trail
#

yeah, it's 2k GBP for 3D nav only, with limited support (whatever that means)

opal crest
#

Definitely cheaper (in terms of dev hours) than building it in-house.

flint trail
#

a lot of money to shell out for a solo indie dev

celest python
#

If you stick with what engine has, the more likely you'll survive as solo dev in UE

#

UE sucks and incomplete in many parts

opal crest
#

No way I could build 3d nav in 10-20 hours, lol. I could probably prototype it?

flint trail
#

I'll run some test with some simple "pre-scripted" BP navigation (like move to location or something) and see if it's good enough

celest python
flint trail
harsh storm
misty gale
#

Implementing some A* with grid tracing of some sort might be easier perhaps :p

celest python
#

I have silly idea

#

You can just have spring arms pointing to each direction and just try to move 😂

#

it'll make AI steer away from collisions

uneven cloud
misty gale
#

Same with the free one I linked , SVO

#

Anyhow. Some alternatives :)

flint trail
winter ibex
#

hey guys I'm having an issue with the simplest AI moving and I'd like to assume it's a bug on UE5 if anybody has any ideas

#

Simple move to actor within a navmesh and an AI using default Unreal AI Controller along with AI Moveto also appearing as failed

#

Mind I ask does anybody know any possible issues that could be going on?
As from google I couldn't find any solution

celest python
#

Check visual logger

#

It logs path movement efficiently

#

You'll find out whats going wrong

winter ibex
#

Thank you very much I'll check it out

proud condor
#

Hey everyone who know is OpenCV working on runtime on Unreal Engine?

#

For AI character

#

Like click play

#

And opencv watching from camera and detecting objects

soft mantle
#

I don't know if all are aware, but stablediffusion has been released with the lastest weights

#

it's insane

winter ibex
#

Still super stumped

#

My AI seemingly will follow at random

#

Using this simple tick just to test if AI will navigate

#

and it'll work like 5% of the time

celest python
#

Each frame you are creating a new move request

#

why you even use simple move to actor?

#

just run AI Move To task once

winter ibex
#

Maybe there's a separate error then

#

This also doesn't work

#

This is the vislog though which is a bit confusing because it doesn't elaborate

winter ibex
celest python
#

is that.. an actor name you manually typed?

#

ThonkRotate somethign is weird

#

anyway, there is an invalid error on path movement request

#

which means engine also doesnt know what going on

#

something might be wrong with your navmesh

winter ibex
#

I deleted it a few times an reput down

#

Just copped a new vislog 1 sec

#

I redragged them onto the mesh but it's still being goofy

celest python
#

press P in editor

#

and see the navmesh

winter ibex
#

That green is the navmesh

celest python
#

it was suppose to be all green though

#

unless vislogger overriding its color

winter ibex
#

Vislog closed and it still seems to be like so

celest python
#

can you try to move your navmesh

#

around the level

#

a little bit

winter ibex
#

Yeee

#

1 sec

celest python
#

it might rebuild

#

one way another it seems like a navmesh issue

winter ibex
#

Can I just delete replace

#

Done it a few times but doesn't seem to have worked

#

Still no luck with this

#

New nevmesh bounds

celest python
#

check vlogger again

winter ibex
#

Still got this

#

Same target point error too

celest python
#

add 1s delay

#

to move to

#

let player spawn properly

#

maybe when the func runs player is not spawned yet

winter ibex
#

will try

#

Tried it on both with no luck

#

I opened a different map

#

tried it

#

It fails like 3 times in a row then succeeds continuously

#

I think I can maybe just get away with using the second map since it randomly seems to work while other doesn't

dull spruce
#

Whenever I play the level the ai move to node immediately fails. What do I do? I can't find anything that could be wrong

uneven cloud
celest python
celest python
#

either move target is wrong or navmesh

#

and Simple Move To is unnecessary

#

iirc what it does is just calling MoveTo on AIController and does not track path movement state

hearty niche
#

hey guys, what do you recommend as the rootposition for doing traces for AI shooting? I use eyes location and rotstion for the player and was tring to repurpose the code for the npcs

celest python
#

you can do the same

#

or just use weapon muzzle

#

unless you have anims causing muzzle to look elsewhere

#

or for worst cases get capsule bounds, get actor location + ((bounds.Z / 4) * 3)

hearty niche
wide quartz
#

hi all, any ideas why my zombie ai are making each other bounce away like this?

#

No blocking collision enabled on anything apart from the capsule

#

I currently have root motion enabled for the zombies movement as it makes them move in time with their animations and fixes their feet sliding. any ideas?

celest python
#

disable Can Character Step On bool on capsule

dull spruce
# uneven cloud Use the visual logger to debug.

LogVisual (Log) Redirected 'TransformComponent0' to 'AIController_0'
LogVisual (Log) Redirected 'PathFollowingComponent' to 'AIController_0'
LogVisual (Log) Redirected 'ActionsComp' to 'AIController_0'
LogVisual (Log) Redirected 'NewBlueprint_C_1' to 'AIController_0'
LogVisual (Log) Redirected 'GameplayTasksComponent' to 'AIController_0'
LogAINavigation (Log) MoveTo: Location(X=-840.000 Y=200.000 Z=148.000) Mode(partial path)
Filter(None) AcceptanceRadius(10.0)
LogPathFollowing (Log)
OnPathFinished: Invalid[]

#

this is all it says coming from the ai contoller

misty wharf
#

Look at the messages

#

It says Partial path, and at the end it finishes because it determined it an Invalid path

#

partial paths occur if it cannot pathfind all the way to the target position

keen crow
#

what's the difference between decorators and services OnNodeActivate/OnNodeDeactivate and OnBecomeRelevant/OnCeaseRelevant? which pair should is better suitable for setting AI state in a composite?

desert radish
#

AI Perception is meant to detect Pawns, right? If I want to detect an Actor, like a simple projectile that's moving across the map, I need to either use EQS or write my own solution, e.g. a perception component that works on Actors?

harsh storm
#

Just add the stimuli source component

keen crow
desert radish
#

Oh, the stimuli source. Completely forgot about it. Thanks!

uneven cloud
keen crow
#

and another question. Under some rare occasions I have to switch AI behavior immediately so I don't feel like checking some state in a BT service. So which is better:

  1. Updating some "reset" blackboard key (that is observed by a blackboard decorator on a higher priority branch) from code in AI controller, adding the BB key name to a C++ constant and hoping that no one will ever change the name of the field in the BB asset
  2. Calling a AAIController::RunBehaviorTree with a separate tree for the behavior in this rare occasion?
  3. Creating an instanced decorator node and subscribing to some delegate of an actor that produces the event to change behavior. On broadcast I simply call OwnerComp.RequestExecution(this)

2nd option seems to avoid the danger of BB key being renamed but I'm worry about performance penalty of calling RunBehaviorTree every now and then. 3rd option implies creating extra object for each AI but conceptually seems like the clearest - the BT itself observes the changes.

#

Also is changing blackboard keys considered an ok thing? Because intuitively it seems to me like a bad design

opal crest
#

Just update your BB from the AIC.

uneven cloud
uneven cloud
keen crow
# uneven cloud Option 4: creating a decorator where you code the observer abort.

I thought about it but couldn't figure out how to do it. Are there any good examples in built-in decorators? I looked at the source of BTDecorator_BlackboardBase but epics still registering an observer for a blackboard key which doesn't look like what I need since I'd still have to change the blackboard key from AI controller

misty wharf
#

2 or 3 seem reasonable to me, I doubt you'll have performance issues if you do it "every now and then"

autumn ibex
#

NavLinkProxy question
I'm having trouble getting my NavLinkProxy ( simple ) to connect two separated Nav Mesh Islands. Is there some restrictions I need to know of when using these NavLinkProxies?

Anyway to determine WHY a connection is not being built between my Left/Right end points?

Please see images for more clarity.

quaint radish
#

The simple parallel is confusing. Why is it called Simple? is there a complex option I am not seeing? Does anyone have screenshots explaining when they should use it?

harsh storm
#

Use it when you want to do two things at once pretty much.

#

I use it, for example, when I need the AI to still move while they're in the middle of attacking

fleet narwhal
#

hey hey - i'm working on an rts project and i've got it where i can select my units, right click and they go to the location directly, but i plan to have roads as most of the units are vehicles, so would i need to use a spline based system with a mixture of navmesh bounding boxes to get what i want?

#

if there's a way to have the units prefer following splines or the fastest "allowed" route (aka roads and not driving on pavements), but if needed they can be pulled away from it that would be swell

celest python
#

~~Two ~~ three videos to watch before designing your AI, that explains philosophy and ideal workflow for AI development:
https://youtu.be/G5A0-_4dFLg
https://www.youtube.com/watch?v=5ZXfDFb4dzc
https://youtu.be/Qq_xX1JCreI

This stream will cover all the basics needed to build an agent-based game AI framework.

Slide Deck: https://docs.google.com/presentation/d/1nYTzpkAomu2FWro3rytWbxJnCayY5erd/edit?usp=sharing&ouid=112564308943529949269&rtpof=true&sd=true

Timestamps:
00:00 Introduction
11:00 Agent Model
14:56 Actuation
16:38 Actuation: Action System
18:41 Actuati...

▶ Play video

This stream will cover my preferred solution to game AI decision making.

Slides: https://docs.google.com/presentation/d/13po2s6tJXeDm0TqFsu5l6q_QzTck9f1P/edit?usp=sharing&ouid=112564308943529949269&rtpof=true&sd=true

Timestamps:
00:00 - Stream Start
01:05 - Intro
03:45 - Past Experiences
12:36 - Problem Definition
20:49 - Approach Overview
31:...

▶ Play video
GDC

In this 2017 GDC talk, Bobby Anguelov, Mika Vehkala, and Ben Weber outline core principles to get the most out of your behavior trees while avoiding common issues.

Register for GDC: https://ubm.io/2yWXW38

Join the GDC mailing list: http://www.gdconf.com/subscribe

Follow GDC on Twitter: https://twitter.com/Official_GDC

GDC talks cover a rang...

▶ Play video
#

@knotty dawn ablobwave

fleet narwhal
#

👀

#

thanks Eren!

celest python
#

fast movement (makes AI agents follow roads if estimated reach time will be closer) follows some spline-like movement
normal movement uses regular movement that you can move into trees, houses etc

fleet narwhal
#

I had in mind games like Act of Aggression and 911FirstResponders

#

Yeah, i was thinking of using navmesh, making the roads a lot cheaper to use, but wasn't sure how to implement the spline system with that

celest python
#

I think you can find closest road (spline), and find closest spline point, then do regular pathfinding to first spline point, when you reach, you can follow splines index by index

#

like getting their world location in navmesh then moving etc.

fleet narwhal
#

yeah, that's what i'm seeing most people do pathfinding wise

celest python
#

but on a big scale, this is a naive and possibly can end up being expensive approach

fleet narwhal
#

yeah, that's my thought

#

i could genuinely just cheat and have a bunch of random spline routes but if i wanted to lets say have a unit tell another unit to go away, the vehicle could turn around and drive off

celest python
#

yeah some top-down manager can be required

fleet narwhal
#

mhmm

celest python
#

I'm wondering what zoombapup would say for this though

fleet narwhal
#

this is what i have in mind, personal project, but trying to make something like this, rando events and what not

celest python
#

its exactly what you are looking for

fleet narwhal
#

Oh really?

#

i'll take a look, cheers bud

#

Ooh, that's the matrix thingy

#

hmm, I totally forgot about that

celest python
#

you're lucky some people already tried what you are trying to do

#

and suffered enough to solve "how to" part 😄

#

so you'll have some support too

fleet narwhal
#

honestly, i'm reliant on the geniuses that share their knowledge here and online

#

nothing that i'm doing will make money, but it's always great fun to learn something new

celest python
#

and turns out other 7 contributors 😅

fleet narwhal
#

honestly bud, thank you for sharing this with me

#

greatly appreciated 😄

celest python
#

np salute blobthumbsup

fleet narwhal
#

Mass looks so dope

wide quartz
# celest python disable Can Character Step On bool on capsule

I checked that and it is disabled, I'm wondering if the root motion and the ai changing rotation to follow the character is making them bounce away because their capsules are blocking eachother?

Sorry if it is basic but any ideas on the best way to handle having multiple ai like this chasing the player? Should I try get their walking and running animations working nicely without root motion and drive their movement with walk speed instead?

celest python
#

do you have RVO or crowd controller enabled?

#
  • add offset to target movement goal
#

until they reach a closer distance, make AIs follow the offsets

wide quartz
#

No i don't think I have either enabled, i will research those now.

regarding: "+ add offset to target movement goal
until they reach a closer distance, make AIs follow the offsets"

Do you mean I make the ai move towards the player and if the player is within a certain range of that initial target they wont be switching focus unless they are closer? I think I can figure that out and test.

This is my current ai behaviour tree for them following the player, then when they get close an overlap collision box changes the BB value to target in range and they attack.

I tried a service which checked the distance between the player and the ai and did the same thing but i was having issues where they would not follow correctly, maybe i needed to make the service run more frequently.

Thanks heaps for any ideas or help, i'm sure ill get there haha

celest python
#

yep

#

basically either having scene components around player, and moving to scene components until you reach them, or using EQS

#

or using custom code

#

I have component for this, "nav point generator"

#

interops with EQS

#

creates n amount of circle points around targets and enemies move to there until their distance is closer than Distance(circlepoint, target)

#

if a single circle point has more than 6 followers, other enemies follow another one

#

and for each point, i do navigation raycast to ensure it's on the navigable radius

#

and if not, I try to project to navmesh

#

I'd do this in BT tbh

#

much hassle

#

a custom top-down manager both handles the path points and path following state helps a lot

wide quartz
#

wow sounds more complex than what I thought i would need to implement haha, i've still got a lot to learn. I suppose another option is try crowd controller/have less zombies and they are stronger haha

#

thanks for your help I will try a few things out

celest python
#

it doesnt have to be that complex

#

but yeah it has some complexity one way or another

dull spruce
dull spruce
misty wharf
#

iirc there should be a setting "accept partial path"

#

try enabling that and see if it works or no

dull spruce
misty wharf
#

on the moveto node / bt task I think

dull spruce
#

i dont see anything on the ai move to node that says accept partial path

misty wharf
#

There's two different MoveTo BP nodes, one of them has it, the other one doesn't

#

maybe the other was called simple moveto? either way one of them should have it :)

dull spruce
misty wharf
#

Try getting the AI controller, I think there should be a move to node that you can use on AI controllers

#

that might be the one with more options

#

also there is a latent moveto node, that might not show up if you're inside a function (latent nodes can only exist in the event graph, not within functions)

dull spruce
#

im inside the event graph

lyric flint
#

Hey guys! I see you have problems of your own but we have a release in 4 hours and we have been cracking our heads on why our AI isn't firing at the player. It used to, but now it stopped.

We delayed the release for 2 days, we can't move it another day. We have no idea what is going on. We tested each step of its logic. Our final decision is to ask for someone to take a look from the outside perspective(maybe our brains are simply fried already).

If anyone can help - we would appreciate it🙌

Thank you!

dull spruce
misty wharf
#

🤔

#

That seems to suggest your navmesh may not be working

dull spruce
misty wharf
#

If you turn on visualization for the navmesh does it show green across the areas it should be in?

dull spruce
#

yes

misty wharf
#

What radius are you using on GetRandomReachable...?

dull spruce
#

2500

misty wharf
#

Maybe try drawing a debug sphere at the point it returns to see where it puts it

#

that might give some indication as to why it might be doing it

dull spruce
misty wharf
#

there should be a node called Draw Debug Sphere or something like that

dull spruce
#

so set the center on the draw debug sphere to the location that
get randomreachablepoint outputs?

misty wharf
#

yep

dull spruce
#

i dont seem to see any sphere when hitting play

misty wharf
#

if you print the coordinate is it far away from where your actors are?

#

oh, also you may need to change the settings on the draw debug node so it draws it persistently for 60 seocnds or something

#

iirc it might default to drawing it just for one frame, so that might also be it if you didn't change it

dull spruce
#

the cordnate it picks is -1470 200 89

misty wharf
#

how far is that from where your actor is?

dull spruce
#

oh wait it was the duration

#

yeah the sphere spawns where I have the ai placed in the world

misty wharf
#

always in the same spot?

dull spruce
#

yup

misty wharf
#

is it showing up exactly in the spot where the AI pawn is?

dull spruce
#

exactly where it is

misty wharf
#

yeah that does seem to suggest the navmesh isn't quite working 🤔

#

can you show a screenshot with the navmesh visualization enabled?

dull spruce
#

yes one secv

misty wharf
#

Is the capsule visible there the AI pawn?

dull spruce
#

Im sorry can you rephrase that

misty wharf
#

capsule, as in the collision capsule which is visible in the screenshot, is that the AI which is trying to do the navigation?

dull spruce
#

yes

misty wharf
#

hmm 🤔

#

I assume it isn't floating like this when you play, and it lands on the ground?

dull spruce
#

yes it is on the ground and when i lift it up it just falls to the ground anyway

misty wharf
#

Try placing it on the ground, if you select it and press End that should do it

dull spruce
#

it still doesnt work

misty wharf
#

Does it cause a hole to appear in the navmesh if it touches the floor?

dull spruce
#

no

misty wharf
#

Ok, that can happen if your pawn affects the navmesh which is undesirable :)

#

This is kinda weird tbh, I don't quite see why this wouldn't be working...

dull spruce
#

it works if I do it in a different project

#

just not in this one

#

it just randomly stopped working

misty wharf
#

Does it work at all if you just ask it to move to an arbitrary location within the level? Maybe if you place another actor in there and just tell it to move to that location?

#

One other thing that could affect this is if you accidentally changed the agent settings for the navmesh, because it could cause the pawn to not actually use this navmesh that is visible

dull spruce
#

how could I check

misty wharf
#

the agent settings should be in project settings somewhere, maybe under navigation

#

they should match the settings of your pawn (eg. the radius and height of the agent match on both)

dull spruce
#

under supported agents in the agents tab in navigation it says index [0]

#

is that what it is supposed to say

misty wharf
#

Don't remember off the top of my head, maybe compare it with the project where it works

dull spruce
#

ok one second

misty wharf
#

(These settings are in the project's ini files so if you were using source control they should show changes in them if so)

dull spruce
#

on the working project it doesnt even let me open the supported agents tab, next to it it says 0 array elements, unlike the project that doesnt work it says 14 array elemtnts

dull spruce
misty wharf
#

That could in theory cause issues I guess, it'll use defaults if you have nothing in there iirc

#

That is, it could cause issues if the values that are in the array don't match the dimensions of the AI pawn

#

I gotta get some sleep now tho, hope you can figure this out

dull spruce
#

yeah me to ive been trying to do this for hours

#

thanks for the help

brittle trellis
#

Hi Guys, How is RTS Movement implemented ? something like StarCraft2 ? Avoidance and Coordinated movement, any link/guide/ little info would be very very appreciated, thanks.

fossil halo
#

hello, can someone please steer me in the right direction of how to select a specific nav mesh for an ai so it can only navigate navmesh1 and not say navmesh 2 and 3

flint trail
#

alright, i decided against doing AI in zero-g 😂 However, I am thinking to have AI in low-gravity (Moon?). Regular linear movement is no problem, since it's more about the look (animation). However, I'd like to make NPCs jump. Let's say NPC sees player and player is kinda far to reach by running to it. So AI would perform series of jumps to get closer. I only used Nav Link proxy to make AI jump onto something and down, and I don't think that would work for low-gravity jumps while navigating freely.

#

How can I make AI jump while navigating on any part of the navmesh?

#

(using stock options UE4 offers)

misty wharf
#

you could fake it

#

instead of doing a walking animation, do a jumping animation while perhaps simultaneously speeding up the movement speed

#

if it's really still just doing regular navigation, faking it could be an option - keeping in mind that if it suddenly decides to do a sharp turn it might look weird but I don't really know if it's a problem (maybe they have little jets that let them do turns midair)

regal patrol
#

How do you use more than one blackboard value in an EQS query? Or should I ask if that's even possible?

At the moment it seems like I can only input one blackboard value with an EQ, but I wanted to create a query that uses more blackboard values. For example, finding a location around a target position, but preferring locations that are furthest from another actor that isn't the target or the AI doing the query.

misty wharf
#

Parametrizing EQS queries is a bit tricky because of some weird design choices

flint trail
misty wharf
#

If you wanted to find something around a given target position, you'd probably want to create a context which can pull that data out from the owner's data

#

so in your custom context you'd basically go Querier->Cast to MyPawn->Get AI Controller->Get Blackboard and yeah it gets a bit iffy but it's what it is. At least these are fairly simple objects so if you ever need to change it it's not complicated

misty wharf
misty gale
#

Or use projectile prediction for the jump

#

Getting path from there ?

#

Creating a spline then lerping along it 😄

terse bear
#

what's the difference between a decorator condition and a blackboard based condition in a behavior tree?

misty wharf
#

What exactly is a "decorator condition"?

#

the blackboard based condition is a decorator which can be used to compare values in the blackboard to determine whether the node should execute or not

terse bear
#

oh that's right, I got it, thanks

flint trail
#

thanks for food for thoughts @misty wharf @misty gale Now I go back to digest it and see what works 👍

trail pelican
#

Hey, any idea how to make air movement right? I made this lerp with the timeline, But I wonder if there is a simple move or pathfiding way of doing it in air

gilded tree
#

How do people do navmeshes for huge open worlds? Just plop down one big one, or multiple split into sections?

opal crest
uneven cloud
deep bramble
#

If you have bots in a multiplayer game that are the same characters as human playable ones, should they be simplified copies that have less components and BP code? Ex: No camera, and no input events...etc

Doing so might mean I can have less hard references but then maintaining them just got more complex because there's duplicates of every character. What's the proper way here?

opal crest
#

It's pretty typical to have a common superclass, and then a player vs AI subclass. Then you don't have duplicates to deal with. You just make common changes in the superclass.

deep bramble
#

So I have a parent character and a few child characters (all playable by humans and AI) but the AI doesn't need camera and other stuff, but since those components were created in the parent I can't remove them for the AI.

#

So I made more parent characters but now this seems like a bad idea.

uneven cloud
#

Usually in that situation, you put the camera and input on the player controller instead of the character.

waxen fern
#

Hi guys im having a problem with AI and player perception, and with setting the TargetActor in the AI, https://youtu.be/9Gzl_-Xiwss <- video showing problem, Hope you can help me (more detailed explaination in the desc of the video)

Basically i tried making an Ai that wanders around (it works) but then i decided to add the "attack state" and it does not seem to work (mainly i think because it does not know what the TargetActor is , even if i set it correctly (i think) (i followed this tutorial https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/ArtificialIntelli...

▶ Play video
#

another thing i forgot to mention, is that the AI has the AiPerception component
and the player has the StimuliSource

charred lava
crimson token
#

I'm trying to setup my first AI tree, a very basic "see the enemy > shoot the enemy".
I'm using a PawnSensing component to do all the sensing of the NPC.
How can I take the event started by the PawnSensing component and use it and its properties inside a task? So far all I've used in my custom tasks was just created inside a blackboard or a service, I've never used external info.

misty wharf
#

The typical approach is to update the blackboard based on sense data

#

So you get something from the sense, check it's what you want, and then update the value on the BB. The Behavior Tree can then react to the change to the BB and do whatever

#

(you probably also should be using AI perception instead of pawn sensing)

crimson token
misty wharf
#

It's just better, pawnsensing is kind of superceded by it

crimson token
#

Ah, thanks.

#

So, the events launched by my AI Perception would just go and change some values on a blackboard, and my behaviour tree would just run normally, checking what to do based on these values?

misty wharf
#

Yeah

crimson token
#

As a dumb example, I have a "Target" property on my BB, which the AI perception changes whenever it finds a suitable target.
The tree keeps cycling between its options, and as soon as it cycles on the "HasTarget" decorator and sees that has a target, it acts on that.

#

Makes sense?

#

Oh wait, don't need to wait for the next cycle to retake the "Has Target" decorator, I can use observer aborts, right?

misty wharf
#

Yep you can set it up like that

crimson token
#

Alright, thanks

misty wharf
# waxen fern guys can someone help?

Based on the fact that the target isn't being set to the BB, it seems the logic in the perception event is incorrect. You'll need to debug it to find out what happens

raw arch
#

I have a service I'd like to run only once every time it enters the branch. Is there a way to make it so services don't operate on a tick? My current solution is to just set the tick very high, but I was curious if there is a better solution.

uneven cloud
raw arch
#

That looks promising, thank you!

severe tangle
#

How can I abort/restart node inside Behavior Tree? It has decorator, where notify observer is set to On Result Change and abort is set to self. But the issue is when I "change" this variable to the same value. I would still like for it to reset and start executing the node from the beggining, but it won't because the variable actually did not change. How could I achieve this behavior?

#

Or if there is a way how to trigger Behavior Tree Node from inside AI Controller

uneven cloud
obsidian igloo
#

hey guys! anyone know how to make AI ignore other pawns with stimuli sources? all of them have sight stimuli sources on them but I dont want them to see each other, when they chase the player and stack up behind one another they just forget the player is there lol

#

the stimuli source will be used for other factions tho, ive tried gameplay tags but they still sense each other

#

I hear theres a way to change an .ini file but im not sure where said .ini file is

uneven cloud
#

You use the team ID to determine which side an actor is on. Then you can set the sight sense to only care about hostile targets.

deep bramble
#

When I run my game with 7 other AI bots all running around doing various tasks using the two blackboards I have the Blueprint tick time goes through the roof! What sort of things should I look for first to start optimizing?

#

I separated my human playable characters anim bp and the AI anim bp so that the AI has a leaner anim bp without IK but I hardly noticed a difference in tick time.

#

The blueprint ticktime hovers around 12-14ms when the AI bots are there, and only ~2ms without them.

#

I suppose the math adds up, if a single character + level actors averages around 2ms then multiply that by 7 gives me ~14ms... ughhhhh

deep bramble
#

What do other developers set their AI tick speeds at?

Do you set separate tick rates for Actor Tick, Mesh, Character Movement, and Capsule?

#

Something must be very wrong with my setup. I'm basically watching a slide show with all these bots running around with low tick values and yet my average blueprint ticktime is now ~15 to 16ms.

celest python
#

Sometimes you just need to move to C++ if you already haven't

#

And other than some micro optimization efforts, it's difficult to reduce the overhead of BP

#

Because BT and it's components are not costly

#

Mostly your content will be the main bottleneck

deep bramble
#

BT is blackboard? or is that tasks?

celest python
deep bramble
#

okay will do

celest python
deep bramble
#

ahh okay

celest python
#

But I'm bloated into tasks in my daily job

deep bramble
#

understandable

celest python
#

7 AI bots and 14ms is totally weird though

deep bramble
#

lol

deep bramble
#

I think so far all of my "big fps gains" were mostly solved with easy solutions, (disable this, disable that, reduce this value in half...etc) but I guess now I'm at a point where the real hard work begins.

celest python
#

Try using Insights

#

pinpoint specific bottlenecks

#

rather than trying to guess overhead by enabling/disabling things

deep bramble
#

I can understand and deal with gpu profiling, but cpu profiling is still all mumbo-jumbo to me lol

celest python
#

Most costly things are

  • Movement
  • Animation
  • Over usage of BP tick
#

First two can not be a problem with 7 AIs

#

so probably you have tons of nodes in your BP tick

deep bramble
#

I guess that makes sense because movement involves quite a bit of changing variables

celest python
#

also do not profile in PIE

#

BPs gets optimized in shipping

#

it gets at least 2x faster

deep bramble
#

yeah I've heard, I should do another build soon

celest python
#

When you identify specific bottlenecks we can continue talking about optimizing them further

#

Or use session frontend (legacy profiler)

deep bramble
#

So essentially what I'm looking for whenever I open up insights is for long horizontal bars that say something other than waiting for tasks, is that correct?

celest python
#

yeah

#

waiting for tasks things is a task manager thing, that manages threads etc

#

that could mean your GPU or CPU waiting each other for finish

#

GPU goes brr but CPU is so slow and needs to finish etc

#

depends on the context

deep bramble
#

So those show where a slowdown occurred but probably because of a bunch of other things

celest python
#

yes

deep bramble
#

So since this is #gameplay-ai are there any AI specific pitfalls developers might find themselves in?

I'm using interfaces to avoid casting with my tasks. There are two shared blackboards between all the characters. There are two behavior trees both of which are reusing some keys such as "location" and "target actor".

granite vault
#

that's misunderstanding, cast is fine and fast

celest python
#

Cast is not expensive

#

What expensive is loading hard refs with cast

#

and it happens once

#

that's some memory management thing rather than CPU speed

#

in fact, engine does a cast to access interface too

#

behind the scenes

#

are there any AI specific pitfalls developers might find themselves in?
Moving to FVector locations can get expensive if user is keep creating a new path

#

because it's not multithreaded unlike moving to actor

#

pathfollowing is happening in game thread

harsh storm
#

So spawn an actor on the location and then move to that actor 🧠

celest python
#

Spawning and updating its transform is more costly than path following updates sad

#

VectorMovementSubsystem goes brrr

granite vault
celest python
#

no

#

I needed it because my 50 zombies were following offsets of target goal rather than the target goal itself

#

and it was getting expensive without multithreading

deep bramble
#

So even if the location an AI is moving towards doesn't change its still better to use an actor as the target key?

granite vault
celest python
#

they move to boxes first

#

to reach the player

#

so they move nicely with a fake formation

granite vault
#

wow, that's good game design

#

why the emoji though?

celest python
celest python
deep bramble
#

When they're moving towards a box are they going for the pivot point of that box by default or just nearest edge?

granite vault
deep bramble
#

ok thanks

celest python
#

but one day it'll hunt me again probably

granite vault
#

re-direct a smaller amount unit together each area/side could help.

#

Or use the expensive better version of RVO called Detour

#

it works very nicely with walls/narrow path

celest python
#

really? I thought it would provide almost same results with RVO

#

in general

granite vault
#

doubt so

#

you need to tweak the settings at the Editor/Project setting i think

#

RVO is the fastest but can be weird if you have a lot of walls/narrow path

celest python
#

Hmm, I'll take a look soon then, thank you

granite vault
#

let me search 1 guy's detour, that guy managed to perfect it

#

it has been few years since i last saw that perfect detour

harsh storm
#

When you find it, can you tag me as well? I'd be interested in seeing it as well

granite vault
#

he answered it in the post as well

#

all he does is change the settings, that's all

#

mind you, it is expensive compare to RVO

harsh storm
ancient glen
#

Hi, guys ! please help with root animation and AI behavior tree. I show it clearly in the video. When a walking animation is played, the forward vector is in one direction and does not change. I need the NPC to look at the character when walking, the standard task rotate to the target from behavior tree does not work. https://youtu.be/6DKtJcDtg4U

granite vault
#

@celest python @harsh storm works very well on wall/narrow path too, not just among units, which is a bonus. RVO can be strange at this situation

#

oh right, did not UKaos uses Detour for his 200 ai CMC Character as well?

granite vault
ancient glen
granite vault
#

you mean you want the NPC totally rotate its whole body at you?

#

if that's the case, you can set its rotation in the class

ancient glen
granite vault
#

i have no clue with root animation, but, how does the npc run towards you with proper rotation then?

#

i am sure it can, unless that rotation is root motion too? that's bad design

ancient glen
granite vault
#

so the character does not ever rotate actually?

#

0 rotation forever?

#

if that's the case, then you have to rotate it with the root motion only

#

but i don't encourage this unless you have a reason to do so

#

i don't speak that language, sorry

ancient glen
#

oh sry

#

he needs to turn to me and when running there is such an animation. But when walking, there is no rotation animation and therefore he cannot turn due to it

#

i speak with translate )

granite vault
#

i am not sure what are you trying to do, except guessing you want the NPC to be strafing while looking at you?
Use the class rotation and set the rotation to you should work

#

if not, then you have to rotate it in animation. but that is not a good idea

ancient glen
granite vault
ancient glen
#

ty

ancient glen
granite vault
granite vault
#

good

deep bramble
#

Well I set much more appropriate tick times for a ton of actors and set a min LOD for a skeletal mesh and now my blueprint ticktimes are more reasonable with 7 AI bots running around doing stuff like walking into walls like a bunch of morons... but hey at least the game is smoother now.

midnight scroll
#

So.. I have the strangest issue. I have this super simple AI tree at the moment, running tests.

I started with 1, 2, 3, and 6. This was working fine. They spawn, they run to an object. And then the disappear. This worked every single time without fail for multiple tests.

Then I add 4, and 5. I run the test again, and for some reason the tree gets stuck on 2. So I up the accept radius for that move node. No help, it still fails after several tests.

Out of curiosity I remove 4 and 5. I test again, instantly works.

I add back 4. It still works. I add 5, it breaks again.

Is there some fuckery with having two MoveTo nodes in a single Sequence or something? I cannot fathom why having a node way down the tree would cause the first one to never succeed.

#

This shit is broken. 😂 Even this fails at 2. And I put an acceptance radius of 500. They stop at the acceptance radius and just stand there. The node never succeeds. I unplug the other MoveTo, node 6 now, and it works immediately.

ancient glen
midnight scroll
#

As I said, I put an acceptance radius of 500. They still run towards the target. They know what they're running to. They stop at the acceptance radius and just idle. Occasionally the node finally fails and it'll replay from the beginning and get stuck again.

#

But if I remove the second MoveTo. It will play through to the Wait every single time without fail. If I have the second MoveTo, it will stop on the first one and never hit the wait node every single time without fail.

obsidian igloo
uneven cloud
obsidian igloo
harsh storm
lethal helm
#

how is the selected task still running despite not being part of the current execution?

glass crater
#

Anyone have an idea why my spawns aren't following my player character?

#

are my targets incorrect?

lethal helm
#

why are you trying to make the actor move to itself on the bottom moveto

glass crater
#

to stop movement once it reached the player actor

lethal helm
#

oh your compensating for the fact that a "stop move to" node doesn't exist?

glass crater
#

essentially

lethal helm
#

have you checked that the upper execution ever runs?

glass crater
#

its not running, just tested that

lethal helm
#

so collision is never set to true?

glass crater
#

shouldnt it be set to true on every spawned actor?

lethal helm
#

idk your the one who the set the default value for it

glass crater
#

I thought spawn BP with collision set as a variable and checked would handle that

lethal helm
#

what is the default value for "Collision?" on your actor?

glass crater
#

True

lethal helm
#

then your top execution does run

#

unless your setting collision? to false somewhere else

glass crater
#

there isn't a fancy orange line so I think you're right and it isn't running

midnight scroll
#

#gameplay-ai message
Woke up thismorning and decided to crack this AI thing. Started a new project, did basic repro steps. It didn't fail. So I opened the project I was having the issue in. And suddenly it's working fine. I can't repro the same bug that I was getting dozens of times last night. So I guess AI is just like everything else Unreal. If it's being literally illogical, restart the editor and it'll run fine.

celest python
#

It should at least let you know what exactly is wrong

ancient glen
crimson token
#

Does anybody have any good tutorial or guide on covers? As in generic shooty NPCs taking cover from threats to shoot back.
Or systems that I should check out, or stuff like that.
Basically anything to get me started on that, I've never done anything like it.

uneven cloud
uneven cloud
uneven cloud
ancient glen
#

@uneven cloud rotation speed and turning speed, set by the root animation

uneven cloud
ancient glen
granite vault
glass crater
granite vault
#

Your issue is because you keep rotating so slow towards the player. That's why it is slow.

#

Try snap rotate to player, your NPC will catch up fast

#

100% works

uneven cloud
pallid hill
#

I have a open world and there is no reason for the AI to walk around when player is not even near. I was thinking about disable movement on begin play, set sphere collision to like 10,0000 when player triggers it then set AI to walk. I'm not casting to player, using interfaces. Is this the best way to do it? I'm using navigation invokers for AI.

dense condor
#

Does anyone know the best way to launch an AI? My launch character is not working.

uneven cloud
# pallid hill I have a open world and there is no reason for the AI to walk around when player...
  1. Navigation invokers are really expensive and cause a lot of navigation bugs. I would reevaluate using navigation streaming.

  2. If you use C++, the significance manager would be a much better option. Otherwise, a simple distance check would be a lot better than a sphere collision. You should also turn off everything, not just disable movement.

Casting only matters if you cast to a BP. You can iterate over all the players (if multiplayer) or get the player without issues as it returns code versions.

pallid hill
#

@uneven cloud I have done most of the game in C++, UMG is done in blueprints. Most logic and behavior tree logic is done in C++. I have read the Significance Manger doc and will look into it more.

lament maple
#

Are blackboards the consensus way to go about AI, or do a lot of people do it all in C++ instead?

pallid hill
#

I use blackboards, C++ was used for decorators, notifies, services, tasks. I also setup the perception system in C++. I create BB and Behavior tree through editor and use the tasks and services that was created in C++.

pallid hill
#

@uneven cloud Thanks for telling me about Significance Manager. Going with GameViewPortClient and getting the Distance to setup the AI like enabling everything. This is going to get what I wanted and also boost performance.

uneven cloud
fast basin
#

How do I make an AI opponent for a strategy game? All the tutorials online are for AI characters that walk around, which isn't even close to what I need.

#

I guess I'm more asking where to start and for resources. I know that it's too much for anyone to just tell me in a conversation

rancid wing
#

hey guys,

#

so for some reason I cannot create a custom task in my behavior tree in ue4

#

any ideas on why?

uneven cloud
# fast basin I guess I'm more asking where to start and for resources. I know that it's too m...

You really aren't going to find any tutorials on that. You can do research on how other games did it. GDC vault might have something. AI Game Pro might as well. You might also just want to do a lot of googling. Reading up on the common AI architectures might also give you a direction.

Ultimately you need to break the problem down into smaller sub problems. What those problems are is going to depend on your game.

fast basin
uneven cloud
celest python
#

iirc zoombapup mentioned about some sort of "command pattern" multiple times

#

you can also search his message history to get more clues about it

#

and it's worth to check out game ai pro books, i recall a few RTS games mentioned there

fast basin
uneven cloud
sullen crater
#

Guys, I wanted to know if it's even possible to move Pawn thanks to AI Move to and other nodes?

crimson token
#

I've been looking lately at dynamic cover generation.
Everywhere I go, I see people suggesting GlassBeaver's dynamic cover system (https://github.com/GlassBeaver/CoverSystem/), but I've noticed that it's a bit old, and meant for UE4.
Does anybody know if it's still working on UE5, and does anybody have any guide on implementing it? Or any alternative?
Most guides I've found online have very basic cover systems based on the player's position that only take into account one "floor", eliminating any vertical gameplay.

misty wharf
#

He said he hasn't tried to get it running on UE5 and doesn't know whether it works.... but you could probably just try it and see if it compiles, it seems likely you may need to fix a bunch of things to make it compatible though

crimson token
misty wharf
#

No idea tbh. It seems this problem is more complex to solve than most expect, and making a general purpose re-usable system for it is not high on most people's todo lists

low oak
#

is EQS in UE5 is not experimental, as I cant see the experimental next to the EQS in AI setting

#

but in doc still said is Experimental, EQS is in unreal for many year, why still Experimental , what is the difficulties and bottleneck?

crimson token
#

I'm trying to think of the logic behind a cover system. More specifically, I'm trying to understand how I could tell an ai that they could spot the player from a specific cover.
So, let's pretend that I manage to create these 4 points - the orange spheres - through some logic (probably some line tracing), each one indicating a valid cover that protects them from the player - the red arrow.
I'm gonna feed these 4 points to the NPC's ai, which will decide which cover to pick, based on the position of the player.

Of these 4 possible covers, only 2 of them can actually give cover AND give the NPC a chance to shoot back - either from standing up behind the small wall or by leaning on the side.

The question is, how would I go about making the ai pick those two covers? What parameters could I give the EQS to pick the green points instead of the red points?

My best guess would be to shoot some extra line traces from certain offsets (eg, a line trace starting a bit to the right, to simulate the NPC leaning) and see if they hit any visual cover. But the problem with this would be that they'd be a really big amount of line traces, and I fear that they could be a real performance hit, considering that I'd have to redo this every now and then, when the player moves.

Do you know of any other system that I could use, or if this is an acceptable method?

uneven cloud
# crimson token I'm trying to think of the logic behind a cover system. More specifically, I'm t...

The EQS is time sliced. Meaning that there is a time limit on how much it can do in a frame. So you really shouldn't worry about how expensive it is until it becomes a problem. I personally would run it every 0.2 seconds to start with as that's the average human reaction time.

To make it even more efficient, you can also make your first test check if your current cover is still valid. You can make multiple generators in 1 env query and it will run them left to right until one of them is successful.

Yes you'll want to do line traces with offsets based on where they would be when they are shooting.

opal crest
#

Your best guess is pretty close to what I put together fairly naively. It works well with a single player (but ran into issues at the scale I was trying to use it at (an RTS)).

crimson token
#

Alright, I'll try that then, thank you

opal crest
#

And definitely take Luthage's advice on using EQS fallbacks. If your first generator uses filters pretty aggressively, it can make things a lot cheaper (since there's a lot of points you just won't test). You can always have a more relaxed fallback to the right.

quiet pawn
#

Hey all, just looking to confirm some weird behavior I am having with UE5. I have a behavior tree, fairly simple setup selector with a few sequences gated by BBValue decorators watching bool flags. The issue I am having is that the selector is acting like a sequence. Instead of running only the top most valid sequence it will run multiple valid sequences. So in this case I have behaviors for Follow, Flee, Hunt, Roam. Follow may be valid via abort both decorator, but once it runs Roam runs after. Is this a known bug? is there a current work around?

tired bluff
#

Hey can anyone help me...

Am having companion ai's in my game
They were not sensing enemy characters
As enemy character are also not sensing the companion player but if I possess any of the companion ai the enemy aj will start attacking on me

Help me out anyone 🥲

devout canyon
#

hi guys is it possible to quickly test if nav point is reachable?

#

also how to quickly get reachable point by actor near some location?

uneven cloud
uneven cloud
celest python
celest python
#

if it's a character, capsule's bounds * 1.15 (exclude Z) should be something enough i guess

uneven cloud
celest python
#

if performance is critical I think BP supposed to have an async path find function too, but not sure how it would work for things require constant update

uneven cloud
#

Haha Eren beat me to it.

#

Async path doesn't actually work. I think it used to, but it hasn't for a while.

celest python
#

Oh really? damn

#

I think I had issues with it too

#

I blamed myself for a while, so it wasn't my fault 😄

uneven cloud
#

Haha. I don't remember what is broken. Maybe it crashes when navigation is regenerated?

Doing a hierarchical test path before actually finding a path is cheaper, so I never really dug into it.

azure heron
#

how come I'm unable to set a MoveTo to an Actor object defined in the blackboard?

#

I have a target player object

#

*oh, I set it to class not object

quiet pawn
celest python
#

Actually I can test this during this week, I'm curious

#

I was wrote a top-down async path follower subsystem that manages agents movement states to FVectors, since moving to FVector requires a sync pathfinding everytime it was getting expensive. I might add an enum to switch between two and test quickly

lament linden
#

Any way to pass parameters to EnvQueryContext_BlueprintBase when selecting them in the EQS editor? The use case being that I want to generate the Grid points around some location vector that will be defined as a variable in the Blackboard. I can of course hardcode the blackboard key name in the EnvQueryContext_BlueprintBase class, but it would be super helpful if I can just set the name of the Blackboard key when selecting the context in the EQS editor. It would also make the Context much more dynamic if it could select any variable in the Blackboard instead of being stuck with only one hardcoded variable.

#

Here is what I mean. The first image is the EnvQueryContext, where is just returns the PatrolOrigin from the blackboard. The second image is when I select this Context in the EQS editor. I can say generate points around EnvQueryContext_PatrolOrigin because I hardcoded the variable name. Is there a way to parametrize the Key Name in the first image?

misty wharf
#

@lament linden Not via any easy and convenient way unfortunately. It seems to me you might as well treat contexts as simple task-specific things that you replace if you need to

uneven cloud
devout canyon
uneven cloud
devout canyon
#

@uneven cloud yeah I do similar thing where I scatter many reachable points across map from AI and find which one is closest to target, seems like eqs is similar thing

also I completely ditched built in ai behavior tree from ue, and made my own behavior tree inside blueprint

devout canyon
#

but I guess even if its faster its not worth the hussle, ue4 behavior tree is the worst thing in unreal I think so far

glass falcon
uneven cloud
glass falcon
#

More easier to use

#

Setting up a query with Bp nodes will be much more difficult than just setting up an eqs query

#

Plus queries can be used without ai

uneven cloud
devout canyon
#

ok but still eqs is out of options for me since i dont use that system at all

glass falcon
#

What system ?

devout canyon
#

unreal behavior tree

uneven cloud
#

You don't have to run the EQS via the BT.

devout canyon
#

basically any nodes that look like this

glass falcon
#

As I said above you can use eqs even in regular Bp

devout canyon
#

ok might check it out

glass falcon
#

There is literally a run eqs query node

#

Just that you have to bind callbacks on query complete

devout canyon
#

roughly checked it out, no matter what I need to test what point is closest, so I preferably will do it in blueprint by normal code

uneven cloud
devout canyon
uneven cloud
devout canyon
#

anything incorrect with that?

uneven cloud
#

A lot of incorrect assumptions there. It doesn't spam points. What makes it a suitable location is up to you. It could be a dot product to make the AI not overshoot the location. It could be the one closest to the AI. You make whatever rules you want.

opal crest
#

The one that wins is also configurable. You can take best point, but you can also have it choose randomly from the top 5 or 25%.

devout canyon
#

in every single image I find, there are spammed points across area to test

opal crest
#

It does generate a candidate set of points, yes. that's what the generator node does: determine which points it will test for suitability.

devout canyon
#

that is thing I wanted to avoid in the first place tho, because I already generate points with my blueprint solution

#

prety much just wanted to make sure there isn't something better 🙂

opal crest
#

There are some advantages to EQS over a BP solution (Which is why Epic wrote it in the first place). It intelligently time slices your query: Making it possible to write complex queries without making your game lag, the built-in generators are in CPP, so they are generally quite fast.

It also is smart enough to run cheap filters that disqualify points first.

#

So while you can probably do okay with your BP solution as a prototype, you'll probably eventually want some of the EQS features as you get closer to being done.

devout canyon
#

moslty I need to optimize coding manpower needed, performance in my blueprint is good and can be further be optimized

opal crest
#

Yeah, if your BP solution is getting the job done, I'm not going to tell you to change to something more complex 🙂

ocean wren
opal crest
#

But I will say that EQS is really nice once you're used to it. Makes it easy to reason about similar tasks.

ocean wren
#

Yeah, EQS basically works and is reasonably fast for medium scale

#

The main thing is to consider how you want to generate and test and score your points..

#

rather than just "spam" them 🙂

devout canyon
#

by word spam I meant generating them by some rules

ocean wren
#

Well, the main thing is to monitor performance and tune it for your use case

#

As someone mentioned, it does limit the number of queries it calculates per-frame, so as long as you don't need per-frame info, you should be fine

devout canyon
#

I think 99% Im bottlenecked by gpu since I can just spread all bp calculations over multiple frames

ocean wren
#

Well, profile it and see if that's the case

#

BP is slow as hell though, so don't use that per-frame where you can avoid it

uneven cloud
#

The main reason I brought up the EQS is that it has a fast test for checking if a path is valid, which is not available in BP.

earnest zephyr
#

Does anyone have recommendations for how to set up a flying enemy AI? The player can fly, and I want them to be able to get into dogfights with flying enemies. I've looked into DoN but it's pretty intense!

ocean wren
#

My main recommendation, is to try and treat it like fighting on a plane, rather than fully in 3D

#

I did an air combat online game once and while its tempting to go full 3D and do all sorts of stuff, from a players point of view its really hard to orient yourself, so do what the XWing vs Tie fighter guys did and try and keep it mostly horizontal

#

That said, there's plenty of dogfighting tactics like zoom and boom that are well known, so try and replicate some of them

earnest zephyr
#

thanks!

pure urchin
#

Hi everyone.
I would like to know if there is some tutorial explaining how create a character from scratch to use in Navigation IA, almost tutorial use Sample Project or ThirdPersonController.
Is there some tutorial more deep?
Another question too, is there some way to debug "AI MoveTo" macro?

crimson token
ocean wren
#

William Van Der Sterren and Remco Stratman from Guerilla.. might be a GDC talk on YouTube too

keen sonnet
#

hey can anyone show me a good unreal engine tutorial for sound tracking so the monster can hear your mic/actions in game

uneven cloud
deep bramble
#

I have the weirdest issue. My AI characters are setup to use Move To in parallel with a custom dash task. The task works just fine, they jump and perform a dash (launch character) and land but then they stop walking and just stutter step. The weird part is when I press windows key to get back control of my mouse out of the viewport the game runs at a slower rate (which is normal behavior) but now all of a sudden my AI is walking properly while the game runs with less frames per second. After I click back into the viewport to resume playing with normal FPS they stop walking and begin stuttering again.

keen sonnet
deep bramble
celest python
#

also

#

why are you launching the character while movement is active

#

that makes no sense

#

disable movement and then dash

#

I think CMC could stop path following if pending forces is higher than zero but not sure

#

I'd use root motion movement for dash rather than launching the character

#

like how GAS does

#

but one way another I dont understand why you need both movement and dash in parallel

deep bramble
#

because the dash costs energy which recharges overtime and they keep running while trying to jump/dash towards the target

celest python
#

use a decorator and selector

#

if dash conditions are met, selector will dash

#

when ends you can switch back to move to

deep bramble
#

thanks @celest python

celest python
#

nice blobthumbsup

deep bramble
#

wait no, its not fixed, a plain ordinary move to is causing the stuttering

#

and now they only dash once

celest python
#

check visual logger then

celest python
#

if you place it to the left, it'll be more prior

#

and if decorator return true, it'll switch to dash

deep bramble
#

The visual logger is the behavior tree while its running ya?

celest python
#

yes

deep bramble
#

okay cool, thought it might of been some other tool I'm not aware of

celest python
#

no wait

#

it's another tool

#

I meant you have to run vlogger while BT is running

deep bramble
#

hmmm im getting pathing errors

#

nav mesh looks good, there's no obstacles in the way its flat and green

#

and this is testing with just move to, no dashing at all

#

Same weird result when I alt tab out of playing and the game runs with low fps the AI walks normally

#

Okay weird very very weird, I've completely simplified my BT to just a single sequence. The characters stutter step their way towards the location extremely slowly when FPS is uncapped but when I cap FPS at 5 they run properly.

#

Ahh figured it out, my AI controller was ticking at 0.1ms instead of 0

#

I was experimenting with all sorts of different tick values for a lot of things and they were just all out of sync or something

lament linden
#

What is the preferred way of separating Sight/Hearing/Damage etc Senses in the OnTargetPerceptionUpdated event, or do I just check if the Sense class == Sight, == Hearing, and so on?

brittle trellis
#

How can I check if a Point is on the NavMesh and Reachable ? also how can I calculate the nearest rechable point on the navmesh ?

uneven cloud
uneven cloud
lament linden
#

Alrighty

uneven cloud
thick sparrow
#

@uneven cloud I tried to implement the smart object unreal engine docs quick start and it wasn't working. I searched here about smart objects and saw you mention it wasn't replicated. That's for calling that out, not gunna use it.

uneven cloud
celest python
reef flax
#

Very infrequently, we occasionally see our AI try to use a navlink but instead of performing a teleport which is what our SmartLinkReached event in blueprint does currently, the pawn instead follows a direct line between the navlink endpoints, with no obstacle/pathfinding, just a straight shot off a cliff if required to try and reach the second point. I am pretty well versed in the recast/detour system now, to the point I have some changes in the source to deal with navlinks that join navmesh over larger distances than a single tile size in unreal and have adjusted the A* costing so that these shortcuts are preferred without relying on using the distance as a cost for a 'free' teleport across the map. But I cannot for the life of me catch when/why the pathfinding fails to call the navlink event and still continues pathing as though the two navlink end points were just contiguous points along their path. Currently recompiling the PathFollowingComponent in engine to add some more logging to try and track it some more, but was wondering if anyone else has seen something similar? (sorry saw the relevant pathfinding chat, and thought it might be worth jumping in while there are some people that seem to know the system well currently floating about :D)

uneven cloud
reef flax
#

Yeah I do a pointlinks.Empty when I create the smartlink

uneven cloud
#

If I remember correctly, if its a nav link it checks the link ID map to see if it's a smart link.

reef flax
#

yeah, just recompiling that now to see if maybe the ID isn't set

#

good to know I might be hunting right direction, will let you know what I find from my log statements, almost done recompiling now

#

CustomLinkId seems good

#

hmmm

#

maybe it is just my teleport BP code being garbo 😦

#

haha will check that now

#

rabbit holes man

#

nope not that either, its definately not calling it, I guess I need more logging

#

Its like the AI turns around to following the next path point before it gets within range of the acceptance radius of the navlink, so maybe its related to some of our movement component settings, I did find that the only AI failing were ones performing a lazy walk, which is slightly lower movement speed than our regular walk animation.

#

might try that avenue next

uneven cloud
#

I would verify that the rest of the set move segment is treating it like a smart link. Also make sure you aren't accidentally repathing while it is using a nav link.

raw pawn
#

Hey
What can I use to make actor's movement more smooth? I mean I want to make a AI moves +500 X but he's moving a little on Y

#

damn have not idea how to explain this

celest python
#

start by explaining why it's not smooth

raw pawn
#

Before it does to me, it goes a little on my right

#

on the beginning and ending

celest python
#

so you want it to turn more smoothly?

#

Is that a character or regular pawn?

raw pawn
#

Character

celest python
#

alright

#

go to your character

#

open character movement component's details tab

#

disable Use Controller Rotation yaw

#

enable Orient Rotation to Movement

#

set Rotation Rate between 270-360, based on your desire

#

enjoy

raw pawn
celest python
raw pawn
#

Got it

#

Thanks man

#

It may sounds stupid
But for the first ~2 times it is like it was
But after ~2 walks it is fixed

ocean wren
# celest python <@152527068045770752> <https://twitter.com/WeirdStableAI/status/1564014506514186...

Interesting.. I mean they really shouldn't change it EVERY frame 🙂 you can use flow stuff to make it a bit more coherent.. But if you step it frame by frame, you can see that some of it looks reasonably coherent. I've got plans to experiment with generating a face and then using that, but driving it with some of my own video so that the performance matches. Stuff like that is pretty convincing.

celest python
#

each frame has a different style and its hilarious 😄

ocean wren
#

Yeah, that's generally not a good thing to do 🙂

lament linden
#

Hello hello. Any way to turn off tick for a blueprint BT Service? Does setting a really long interval work?

ocean wren
#

yeah, it will only tick at your given interval

swift rune
#

Hi everyone! I'm just asking for some advice - I'm creating an underwater scene and want my fish to move around randomly within a specific area.

I've been watching a few tutorials so far and I can't quite seem to find one that would be best used. I'm currently using a camera rig rail and have attached the fish to the rig rail which is all fine and good but if I want to loop the motion, the fish follow the exact same path and I want some variation.

Would it be better to continue on to use the camera rig rail or should I go down the path of using AI Fish?

Thanks 🙂

ocean wren
#

That'd depend how many fish you need really, and your level of understanding

#

isn't there a plugin for fish? I seem to remember seeing one

#

might be on the marketplace

swift rune
ocean wren
#

No idea, but I'd assume so.. kind of pointless making a plugin where you couldn't 🙂

swift rune
#

As you can see with all of the splines, it sorta looks like a fish theme park 😄

ocean wren
#

oh yeah, that is definitely not the way to do it 🙂

swift rune
#

I know that you can hide the geometry of the rails and it isn't rendered when the game is playing but I like how it resembles spaghetti 😄

ocean wren
#

Why use a rail anyway? why not just transform the fish using sequencer?

swift rune
#

So I'm using both Level sequencer and rail.

Rails because it allows the fish to move smoothly along the rail as opposed to me moving the fish using just keyframes

ocean wren
#

but you could just smooth the keyframes right?

swift rune
#

I could do but considering how many fish that I've got swimming around my scene, it will take a lot longer to use the curves when smoothing out each fish but yeah, you can do it that way

ocean wren
#

Well, you'd just select them all and do a keyframe reduction on em 🙂

swift rune
#

Good point - Didn't think about selecting them all 😄 Do you happen to remember the name of the fish plugin by any chance?

ocean wren
#

There's a few, just look for fish on the marketplace 🙂

#

fish v2 or something

#

uses houdini, so should be fast enough

swift rune
#

Awesome, Thanks for the guidance! if anyone else knows a good solution then please let me know!

ocean wren
#

not houdini, niagara

#

I've got houdini on the brain 🙂

swift rune
#

Ah yeah, I've found the plugin but it do be £52

ocean wren
#

Its the price of success 🙂

uneven cloud
swift rune
uneven cloud
# swift rune Thanks for the suggestion, will check that out and see how I get on 🙂

No problem. Epic did a how to video a while back that will walk you through it. BOIDS is an algorithm for creating realistic movement for animals based on flocking behavior of birds.

https://youtu.be/CqXKSyAPWZY

Displaying thousands of characters on-screen in real-time has always been a challenge - until now. Unreal Engine's Niagara visual effects system opens up doors to go far beyond what was previously thought possible and this presentation by Epic's Joseph Azzam showcases how you can utilize the power and versatility of Niagara to create massive cro...

▶ Play video
raw pawn
#

Can you recommend some good tutorial for AI? I cannot find one and I am doing so stupid mistakes that I cannot fix 🙃

#

I'd be glad 😊

uneven cloud
#

The AI with Blueprints one on Epic's learning site goes over all the systems and has a bit of theory in there as well.

raw pawn
#

Why this "robot" moves correctly in second> move?

quaint radish
#

When would I choose one AIPerception component over the other?

#

Theey sound the same to me..

#

Lots of words I am not familiar with enough to fully understand how these are different. I might as well read this as "stimuli register for perception gathers for owning actor".

misty wharf
#

"stimuli" is events that register with the perception system

#

a "listener" is something which receives something, and a "source" is something that sends something

#

so with that, it should hopefully be clearer that the stimuli source is for things that need to be "visible" to perception, and the other one is for things that are perceiving things

quaint radish
#

ooooh

#

Was not comprehending the actual name of the component. "AIPerception" perhaps should be called "AIPerception Listener" to help with the distinction. I assumed both components were basically listeners and Stimuli Source had more bundled into it or was an advanced option lol.

#

Thanks @misty wharf I would give you somehting for your time but currently there isnt a way to do that through this discord🙂

misty wharf
#

Damn you actually went and did it

#

I should ask more people to paypal me money

#

thanks lol

quaint radish
#

Just keep it in your profile info

#

I see how much help youre giving and want to encourage that kind of enthusiasm.

misty wharf
#

I don't know if my procrastination should be further encouraged by monetary gains but I appreciate it either way :D

quaint radish
#

The only issue I had was that email for your paypal couldve had 1 typo lol. Maybe update your paypal profile icon to match this one lol to make it look like the same person.

uneven cloud
raw pawn
uneven cloud
raw pawn
#

I checked everything
I have 2 NPCs
One npc has a lot of free space, the second one has 2 walls across the path
Why this second NPC is getting blocked?

#

I srsly have not idea

#

checked everything

lament linden
#

Hello, I am trying to implement something similar to the MoveTo task in the BehaviorTree, mainly because the AcceptableRadius parameter of MoveTo isn't parametrized. Here is my current setup. My issue is, this task cannot be aborted. I have a decorator on this task that aborts self when the GoalActor is not set, but it never does, and the MoveToActor event doesn't end without actually reaching the target. How can I cancel the MoveToActor?

#

As you can see here, CombatTarget is None but the task is still not aborted

lament linden
silent cove
#

Is it expected that “move to actor or location” will not work if the provided location is a wall or a ceiling? If so, what are my options?

uneven cloud
uneven cloud
quaint radish
#

How does this Set Value as Object know which behavior tree or which blackboard to apply the changes to?

#

This blackboard variable is only an option from the AIPerception component.

#

But it doesnt require me to specify which Blackboard to modify, yet somehow it is just working and I am seeing success with a conditional decorator checking for "TargetActor" is Set.

#

Just not seeing how its connected, and curious because there is the possibility of using 2 or more behavior trees, and switching between them.

#

so were on the same page, I assumed from this Make Literal node that I needed to create the TargetActor variable in my BTs BB lol

uncut python
#

im trying to run an eqs in a service but it is never able to get past Bind Event on Query Finished. How can i fix that? am i overriding the wrong function?

#

im trying to make it a node like this basically

#

i know thats built in the engine, but i want to check my team first

uneven cloud
vocal sinew
#

Does anybody know, how to remove navigation from inside of geometry or blocking triggers? navigation always generates inside collision and bots try to move there..

uneven cloud
#

Fill collision for nav mesh is the thing you need to check.

uneven cloud
# vocal sinew Its UE4

It might have been a 4.26 or 4.27 update thing, because I see the option in the screenshot you posted.

unkempt pulsar
#

How do I make an EQS Trace Test ignore the Querier?

dull relic
#

So its supposed to move (its a custom mesh with custom skeleton) and i tried the Blueprint script with it on a regular ue mannequin bp and stuff and it chased me but this one isnt moving?

ocean wren
#

There's a method that you can use to raycast on the navmesh. So use that and raycast towards your wall and stop at the end of the raycast

uneven cloud
#

The method is called project to navigation.

uneven cloud
uneven cloud
quaint radish
#

What is the dominant sense in the AIPerception component? Has me wondering if humans have a dominant sense. If I added sight and sound senses, with sight as the dominant sense, what would the results be and when does it matter?

misty wharf
#

That's a good question... I've noticed the dominant sense option as well but not exactly sure how that works. I'd assume if you get sense info for a given actor, it'll prioritize data from a specific sense if multiple are being used.... eg. if both hearing and sight have reported position, it'd use the position from whichever is dominant - but on the other hand, it also seems it would use whichever sense has reported stimulus most recently, so not entirely sure

quiet pawn
#

Hey all trying to find a solution to cpu stall / game hang. I have a small exploration game with roaming ai that flee from player. The issue I am running into is after about 15-20 min of run time the game starts experiencing lag spikes / hangs. I used profiler and narrowed issue down to perception component. Does anyone know why this may be happening and better yet how to fix it?

celest python
#

@granite vault today I tried detourcrowd and it works way better than classic RVO, just wanted to say thanks for mentioning it

keen crow
#

which EQS projection data trace mode is better performance wise? both navigation and geometry trace mods seem to work for me so I'm wondering which one is cheaper

celest python
#

Navigation should be faster, but EQS is timesliced

#

so it's a matter of if test should be completed faster or not

#

rather than performance

#

Sometimes when you go wild with traces and overlaps it takes too long to finish for an action supposed to be almost instantly

keen crow
#

ok 10q

elder perch
#

If you have several spawned characters controlled by your ai controller and you want to see the particular instance of the controller, how do you know which spawned controller is controlling which spawned ai?

keen crow
#

get pawn's controller and cast it to your AI controller class?

elder perch
#

I meant up here, how do I know who's AI controller is linked to which npc?

celest python
#

numbers match

#

AIController1 == enemy1

#

unless you spawn aicontroller manually

elder perch
#

Thanks

crimson token
#

I'm trying to generate the points that my NPCs can use as a cover, but when it comes to generating these points, all the standard shapes don't take into account multiple floors.

Are there common solutions to this?

wary ivy
#

you need to program a new generator for the points

#

so, do the same but instead of projecting them to navigation mesh you could do a line trace against navigation for each of the grid positions

#

it does seem to use ProjectPointMulti which should grab all navmesh points along the vertical axis at some point

#

but yeah, look into that 😄

crimson token
#

huh wait I get 404d by those links

wary ivy
#

link your epic account to your github account

#

there are instructions on epic's site somewhere

crimson token
#

Ah, alright, thanks

crimson token
#

I'm trying to build my own EQS Generator (the thing that creates the points that the EQS will later pick and choose) in blueprint.
All the info I've found online is in cpp, but I'm trying to work in blueprints.
I've created the generator class,but I really can't understand which node is supposed to create the point. Hopefully I've explained this clearly, if not, please tell me.

Does anybody know what node I should use?

brittle lynx
crimson token
#

Location generates a point in the given vector (for example, like the standard grid EQS generator does), and Actor generates a point where a target actor is?

brittle lynx
# crimson token Ah, thank you. May I ask what's the difference between actors and vectors, just ...

EQS generators can generate EQS items of different types (GeneratedItemType), storing different information.

For example:
EnvQueryItemType_Point stores a vector (location) + optional navmesh node reference.
EnvQueryItemType_Actor stores a pointer to an actual actor in the world.

Both item types have a common base class, so EQS Tests that expect the item to have a location will work with either type. E.g. if you feed items of type EnvQueryItemType_Actor into a Distance EQS test, it will use the location of the actor. If you feed it items of type EnvQueryItemType_Point, it will use the location of the point instead. Because of different item types, you can use EQS queries not only to decide between locations, but also between actors (e.g. use an EQS query to find the closest enemy to fight etc.).

crimson token
#

I'm definitely going by vectors, so far my plan is to generate a grid at ground level and line trace from top to bottom towards the generated points, creating a new point whenever I hit something

#

Hopefully this will give me a sort of 3D grid, so that my NPCs will take into account multiple floors when choosing where to go and/or take cover

twin hornet
#

whats going to happen if i set dynamicSubtree on RunBehaviorDynamic task while its executing? will it stop the current tree and start a new one? or can I somehow abort current task and switch to the next one? I was thinking about replacing the subtree with nullptr

brittle lynx
twin hornet
#

awesome, thanks!

crimson token
#

Does anybody know if I can expand on an existing EQS generator, instead of creating one of my own from scratch?

#

As I said, I'm trying to create what is basically a three dimensional grid, starting from a 2D one - so pretty much the default simple grid

wary ivy
#

@crimson token you could try c++, it isn't that difficult

#

once you know the basics

crimson token
#

eesh

#

Would the performance hit be that different?

wary ivy
#

no idea

crimson token
#

Right now I'm just trying the basics of the engine, I'm not doing anything fancy yet

#

If I could hijack the points generated by the stock EQS grid, I could go from there and easily generate the rest of the points I need, with just some linetraces

#

I could also just create a grid starting from nothing, I just feel like the stock grid is probably more optimized than anything I could make

wary ivy
#

I could perhaps whip up a generator using c++, shouldn't be too hard to copy paste that existing code and change it a bit

crimson token
wary ivy
#

you could plug it in your project and use it 😄

crimson token
#

Oh wait sorry yeah, I read that wrong

#

Thought you meant just copy pasting it lmao

#

I mean, if you have time and will, I would love that, yeah

#

It also wouldn't hurt me to look at how cpp stuff is managed

#

But also how are cpp projects handled when it comes to blueprint?

#

I'm guessing they can be somehow made into nodes, with inputs and outputs?

wary ivy
#

when it comes to EQS you just make a subclass of the appropriate EQS class and it shows up in the EQS editor

wary ivy
#

like so?

wary ivy
#

interestingly batched path length scoring doesn't work with that

#

normal

#

batched

glass geyser
#

Hey, I have the problem with Lyra that when I create a Map and let more AI spawn they get very often stuck on corners. Can anybody tell me how to fix it?

brittle coyote
#

I'm trying to figure out what causes such a dramatic performance decrease when many Lyra AI bots are added. I know I'm not pixel bound... Ive heard mention of the navigation being the issue. Can anyone explain or point me to a resource, as I havent not found much info in my searches. Thanks.

glass geyser
# glass geyser Hey, I have the problem with Lyra that when I create a Map and let more AI spawn...

oh my god after like 4 hours i fixed it:
Very time you move your "NavMeshBoundsVolume" (or change some settings) your navmesh gets new generated (click p or in show -> Naviigation) and for me it always was like a few units of. My Fix: Delete "RecastNavMesh-Default" then to let the navmesh generate a new area move "NavMeshBoundsVolume" for a very very little number (like 0.0001 in x direction) and then it worked for me

silent cove
#

Alright so I've got a bot that I want to keep moving in a straight line trying to reach its "goal location." But, as soon as it stops making forward progress (i.e. hit a wall, a player, etc.) it should just stop... Any thoughts on how I can best implement this? At the moment the bot just sort of slowly strafes sideways on whatever wall it hit trying to reach the location.

crimson token
# wary ivy

Sorry, I was out and didn't see a mention, but yeah that's exactly what I was trying to do

crimson token
# wary ivy normal

And you actually managed to make it calculate the distance based on the path length? That's mighty cool

#

I don't know what I'm talking about, but wouldn't that be super heavy performance wise? I'm guessing it's not doing the math for each point each time, but I thought that calculating paths was quite heavy

#

Anyway, may I ask how does it calculate the vertical points? Is it something along the lines of what I originally wanted to do, throwing linetraces above each point, generating new points everytime it hits something?

brittle lynx
# crimson token And you actually managed to make it calculate the distance based on the path len...

That's done by a built-in EQS test: Pathfinding (https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/ArtificialIntelligence/EQS/EQSNodeReference/EQSNodeReferenceTests/). There's two versions of it: regular and batch.

Pathfinding tends to be expensive, but EQS tests are time-sliced: they can take multiple frames to process all the items if it takes too long. Somewhere in the project settings (or some .ini file, I forget) it is configurable how long the game can spend on EQS queries per frame. IIRC by default it's 10ms per frame, which is likely too big (at 60 frames per second, one frame is `16.33ms long) and should be reduced to something much smaller, like 1ms or less. If an EQS test runs over this budget, it will pause processing and resume on the next frame. This way your FPS stays smooth, at the cost of EQS queries taking longer to complete.

The regular Pathfinding test calculates a separate path to each item in a time-sliced way. The batch version calculates a path to all items in one go, using an optimized but approximate (and less reliable) way. I recommend using the regular Path Length test as it produces more consistent results and can't cause significant lagspikes (a time-sliced test against 2x the number of points will just take 2x the number of frames to complete, but a batch test will actually take 2x the time in one frame).

brittle lynx
# brittle coyote I'm trying to figure out **what causes such a dramatic performance decrease whe...

You can get an approximate idea of what’s taking up the most time per frame by running the stat commands: https://docs.unrealengine.com/4.27/en-US/TestingAndOptimization/PerformanceAndProfiling/StatCommands/ . For example, typing stat Navigation in the console during gameplay, will display an overlay with statistics of how much time per frame navigation-specific functions take.

You can get an even more precise breakdown of what goes into each frame by doing a Profiling run: (also described in the link above).
You should start the game in the editor, use the stat startfile console command, play for a while, and then use the stat stopfile command. That will save a file with the recorded profiling data. You'll be able to open the file in Session Frontend window. There you’ll see a graph of frametimes, displaing how long each recorder frame took. For each frame you can see how long each function took to execute etc.

If you do this you’ll be able to find out what takes up the most milliseconds per frame, be it navigation or something else.

Console commands specific to displaying game statistics.

fringe patrol
#

the SetFocus node doesn't work for me for no reason, i tried many ways to get it to work and it just doesn't work at all, i even followed a tutorial and copied everything, maybe it's bugged in unreal engine 5??

uneven cloud
uneven cloud
fringe patrol
uneven cloud
# fringe patrol i don't know what that is exactly

It's a setting on the pawn: control rotation yaw. There's also another one in the movement component: use controller rotation.

Also why are you repeatedly setting it on tick? You set it when you want it and clear it when you want it to stop.

fringe patrol
uneven cloud
#

That's why focus isn't working. One of those has to be turned on. You don't need orient rotation to movement, because the path following does that for you.

#

Use control rotation yaw is safer, but the movement component one allows to tune the rotation speed.

fringe patrol
#

same result

#

i have the same code in a project in ue4

#

i'll see if i can find something

#

in this old project i have the same code

#

and the same rotation properties in this current one

#

this one is the current project

#

and for some reason it just doesn't work