#gameplay-ai

1 messages · Page 51 of 1

spice nova
#

Thank you!

pearl apex
#

hi all. I have a enemy ai that is moving to random nearby locations. When i hit the enemy I want it to stop and play a hit react animation. At the moment the behaviour tree move keeps the enemy moving/sliding across the ground while the hit reaction anim plays. What is the best way to do this. Is there a way to interrupt or sleep a behaviour tree or would it be better to set a variable/flag on the blackboard when the hit occurs and use a selector to stop the move_to?

uneven cloud
#

One of the biggest costs to Move To, regardless of if it's called from the BT or BP, is if there is no path. The EQS can test if a path exists by using the considerably cheaper hierarchical path test.

But ultimately, how expensive something is entirely depends on what exactly you are doing and how you are doing it.

uneven cloud
pearl apex
uneven cloud
pearl apex
#

AAIController?

uneven cloud
#

The behavior tree component

#

The lock/unlock BP ones are in a BP function library.

pearl apex
#

I had a look through c++ class and there is no pause function?

strange marsh
#

Fixed the issue

#

Was the trace settings

pearl apex
uneven cloud
pearl apex
#

CastChecked<AZombieController>(GetController())->GetBrainComponent()->PauseLogic("Hit React"); Im calling it like this and it does nothing : (

wary ivy
#

if you want to stop the zombie then I'd just adjust the movement speed of the actor for the duration of the reaction

pearl apex
#

that is really hacky though

#

Im trying to do it with gameplay tags now

#

hmm this doesnt work either. Im turned hit reaction into a gameplay ability that applies the busy tag

dapper sky
#

Any recommendations for an AI system asset? No budget cap.

wary ivy
pearl apex
# wary ivy I don't see how it is

It is a specific solution that only works for hit reaction and move to and doesn't solve the general problem of aborting or pausing a blueprint so you can let something else take over. Heres an example: what if i want to have an ability that can steal movespeed. If i implement this ability 6 months down the line, it will behave unexpectedly and I will spend ages trying to figure out why.

#

The last post on this thread seems to be the most elegant way to solve this: https://forums.unrealengine.com/t/getting-ai-to-interrupt-abort-behavior-tree-moveto-task/306919/23 but its still pretty clunky. Maybe BT's are not the way : (

#

seems to be a common problem

harsh storm
steady quartz
#

Hi! I'm trying to make an AI walk around an actor, like, on a circle path around it. Is there a way to make this? I think constantly firing an eqs would help, but I am lost on how to make it.

I don't care about the target actor's rotation, I just need my AI to walk around it

#

Kind of like this, but around an actor:

misty wharf
#

You could use EQS to generate a set of points around the actor perhaps, and then just have the AI walk those points in order

steady quartz
#

Is there a way to get all the points and walk in order? Cause the eqs only returns the best option doesn't it?

misty wharf
#

You can choose the query mode, one of them returns all the generated points. I'm not sure but I would assume it would return them in order

steady quartz
#

oh okay, thanks!

misty wharf
#

GorkaGames has graduated from using PawnSensing!

#

Their latest video uses AI perception lol

harsh storm
#

That's why I said they're following the Brackey's approach

#

Shotgun videos out there. Doesn't matter if it's right.

#

It'll eventually be right

#

GDQuest from Godot did the same thing

misty wharf
#

I'm still of the opinion that if people find value from them then there's clearly something right about them

harsh storm
#

The "right" is that they exist

#

Just because something exists doesn't mean it is right though.

#

A complete beginner gets value out of it because they are a complete beginner. But it stunts their growth in the end.

misty wharf
#

I don't think it does

harsh storm
#

Don't know what you don't know. So you trust this person who has X amount of subscribers

#

Not saying people have to be perfect teachers and what not.

misty wharf
#

Using a less than optimal tool doesn't necessarily slow down learning to use something I think

#

If you can write systems using pawnsensing, switching to ai perception shouldn't be that big of a deal imo

harsh storm
#

If they're teaching people to use this long deprecated feature - what else are they doing incorrectly?

#

It builds on top of itself

misty wharf
#

Well if it works then it works, if it's not the exact right way of doing it, it's easy enough to correct

harsh storm
#

And I disagree with this mentality in the context of learning

misty wharf
#

Sure - the things that are being taught should be the right things

#

However if there's a hole in the path to learn something that isn't being filled by anything that seems worse than it being filled with at least something

harsh storm
#

There isn't a hole in this regard though. It's people not looking in the right places. IE - not YT

#

Where the goal isn't for you to actually learn

#

But instead - get views

misty wharf
#

I think there's a lot of easier ways to get views than making shoddy tutorials

harsh storm
#

It's faster to make videos about incorrect understandings than properly researching and learning a topic.

#

The entire strategy is to keep pumping out videos. Especially more so with clickbait-y titles and thumbnails.

misty gale
#

Things being taught is often outdatet

#

Both from courses and yt. Aswell as schook material

misty wharf
#

For all I know half of the stuff I'm doing could be all wrong but since I have a fair amount of experience in general I can at least make an educated guess that it might not be lol

harsh storm
dim lynx
#

hi, how can i call to this?

misty wharf
#

Well it didn't take long for the basic perception questions to start after that Gorka video :D

misty wharf
dense owl
misty wharf
#

at least makes content people seem to like to watch ¯_(ツ)_/¯

harsh storm
#

People who don't know anything like watching anyone that will show them how to do w/e it is that they're doing.

#

And YT's algo favors frequent uploaders as well

misty wharf
#

well if it helps people get their game projects moving then that's all good by me... if they never figure out they might need to learn better that's on them

#

I'm self taught and I'm sure a lot of what I used to learn wasn't exactly correct but I spent the time to improve because I knew I probably should

dense owl
#

Granted, I think we just find it annoying because we end up having to correct the same mistakes over and over from all the people that watch his videos and then come here because “it doesn’t work”

#

Nature of the game tho, I suppose

tough ermine
#

so im following along on that pinned ai course, and i got to the navmesh section

#

im wondering if that will work on a 2d platformer

uneven cloud
uneven cloud
harsh storm
#

Up in one of the other channels, someone took a quick peak at one of GG's tutorials (the horror game one) and he was just telling people to put a value into a field. No explanation on why or what it does or how they came up with that value

#

And THAT'S what I strongly dislike

uneven cloud
#

There's no hobbyist tutorials that explain their thought process for any of it. Or any of the WHY. It's a shit way to learn code (BP is still code). Coding is all about making decisions by weighing the pros and cons of different approaches. But what you get is people expecting to find the one way to make an inventory, when the answer is it depends.

harsh storm
uneven cloud
thick walrus
#

Copy and pasting code is a fine way to learn. Then you want to make adaptations and need to understand parts of the copied code. This way you can learn step by step but you can accomplish a little more than when writing everything from scratch, which is a nice way to stay motivated imo

signal island
#

I run a EQS Query in C++ and it doesnt show in GameplayDebugger :c
FEnvQueryRequest RequestedAIMovement{EQSQuery,Target};
RequestedAIMovement.Execute(EEnvQueryRunMode::AllMatching,QueryFinishedSignature);

uneven cloud
mortal bay
#

I have a UPercpetionComponent in my custom AIController that's set to detect only enemies. I've overridden GetTeamAttitudeTowards in the AIController, and despite returning Hostile, the perception component is not triggering OnPerceptionUpdated consistently. Does anyone know why that might be?

haughty tide
#

Can somebody explain to me, how instancing works for UBT_Node derived classes e.g Decorators, Services. If I have two controllers and they run the same BT, using a service. Will that service be instanced for each BT or it will be a CDO ? I don't really get when to use node memory and when not to.

uneven cloud
haughty tide
#

So in a node if I have class members that I want to save and I don't use a memory structure, the node will contain the same info for all npc running the tree ?

#

So in other words the node will be of default value for all.

uneven cloud
#

Yes.

#

It doesn't use the CDO. Let's say if I have 2 different BTs that both use the same service. If I have an exposed member variable that is a float Distance. In 1 BT I set that variable to 100 and in another BT I set it to 200. Any AI that uses the first BT will have distance = 100.

#

All functions should be considered const. Meaning that they do not alter any member variable. You can alter variables in the node memory, but not member variables.

haughty tide
#

Ohh I remember that from the docs. So it's a good practise to set everything to const if it's a class member.

#

If you find yourself needing to change it, move it to the memory structure

uneven cloud
#

You can set BT nodes to be instanced by setting a bool in the ctor, but you lose some perf benefits

uneven cloud
#

Any member variable should just be whatever you want to set in the BT.

frosty quarry
#

Does anyone know how to make it so that when the Variable "Inside" is set to true, my Enemy AI stops chasing me?
Image
This 2nd image is a BP that makes the AI lose me when i am out of its pawnsensing but the issue is, it loses me too easily so i want to make it where when i am hiding in a closet with the Variable "Inside", it stops chasing me and continue with its task and roams around the map
Image
Much thanks if anyone help, and feel free to ask me to send any UE screenshots if you need more information, The whole Enemy AI was made from watching Gorka's Horror game tutorial video
https://www.youtube.com/watch?v=QoXxNpTyuV0&t=3369s&pp=ygURZ29ya2EgaG9ycm9yIGdhbWU%3D

Hello guys, in this detailed and simple tutorial we are going to learn how to make a full First Person Horror game in Unreal Engine 5.
↪️Project Files: https://bit.ly/GorkaGames_Patreon

🔊 FREE SOUNDS:
Footstep: https://freesound.org/people/RonaldVanWonderen/sounds/110099/
Jumpscare: https://freesound.org/people/dangthaiduy007/sounds/341670/
Sta...

▶ Play video
harsh storm
#

sigh

#
  1. PawnSensing is long deprecated. Use AIPerception instead
  2. It was a weee bit hard for me to follow what it is that you want to do. Are you saying the AI loses you as soon as you enter the closet but you want it to be more like a delayed thing?
#

A really simple way to do things is to get a reference to the player and just check for that variable.

crisp coyote
#

I'm getting this really weird issue with my BT where my AI is defaulting to a state that it shouldn't be, and I'm having trouble debugging it. I'm using a basic utility AI service to decide whether to attack, defend, or perform a utility, and its just defaulting to attack every time, even when I try to default the service to utility. The odd thing is that when i try to debug in game, the blueprint has the two pawns as options under the debug object selection drop down. Anyone have any thoughts or willing to help me walk through this?

#

this is what the BT looks like rn

uneven cloud
crisp coyote
#

Nah im justm dumb haha i was casting to the wrong controller class

#

blocked up my whole BP

#

changed my thinking on how to do AI halfway thru and then forgot about it, so I was using a deprecated class on accident

uneven cloud
#

Services are run while the branch is executing. Your set up will not work unless you tell it to tick on search start.

crisp coyote
#

Ok, yea now i'm noticing that my service only runs once. How do I get this to run repeatedly? I'm thinking its because im using a selector but not sure

uneven cloud
#

A service ticks while the branch is executed. So if the branch doesn't stay there, it won't tick.

If you turn on tick at search start, it will call the tick before the BT searches for a task to use.

crisp coyote
#

Ok I see, i was using on activation AI, not on tick.

uneven cloud
#

Do you understand how a service works?

crisp coyote
#

its been a while since I have looked at this stuff, so maybe not. My understanding is that its a BP that runs in the background while a branch is being executed, and you can use that to update various values as needed, whether they're blackboard keys or otherwise.

frosty quarry
harsh storm
uneven cloud
frosty quarry
#

is ai perceptionmuch better than pawn sensing? should i use that instead?

harsh storm
#

PawnSensing is old and outdated. AIPerception supercedes it

#

It's how you should be doing it.

frosty quarry
#

understood

#

thx

harsh storm
#

The person who made that tutorial is just spitting out videos. Quality be damned

frosty quarry
crisp coyote
harsh storm
#

To solve your immediate issue though - just don't clear the BB value when you lose sight. So the "Stop Seeing Player" thing you set up. Just don't do that

uneven cloud
#

The best way to learn AI is to do the introduction to AI with Blueprints, it's linked in the pinned messages

harsh storm
harsh storm
#

Yeah. Because that is what is making you lose sight (based on the 2 screenshots you gave)

#

So the PawnSensing component will trigger to SEE them.

#

(Though, seriously, don't use that. Switch to AIPerception)

uneven cloud
#

AI should also be done in the controller, not the character

harsh storm
#

That too

#

Controller = Brain
Character = Body

#

Brain tells body WHAT to do. Body decides HOW to do.

frosty quarry
harsh storm
#

AI

#

What she is saying is, this logic shouldn't be on your character

#

It should be on your AIController

#

Why is Gorka telling you to clear the "SeeingPlayer" value every 0.2 seconds??

uneven cloud
#

The first person controller is a player controller. AIs are not players

frosty quarry
#

ohh so This image should be in my BP_AI_controller?

harsh storm
#

But yes - that logic should be in the AIController.

uneven cloud
frosty quarry
harsh storm
#

It's a minor setback, sure - but it'll help in the long run. Build better foundations and all.

frosty quarry
#

[4602.03] Compile of BP_AI_Controller successful, but with 1 Warning(s) [in 33 ms] (/Game/AI/BP_AI_Controller.BP_AI_Controller)

frosty quarry
#

thanks guys

#

and girls

harsh storm
#

It's complaining because you don't have a PawnSensing component on the controller most likely. So that "On See Pawn" event isn't legal.

frosty quarry
#

ahh

vivid drift
#

do behavior trees ever get... silently corrupted or something?

dense owl
vivid drift
#

mine is starting to get stuck on debug nodes that immediately finishing tasks in a sequence...

uneven cloud
#

Use the visual logger to debug

vivid drift
#

wtf is going on here?

#

the visual logger, which I'm not very used to, suggests that the selector child has changed from 1 to 0 (implying it should be on the left, correctly), but this does not appear to be reflected in anything else

vivid drift
#

sigh... it was an incomplete override of abort

mortal bay
#

If I have an NPC with an AIPerceptionComponent on its AIController, do I have to have a UAIPerceptionStimuliSourceComponent on all actors that I want to alert the AIPerceptionComponent, such as other NPCs?

uneven cloud
mortal bay
#

(This is when there is a detectable character in range -- and I can see GetTeamAttitudeTowards being called)

uneven cloud
mortal bay
uneven cloud
mortal bay
mortal bay
# uneven cloud There is nothing called the AI debugger. The gameplay debugger is the debug dra...

I tried using the gameplay debugger. I can see the enemy NPC enters the bounds of the perception component, but still, it doesnt trigger OnPerceptionUpdated consistently. It's only rarely.

Here is the code I'm using in the AIController constructor to create the perception component:

    DistantPerceptionComponent = CreateDefaultSubobject<UAIPerceptionComponent>(TEXT("DistantPerceptionComponent"));
    UAISenseConfig_Sight* DistantSightConfig = CreateDefaultSubobject<UAISenseConfig_Sight>(TEXT("DistantSightConfig"));
    DistantSightConfig->SightRadius = 1600.f;
    DistantSightConfig->LoseSightRadius = 2000.f;
    DistantSightConfig->PeripheralVisionAngleDegrees = 180.0f;
    DistantSightConfig->DetectionByAffiliation.bDetectEnemies = true;
    DistantSightConfig->DetectionByAffiliation.bDetectFriendlies = false;
    DistantSightConfig->DetectionByAffiliation.bDetectNeutrals = false;
    DistantPerceptionComponent->SetDominantSense(*DistantSightConfig->GetSenseImplementation());
    DistantPerceptionComponent->ConfigureSense(*DistantSightConfig);
    DistantPerceptionComponent->OnPerceptionUpdated.AddDynamic(this, &ANPCAIController::DistantPerceptionUpdated);
uneven cloud
mortal bay
uneven cloud
mortal bay
fading solar
#

hey, how would one go about implementing spawning ai out of sight? any tips?

#

have trouble finding an out of sight spot to spawn ai at since I can't run an EQS query on a player

sudden citrus
#

Is there a benefit to running World Partitioned navigation on the dedicated server? Or is it only about being able to stream it in with WP map chunks

sudden citrus
vivid drift
#

is there any way to disable the detouring behavior of a DetourAIController?

sudden citrus
#

don't use it, that's the only thing it does.

misty wharf
#

If you want to conditionally disable it sometimes, you can probably adjust the settings on the detour component but I don't know if any of those settings are exposed to BPs

vivid drift
#

that's fine. I'll look into it I guess.

I have a hefty stack of enemy unit controller base class stuff built on top of this one, and now have one variety which should just ignore others...

misty wharf
#

I think there are avoidance groups you can set which should allow you to do that

#

But yeah if it's just one particular type of AI that doesn't avoid the others, having it not use the avoidance comp would be one way to go about it... but if all your logic is in the controller class, then I guess it's gonna require some refactoring

vivid drift
#

im amused seeing that that the detourai class seems to be just the regular one plus a component with literally no other implementation details

#

oh, hmm, but do detour ai avoid non detour ai

misty wharf
#

They can do that but you probably need to manually register it with the crowd manager

vivid drift
#

yeah ok that tracks

misty wharf
#

I don't recall off the top of my head whether regular AIC's have it or not

vivid drift
#

scrolling through the path component, looks like no.

fading solar
sudden citrus
#

I mean, you'll need linetraces against the context, but if you want to check for something relative to the player, then the player should be a context.

fading solar
#

but the ai doesn't exist in the world yet, I'm just looking for the correct spot to spawn them

vivid drift
#

something is spawning them

#

that thing can run the line traces

fading solar
#

mmhm, I'll look into it some more, never used EQS 😒

#

thanks for the tips!

stable falcon
#

Hi Guys, I want to Sync my Line cast for shooting with AI animation for shooting(which is montage).

#

right now i can line cast before the Animation starts but it doesn't look realistic

#

or i can line cast after the AI animation finishes i dont want that either

#

how can i do that

stable falcon
#

can I raycast by triggering a animation Notify State ?

#

is it a good thing for making an AI shoot by triggering a Animation Notify State ?

sudden citrus
#

don't try to do a very specific thing too quickly, you'll run into problems with the basics

#

patience 🙂

stable falcon
#

guys is it good thing to make the AI shoot through Animation Notify state ?

dense owl
#

Be patient

#

What is this line cast you mentioned

#

Guessing you mean line trace

#

I think generally you want to talk to the animation from regular bp/tree, not the other way around

mortal bay
#

In other people's experience, is AI sight highly influenced by the height of characters and the terrain they're on? I'm finding that my character is detecting other characters very inconsistently. I imagined sight would function more like a sphere, but when I checked the gameplay debugger the line of sight seemed extremely thin

solid osprey
#

anyone had the issue where ai send each other flying when they bump into each other, but just once in a while? I've fixed this problem a few times but usually its just having the right combination of capsule collisions etc. tricky one to replicate consistently also.

misty wharf
uneven cloud
uneven cloud
drowsy raven
#

Guys, 'AI Move To' (and other systems) goes to the specified location, which is good. But it goes by looking at that location. How can I make it go there by looking at the location I want?

I can adjust this with 'Find Look at Rotation', but the 'look' system in AI Move itself prevents this. I need to disable it, or change it?

uneven cloud
uneven cloud
drowsy raven
uneven cloud
uneven cloud
drowsy raven
#

Yes, I hope it's works. Trying now

stable falcon
#

Thanks

drowsy raven
crisp coyote
#

im getting this odd behavior with my BT where my services are running, they evaluate that the pawn should move towards his objective, so he does. Then the target gets set, so it should attack, it evaluates an attack, and then just...quits and remains on the root node. Any suggestions on fixing this? Here's what my BT looks like, happy to provide anything else

#

Probably a little hard to see, but at this point, the service has deemed 'throw grenade' to be the best option. So its in that state, but doesn't execute any of the nodes under that branch

uneven cloud
crisp coyote
crisp coyote
open swift
#

For those of you who have enemies that use abilities with various range/positioning requirements: when an enemy is moving into range or moving to a desired spot to use an ability, do you constantly re-run the EQS query to keep their movement goal updated? Is there a way to pass in a previous query result to see if it is still valid in a later query?

uneven cloud
uneven cloud
crisp coyote
open swift
#

Oh wow I didn't realize there was an early exit built in. So I just need to make a custom generator where I can pass in a blackboard key and run the same filtering logic as the other generator in the query?

uneven cloud
open swift
#

do you do that for every query that enemies will be using? like each one has an extra generator in front where you've essentially copy/pasted any filtering from the main generator?

uneven cloud
open swift
#

Alright, thanks

crisp coyote
uneven cloud
crisp coyote
uneven cloud
modern owl
#

Is EQS the best way to make an influence map nowadays? I need like a 3v3 AI so I'd like units to be able to move around enemy attack/ability ranges. Like a moba bot basically. What would be the best way to get started on that?

crisp coyote
modern owl
#

@vast relic I know you were looking into influence maps did you happen to have any words of wisdom

crisp coyote
uneven cloud
#

The EQS however could be a way to do what you are looking for, just in a different way

modern owl
uneven cloud
crisp coyote
crisp coyote
#

Ah ok, i figured it out. Was a combination of bad service coding and then using a sequence instead of a selector. The sequence was cancelling the branch as soon as the low level state was wrong

alpine rover
#

could anyone help with doing a blueprint and behaviour tree combined system that chooses the directive based on the largest available float percentage out of 1 for dynamic behaviour such as switching to the harvest behaviour while patrolling or idle. dms appreciated

uneven cloud
tough acorn
#

Hey guys I have this precise navmesh, but I when I try to use FindPathSync() to get the points from the result and follow them, I'm not getting an accurate path at all. Pictured is the terrain, and the solid line is how a lot of paths typically go when I want the dotted line.

#

There's enough triangles, so why is it only generating two points? It keeps going over valleys and through mountains like it's barely using the mesh.

misty wharf
#

If it doesn't need to turn I don't think it will create more than one point

#

What you get from it is not the exact line the actor should take, it's basically waypoints that can be walked to in a straight line iirc

tough acorn
#

So I'd have to subdivide between the points for the elevation myself?

#

man

misty wharf
#

I'm not quite sure why this seems so complicated. If it's a character it has gravity applied to it, so if it's walking in a straight line, it would follow the contours of the terrain

final loom
#

Anybody here got the faintest how I could make 3d sphere navigation?

#

Like for a planet? Instead of a flat plane as all games do it otherwise?

lyric flint
#

Custom decorators are constantly called, right?

#

As in, if I have a custom function on a custom decorator that function is being called every frame?

dense owl
#

Depends? Is that branch firing every frame?

lyric flint
#

It's attached to a MoveTo node. I need my AI to stop moving once it's in range and LOS, which is what the function checks.

My understanding is that if this was a blackboard-based condition that it would only trigger once the relevant blackboard value changes.

As it is right now I imagine that every frame that MoveTo is still executing it is checking that function

dense owl
lyric flint
#

Yeah, a service that will set a key right? Then my decorator would be blackboard-based around that key?

dense owl
#

Or a decorator that checks a BB key every tick, if that’s what you need. Or both. World’s your oyster

lyric flint
#

I have this custom decorator but this seems like it should be redundant.

#

I'll redo the decorator on the movement to be blackboard-based and I'll have a service set the key since that seems to be the most optimal. I don't need the movement to be interrupted on a frame-perfect degree

tough acorn
misty wharf
#

Tbh I would have expected it to give you a path along the surface also :)

#

but I guess it simplifies it since it assumes straight line movement or something

dense owl
#

As the crow flies, prly helps keep more accurate distances

uneven cloud
uneven cloud
final loom
#

Oh Character Movement Component?

uneven cloud
#

Yep

#

Using gravity to stick to the ground will cause jittering.

final loom
#

Ah.

#

Any ideas how I could make pathing for a sphere world?

#

Kind of like Super Mario Galaxy, but for NPCs? I already saw a thing online for doing that with character gravity

misty wharf
misty gale
#

This fact took me by surprise aswelll

#

Suddenly pawns be flying

#

Currently doing some crazy linetrace along landscape

neat hatch
#

so, I wanna have the ai to smoothly stop at the destination, and Use Acceleration For Paths is the solution, but now there's a different issue
when it chases a player, and the player tries avoiding the ai by moving in circles without moving anywhere, the ai struggles to reach the player cause it is strafing even tho Allow Strafe is off

#

if I have Use Acceleration For Paths disabled, the ai will reach the player with ease

#

and I can't change that option through blueprint

#

it should've been possible to do that in blueprint

#

but nop, its C++ only

#

ah wait, pffff
I completely forgot about "Use Fixed Braking Distance"

tranquil reef
#

Hey!
Any idea what RequestStimuliListenerUpdate does?
I was thinking that it would update the common PerceptionComponent events but it seems like it does not.
(I'm looking for a way to get a perception update while an actor is perceived, not only when it enters and leaves the vision cone)

neat hatch
#

what do you mean by "while an actor is perceived"?

tranquil reef
#

I see that there have been a lot of discussions about that already.
...what I basically need is to force update the Perception events

neat hatch
#

like, get the stimuli data from it?

tranquil reef
neat hatch
#

ah, to make it update every frame?

tranquil reef
tranquil reef
misty gale
#

Probably requires c++

#

Is that an option?

tranquil reef
# misty gale Is that an option?

I'm not super good with it but did gameplay programming with it.
So I probably could figure it out 🙂

...I'm just surprised that there is no easy way to do that. In the forums/reddit you read very often that the perception system is kind of flawed^^
EDIT: the On Perception Updated is flawed

misty wharf
#

People say this but I've yet to hear how it's flawed

misty wharf
#

The way to do what you want is to use a timer. You can get a list of currently perceived actors from the perception comp, and their stimulus data

tranquil reef
misty wharf
#

Oh luthage says it's deeply flawed

#

okay in that case I believe it

#

lol

misty gale
#

Rip

tranquil reef
misty wharf
#

the person who replied to that post and also same name here, she's quite knowledgeable about various AI systems and stuff

tranquil reef
misty wharf
#

although I don't recall having had that exact issue she specifies 🤔 maybe I misremember, the force stimuli listener update thing might fix it also but yeah not 100% sure

tranquil reef
# misty wharf although I don't recall having had that exact issue she specifies 🤔 maybe I mis...

To give some context:
My Issue is that if the enemy reacts to a noise event it shouldn't set CanSeePlayer = true because it should first investigate the noise location. The problem is though that when the noise event originates from the player location and the enemy turns to the players location (basically see's the player) CanSeePlayer will not be set to true because the perception event executes the hearing sense branch 🤷‍♂️

tranquil reef
misty wharf
#

You should be getting two separate events if you get two separate senses like that

tranquil reef
uneven cloud
tranquil reef
uneven cloud
misty wharf
#

Yeah I haven't used it for that, just for triggering an update when updating affiliation, I recall it was needed for that to work

uneven cloud
#

Definitely needs to be called to change teams.

polar sleet
#

Different kind of AI, but I managed to run Reinforcement Agent in UE5. (it's WIP and everything is rendered on CPU). Gonna leave it learning for couple more hours.

stable falcon
#

hi guys i need help in unreal engine AI Finish Execute called faster than the Event received abort AI

#

so that Event received abort AI is never called cuz Finish Execute (true) is called before abort AI

misty wharf
#

Well you are calling it yourself immediately

#

You need to call Finish Abort on the abort event by the way, not Finish Execute

#

But if your logic runs to Finish Execute on Receive Execute, then obviously you can't abort it anymore because it already finished. Only nodes that perform latent actions can realistically be aborted.

crude harness
#

Is it acceptable to set a Blackboard value within a Decorator, or will I be labeled as a poor AI developer?

dense owl
#

Who’s reading your code and giving out labels?😀

crude harness
#

ahah mostly, the "future me". My question is just to be sure that i'm not creating an issue that I'm not aware yet

dense owl
#

Not sure, I usually use decorators to check values not set them

mortal bay
#

While a character is detecting another character using the UAIPerceptionComponent, in the gameplay debugger, would you expect the sphere that indicates a character being perceived to be continually updated as the perceived character moves around? Or would you expect the sphere to stay in the place where the character was first noticed?

muted heath
#

yo anyone know how to make the ai shoot a projectile at a player that is on a different level than them, without using line trace?

misty wharf
#

Same way as you make it shoot a projectile at a player that's level with it?

muted heath
#

no like the ai is higher or lower elevation to the player.

harsh storm
#

It really shouldn't matter

#

You're just giving the projectile a target vector to go towards

#

elevation is taken into account

muted heath
#

i need to do this without using line trace. there projectiles are not hit scan.

harsh storm
#

This changes nothing

#

Get reference to the target
Get target's location
Shoot projectile towards location

harsh storm
#

Node for what?

muted heath
#

to shoot at target

harsh storm
#

There isn't a node "shoot at target"

#

If your projectile has the projectile movement component, it might have something like that. idk

#

I just gave you the logic. Turn that logic into code

dense owl
#

pseudocode basically

muted heath
#

are you talking about line trace?

harsh storm
#

For the 3rd time. No

#

Which part are you having issues with?

#

And why do you think we keep referring to how to do it as a linetrace?

muted heath
#

it wont shoot the projectile at an angle only straight, like this.

#

it goes right over my head

harsh storm
#

Yeah - because you have to do the math to give it a trajectory.

muted heath
#

lol

#

can you point me in the right direction?

muted heath
#

i figured it out this is what fixed it.

pearl apex
#

anyone here familiar with state trees? How do I pass data from the state tree to state tree tasks?

#

I want to pass the context actor to a state tree task

pearl apex
#

dw i got it

turbid plume
#

Please direct me if this isn't the right channel for this, but I'm having an issue with smart links/navmeshproxies. I have a working NavLinkProxy, except for certain starting positions of the navigating character, the path data seems to be invalid? It causes the smart link event to not fire. I've traced it to the following segment of engine code in PImplRecastNavMesh.cpp around line 1532-1537:

                const dtOffMeshConnection* OffMeshCon = DetourNavMesh->getOffMeshConnectionByRef(CurVert->NodeRef);
                if (OffMeshCon)
                {
                    CurVert->CustomNavLinkId.SetId(OffMeshCon->userId);
                    CustomLinks->Add(FNavLinkId(OffMeshCon->userId));
                }

Sometimes the navmesh generates a path with a valid connection for that segment, sometimes it points to a different connection in memory with the same endpoints but userId is 0/invalid. I'm kinda lost here.

lyric flint
olive turret
#

Does anyone know how you can have a cooldown on a task that doesn't fail the task if it was in cd. Built-in cd decorator fails the task and it also starts with cd instead of starting as ready. I am basically trying to add an attack speed check before using that task.

misty wharf
#

You need to make your own cooldown if you need it to behave differently from the builtin

#

I'm not sure how you would not fail the task though - what is the point of the cooldown if it doesn't stop the task from running?

dense owl
#

Maybe he wants to know why it instantly fails the first pass

#

I always wondered that, tho I prly missed some obvious setting

misty wharf
#

I think it's because Epic doesn't understand what a cooldown is

#

:P

#

There's no setting for it as far as I know

#

Although a while back there was someone here saying it works differently in packaged so who knows what's up with it

zealous maple
#

Anyone know for what reason my AI is moving fine when playing in PIE on a nav-mesh, but in a packaged Windows build they no longer move even though the nav-mesh is there? I have build navigation and all, so I don't know the reason.

olive turret
latent geode
olive turret
zealous maple
#

Ah, okay! Thanks will do!

misty wharf
latent geode
#

You can also use state trees instead BIGEYES

misty wharf
#

That doesn't solve anything :P

#

It's just a different way of structuring it and it has its own features you need to understand to make it work

latent geode
#

You can be in a specific state that you need to be in and you can literally "wait" in that state if you don't pass certain conditions, hence you technically don't need to re-evaluate the entire tree to check those conditions again

latent geode
stable falcon
#

Hi guys I need help, I am only setting the isAiming is true in BTT_Aim task after the aim animation is finished cuz i want to only once to play the aim animation and after that the AI should only shoot, but since the isAiming is false the node after Aiming Sequence is not playing, how do i fix this.

#

basically i want the BTT_Aim task to execute only once after that i want to execute BTT_Shoot as long as the the player is within the Gun Range( which is handled by IsInGunRange)

shy hare
#

hello devs , i am sorry it might be a dumb question but i have this two states of AI "Patrolling" and "Attack" , and when ai sees a played it should drop everything he is doing , and immidetly start attacking part , i am setting "RobotState" blackboard to "Attack" state when ai sees a player but it is waiting to finish patroll part first and only then starts attacking part , i want immideate attack as soon as ai sees a player

latent geode
#

There's also force success decorator, description sounds like something that you are looking for

#

just an example, but try putting your aiming sequence under another sequence like this which forces the sequence to succeed, i swear that should work KEKVV

uneven cloud
uneven cloud
shy hare
uneven cloud
#

Have you done the AI with Blueprints course on the learning library? That's the best place to start, instead of YouTube

uneven cloud
stable falcon
#

I fixed it don't bother thanks guys

stoic pier
#

I have a flying AI with 'enable flying' checked and movement mode set to flying. Even with this a NavMesh volume in place the MoveDirectlyToward node doesn't seem to work, the tooltip says 'without regard for the navigation system' but this doesn't seem to be the case. Am I missing something here?

dense owl
stoic pier
#

failed to project destination location to navmesh I made a new EQS and it seems to be working, have to test more tho

woven bobcat
#

man i hate UE AIModuleold_man_yells_at_unreal

lusty crag
#

Hi all,
I have this GetTeamAttitudeTowards implementation (taken from lyra) and my Enemy is Team 1 and the Player 0
why is the AI sensing other Enemies even if he returns them as friendly and I disabled detect Affiliation friendlies?

ETeamAttitude::Type AFireteamAIController::GetTeamAttitudeTowards(const AActor& Other) const
{
if (const APawn* OtherPawn = Cast<APawn>(&Other)) {
//log pwn
UE_LOG(LogTemp, Warning, TEXT("OtherPawn: %s"), OtherPawn->GetName());
if (const IGenericTeamAgentInterface
TeamAgent = Cast<IGenericTeamAgentInterface>(OtherPawn->GetController()))
{
FGenericTeamId OtherTeamID = TeamAgent->GetGenericTeamId();

        //Checking Other pawn ID to define Attitude
        if (OtherTeamID.GetId() != GetGenericTeamId().GetId())
        {
            UE_LOG(LogTemp, Warning, TEXT("Hostile"));
            return ETeamAttitude::Hostile;
        }
        else
        {
            UE_LOG(LogTemp, Warning, TEXT("Friendly"));
            return ETeamAttitude::Friendly;
        }
    }
}
UE_LOG(LogTemp, Warning, TEXT("Neutral"));
return ETeamAttitude::Neutral;

}

latent geode
#

So what you mean is you just want parameters to act as a blackboard, and it's definitely possible since we did this same thing at my old job. You need to do some c++ magic, get to the parameter struct variable inside your state tree and basically const cast the const away from the param variables and then assign values to them. I'll dig around as well and see if I can recreate it

latent geode
stable falcon
static pagoda
#

hey guys im currently trying to change my Nav Mesh Agent Radius to 0 but everytime I do this in the RecastNavMesh-Default it works but after restart of the Engine its resetting again. I also tried setting the Agent Radius in my Project Settings but that didnt help either, does anyone know this problem?

latent geode
latent geode
static pagoda
#

yeah but thats what I did

#

its set to 0

#

but here you can see its not 0

#

always resets to 35

latent geode
static pagoda
#

uhm

#

no

#

I dont have supported agents

#

im gonna try creating one

#

oh it works now

#

thanks

latent geode
#

and then try to delete and replace the existing navmesh maybe

stable falcon
uneven cloud
sly gorge
#

My AI is only chasing the listen server and I used ai move to on begin play

#

I want my AI to chase all players or nearest player.

latent geode
#

Yes that is also an option. Or just store those variables on some ai component which is located on either your AI controller or your AI character.

#

Didn't have time to mess around with state tree parameters yesterday but I will definitely look at it today

#

Depending on what you are trying to do, you shouldn't store instanced AI variables on a gamemode, since gamemode is a singleton (only 1 of that object class exists at a time)

wise sluice
#

Hello ! Is that possible to modify an instance data externally? (eg. Task A instance Data got modified in Task B that is bound to instanceDataA.parameter )

#

It seems very complicated to communicate with parent task, evaluators or even global tasks in StateTree if you have any advices about that i would be more than pleased to hear them 🙏

misty wharf
stoic pier
#

so if you have an EQS query with a line trace and a Post Projection Vertical offset of say 200 and enemy with a flying movement mode, shouldn't it fly (move directly towards) to the offset point or does the nav point always need to be on the ground? It seems like the functionality it there to navigate above ground yet this doesn't seem to want to work

#

The navigation works on the ground but as soon as I try to move the point up, either with Circle Center Z offset or the line trace vertical offset the points generate but the AI just won't move there. So idk does 'move directly towards' still need to have points directly on the nav mesh?

#

Ok, got it to work. I noticed in the Visual logger it mentioned to turn off goal projection. We Flying!

lyric light
#

Hi, I have a question.
How can I make my BTTask wait until the attack animation of the task is finished before executing the next task?

misty wharf
#

Don't call Finish Execute until the animation has finished

#

How to do this depends on how you're running the animation - often this involves using an event dispatcher on your character which you trigger once the animation completes, so the BT task can listen to it

lyric light
#

`// Apply close range attack
IBossBaseInterface::Execute_ApplyCloseRangeAttack(OwnerComp.GetAIOwner()->GetPawn());

SelectedAttackState = EBTNodeResult::InProgress;
//FinishLatentTask(OwnerComp, SelectedAttackState);
return SelectedAttackState;`

misty wharf
#

I don't recall off the top of my head how this works in C++ so can't really say about that, maybe check how the Wait or MoveTo nodes handle it, they probably have some logic related to this

lyric light
misty wharf
#

np, it's pretty easy to set up in a blueprint BT task so if the C++ stuff looks like a pain then I'd just do that instead :)

#

(and C++ stuff related to latent stuff often can be kinda annoying)

lusty crag
# uneven cloud When are you setting the team ID?

My Pawn is int32 0 and my AI has int32 1.
When I check the log it says its enemy with the player (so its working). But in the update perception the AI gets in all other AI Pawns even if the log tells me he recognized them as friends. In the sense I configured to only enemies.
I double checked everything and the logs shows me that my implementation and the teams are set correctly. But why is the sense still returning friends?

rose drift
#

Greetings!
Has anyone tried to use structures (arrays) (or probably create analog) in BlackBoards?

Example: I have an array of mob special features (feature - just string name or number). I want a decorator that will check "is array contains an element"

My first idea - use string as blackboard value and "contain" decorator, but it will be difficult because UE5 did not allow to use regular expressions

stoic pier
uneven cloud
uneven cloud
uneven cloud
uneven cloud
uneven cloud
lusty crag
uneven cloud
uneven cloud
# lyric light Thanks

Since you are using C++, you need to do a bit of extra work for binding, because BT nodes aren't instanced by default. If you are a solo dev, it's probably fine to just set it to be instanced in the constructor. If that becomes a problem, you can do the extra work to make an AI task for it.

nimble smelt
#

Am I doing something wrong here? It feels REALLY weird that SimpleParallel can only have one child.

rose drift
uneven cloud
lyric light
uneven cloud
dense owl
static pagoda
#

hi, im currently trying to get my NPC move around in a specific area and not leave this area at any cost. I am using GetRandoMReachalbePointInRadius and put a custom Nav Query Filter there that has the Area i didnt want the player to cross set with a very high travel and enter cost but it doesnt seem to work, what can I do to make sure the NPC dont leave this area?

nimble smelt
uneven cloud
static pagoda
#

okay but is there a way to let them not LEAVE a nav area?

uneven cloud
static pagoda
#

this is the room i dont want them to leave so i added this nav modifier there at the door so they dont leave the building again

#

but it still chooses a point outside of the building even with Excluding this area

dense owl
uneven cloud
static pagoda
#

no its my custom one

uneven cloud
static pagoda
#

yep it does

#

but its still choosing a point outside

nimble smelt
dense owl
uneven cloud
dense owl
#

Hehe I always forget about set focus 😅

nimble smelt
#

Got me beat, I have no idea what that even is. There's no AI task for it at least?

uneven cloud
uneven cloud
#

I really don't understand why people new to AI expects everything should be done in a task. Is that what tutorials are teaching? Because it's really bad. Learn what the different nodes do, so you understand all the tools in your toolbox. Instead of just always using a hammer.

dense owl
#

It’s likely they didn’t watch a tutorial at all and just reached inside the toolbox blindfolded 😀

nimble smelt
#

Oh yeah, that's the only way I learn lol

#

Honestly, people here dump on tutorials constantly, and I know tutorials on other parts of Unreal I'm more familiar with are bad bad. I hate watching videos anyways. But the documentation is at best narrow, at worst outdated and incorrect. So what's even left as a way to learn except "reach into the toolbox and play around"?

dense owl
#

🤷‍♂️ ig you could read the source code

static pagoda
nimble smelt
dense owl
#

I mean the AI Module source code

#

There are some decent vids that do a good job showing this stuff but if you don’t like watching vids it’s kinda moot

#

And yes, most tutorials out there are bad, but the ones pinned in these channels are usually good

nimble smelt
#

QQ what does "Default" mean in this context? What other kinds of setting focus are there?

harsh storm
#

This was some years ago though

misty wharf
misty gale
#

It has been a recurring theme that the teacher is still in a fresh learning position themself though

nimble smelt
#

I mean how can they not be, when things are constantly changing?

misty gale
#

And often have lacked any sort of structure

harsh storm
misty gale
#

Programming principles doesn't change all that much

harsh storm
#

Maybe even longer

misty gale
#

you may get a new tool in the toolbox

nimble smelt
harsh storm
#

If by "new" you mean like 2016/2017

misty gale
#

but abstraction, decoupling etc is still the same

nimble smelt
#

hah TIL, I thought that was a UE5 thing

harsh storm
#

Heaven's no

#

It's been around for a long long time

#

I don't remember the exact year

#

But it's 100% pre-2020

uneven cloud
nimble smelt
misty gale
#

They dont know what they dont know

harsh storm
#

The new things for AI in UE5 are pretty much Smart Objects and State Tree

nimble smelt
#

Blueprints tricks them into thinking it's all simple and they dive right into making something complicated and no one ever tells them "this is what an Interface is, this is what Polymorphism is" etc

uneven cloud
misty gale
#

anyways, OT for AI

#

Can't wait to get into the AI bits of the project im on. Definetly checking out Luthage's endorsed course

#

It's about time i up my AI knowledge

uneven cloud
nimble smelt
#

Ah, I think I've made a parallel system to this unfortunately.

uneven cloud
#

If you want to make a service that uses the gameplay focus, so it's a higher priority than movement, just make a child of the default and change which one it uses.

#

That will allow them to strafe around a target.

uneven cloud
nimble smelt
#

Yeah, it's a big learning from this foray into AI. I knew from the start that I'd have to throw out big parts of the AI toolbox and make them custom, like the pathfinding components simply cannot do what I wanted. But I think it would still have been better to learn to do things the normal way first and then modify, rather than start with the custom work.

uneven cloud
uneven cloud
misty gale
uneven cloud
#

I've considered doing my own documentation of the AI systems, since I've done it several times for different studios. But I'm currently unsure if I want to do it written (better and easier for me) or videos.

misty gale
#

there's also great help to get here

nimble smelt
#

Some things just need custom work though.

harsh storm
#

Glad I could help 🫡

misty gale
#

+1

nimble smelt
#

+1

harsh storm
#

And ping the heck out of me when you do it.

misty gale
#

+1

#

😛

uneven cloud
#

That's the way I'm leaning. Maybe embedded videos if I need to.

harsh storm
#

I don't care where I am or what time it is

#

Gimmie that Luthage knowledge

misty gale
#

Pour into the cup, yes

nimble smelt
#

Honestly video is only more popular as a format because it's easier to monetize, not because it's actually widely preferred

misty gale
#

written is actually* searchable aswell

uneven cloud
#

I hate when people do videos, but I do like the WTF is series.

misty gale
#

short format, specific thing, for sure. They're also searchable ^^

nimble smelt
#

I think video can be nice if you're talking a lot ABOUT something, rather than just breezing through with instructions

uneven cloud
#

Sometimes the only way to show things is via a video. My AI team does BP reviews by making short videos. It's really helped us a lot, especially with knowledge sharing. Design won't read text.

#

Like I couldn't get anyone to use the visual logger until I made a video showing it off. It's a hard thing to describe in text.

misty gale
#

If I could have it my way, there'd be some show-off video of it, along with detailed text going through every element with a microscope

#

Whenever there's a 2 hour video about a specific thing that some engineer has spent the last 3 years looking at, it just goes by way to fast

uneven cloud
#

Yeah. That's the way I'm leaning. Gifs, videos, screenshots and a lot of text.

misty gale
#

It's a bit of a balancing act ofcourse

#

to much text without any "breathing" can be overwhelming

uneven cloud
#

If you can tell from my comments, I don't write a lot of words. I'm very succinct.

nimble smelt
#

Okay is there some sort of known issue with Controller Rotation in the vertical axis? This pawn is VERY good at tracking my player pawn in the horizontal but if I get above it, it keeps looking horizontally

#

It knows the player is above too, because MoveDirectlyToward is moving it upwards

uneven cloud
misty wharf
#

There are quite a lot of people who have had criticisms about it besides you though :D

uneven cloud
#

Everyone I mentor had a lot of criticisms about tutorials.

#

I forgot to add that part.

misty wharf
#

And how many of them had actually tried to teach people?

nimble smelt
#

Hah did you know that if you delete the child of a SimpleParallel it'll CREATE a 60s wait node when you hit "save"?

misty gale
#

I wouldn't be here if not for the .. questionable.. tutorials i started out with.. Pretty horrid stuff but it got the ball rolling

uneven cloud
#

So that would be everyone

misty wharf
#

And yet they needed additional mentoring, thus they necessarily might not have been teaching the right things

nimble smelt
#

Everyone needs mentoring too

uneven cloud
#

My partner is a generalist gameplay engineer. I learn a lot from her everyday, because she uses things I normally don't.

nimble smelt
#

Technical knowledge becomes siloed by default. If you take a new hire who only has basic knowledge and have them work on some problem for a week, after that week they will know things about that proble (and their solution to it) that no one else on the team knows.

#

Technical work CREATES new information, always. Unless you're intentional about spreading that information, it will be siloed knowledge.

misty wharf
#

And no one is discouraging people from teaching others how to do stuff even though they might not be the actual expert on that subject... except when it comes to unreal tutorials

nimble smelt
#

I think there's a big difference between knowledge sharing within a team and operating a youtube channel for general tutorials

misty wharf
#

And what is that difference?

uneven cloud
#

My problem is that the tutorials are bad at teaching things.

nimble smelt
#

The latter both requires and implies a level of authority that the former doesn't.

misty wharf
misty gale
#

Tom did that the other day ^ kudos to him

misty wharf
#

I pointed something out in a comment to a tutorial once and I think the guy was gonna just redo the video because he realized it was completely wrong lol

uneven cloud
misty wharf
#

Well I guess they can't all be reasonable people

misty gale
#

There's also a ton of time gone into it already, without (presumably) creating the revenue they were hoping for

misty wharf
misty gale
#

I can understand lack of motivation for doing it all over again..

uneven cloud
#

One guy is selling a course to become a "pro UE gameplay programmer" and I noticed some really bad things in the AI section. He spent a few days arguing with me and didn't change anything.

nimble smelt
#

It's a problem of incentives. When you're a member of a team, at any level, you have a strong incentive to want your team to be as healthy as possible. They're the people you work with every day, and what they create is the codebase you have to live in.
But when you're making youtube tutorials, you care about views and you care about ratings, but you're disconnected from the actual end results, the code people make and their level of knowledge.

misty wharf
#

A long time ago I had a reasonably decent readership on my site on certain PHP-related topics and I was only considered a slight authority on certain things because the overall community seemed to feel that way

#

and I'm using the word "authority" very loosely here lol

nimble smelt
misty wharf
uneven cloud
harsh storm
uneven cloud
#

Most of the people here who complain about tutorials are also in here helping others.

harsh storm
#

I think the bigger stretch is assuming that "most people" haven't tried teaching beginners

misty wharf
#

It's been like 15 years for me since I started writing content to teach others and more or less always heard complaints about beginners teaching others because their content was wrong so it's a bit more than a few people here :D

nimble smelt
#

Also for real I'm about to throw this entire controller rotation situation in the trash and Do The Bad Thing by just making a custom task that handles rotation in a sane way

misty wharf
#

Yeah the rotation stuff is pretty iffy sometimes lol

nimble smelt
#

Even if I could fix its inability to look upwards, it's got this weird jerkiness to how it tracks, it's not smooth at all.

uneven cloud
#

I don't think hobbyists should be monetizing helping others. You don't have to agree with that.

misty gale
#

Where's the treshold tho

#

How long do I stay a hobbyist?

harsh storm
#

I think that's a fair question to be honest

#

Like, I'm not AAA, but my studio has released 2 games now (not in UE mind you) and have made some money. Am I a professional or a hobbyist? 🤔

misty wharf
#

Yeah I dunno, I don't necessarily see why hobbyists monetizing it is bad. The incentives are to create better content because that's how you get more money, so I don't really see why money being involved would somehow make it bad.

uneven cloud
#

When you make a living at doing a skill, you are no longer a hobbyist

nimble smelt
misty gale
uneven cloud
nimble smelt
#

Of course it's code. But it's not MY code which makes debugging it fraught from base principles, even if I could see it which currently I cant

#

Even if I FIND a bug, the answer then is "write my own version of it" which is what I was about to do anyways.

misty gale
#

atleast you'll know what went wrong

#

and not repeat that in your own version 🙂

uneven cloud
uneven cloud
misty wharf
#

Feels like this requirement immediately disqualifies a lot of people teaching a lot of different things... like music for example. I don't know if a lot of people teaching music have had a professional career as a musician

#

And yet I can still learn guitar just fine from such a person

misty gale
#

My biggest reason for not going "pro" is lack of self confidence

misty wharf
misty gale
#

(along with common debt lock from mortgage)

#

Recently started some freelancing tho, and it's going great, so maybe soon i can breach the treshold for being a hobbyist 😛

misty wharf
#

Well if you got paid for it then you are now a pro

#

lol

misty gale
#

not enough to live by, that's for sure

uneven cloud
misty wharf
#

Fair enough :)

#

However then it does beg the question, why does that rule apply for game dev

#

I'm not a professional game dev for example

uneven cloud
#

The biggest problem is that there are so many ways to do anything in game dev. There's no right way to do anything that works for all projects and teams. Yet tutorials teach as if there are and what they are teach is the only right way. When sure it works for your specific test case, but probably not for most things.

nimble smelt
#

I realized as I was making this that it MUST already exist, because nodes like FaceTowardBBValue exist. Anyone know if the prior art is accessible here?

misty wharf
#

Do they though? I don't think they make any claims that the way they show is the only right way

#

At least I didn't notice, I suppose it's possible I wasn't paying that much attention because I was just trying to find the part that I was interested in

uneven cloud
#

It's implied in the "how to do X thing" when they don't say why they picked that way.

misty gale
#

Most people would probably be better off learning generic programming first

#

the principles of it

#

before moving into gamedev

#

It's not that unique really , imo anyways

#

Sure there's a billion nodes and functions, and entire frameworks

#

but the same concepts still apply

misty wharf
#

I don't really think it's implied... it would make most tutorials very very long if they needed to elaborate on every single design decision that went into it

uneven cloud
#

Yeah, I usually recommend people starting with Harvard CS50 and CS50G first.

misty wharf
#

Those kinds of longer explainers are more for bigger courses in my opinion

misty gale
#

There is no short route for becoming a game dev tho

uneven cloud
nimble smelt
# misty gale but the same concepts still apply

Even outside of game dev, different environments and frameworks are VERY different. Writing a react app in JS is going to be extremely different from writing a high scale AWS service. But yet, somehow, bad code is all bad in basically the same ways.

misty wharf
#

I mean why not? I would assume the information presented is correct

#

I can't really say that I've gotten the feeling that people come here to argue that the tutorial is right and people helping them are wrong

#

If anything, I've noticed it mostly in the sense that they want to understand it better

misty gale
#

Personally I feel like .. a good bunch of 'them' dont care about understanding, they just want progress

misty wharf
#

If I was a beginner at something I would definitely assume that the info I was given is right, and that I must be doing something wrong if it isn't working lol

misty gale
#

the tutorial did this, and when it's working, that is real tangible progress. Then we can move on to the next thing from another tutorial

uneven cloud
#

You're going in circles. You're saying it's perfectly fine for tutorials to give bad information. That's it's completely fine that people who don't really know what they are doing are trying to teach others.

misty wharf
uneven cloud
#

And that beginners should be able to assume that the advice given is correct. But it's also fine that it's not.

misty wharf
#

There's a difference between information which does not work (eg. when someone comes here because a tutorial doesn't work) and information which isn't according to best practices (eg. "use pawnsensing")

uneven cloud
#

But it's also apparently not OK for those of us that help the people getting bad information, to be frustrated that people are giving them bad information.

misty wharf
#

I never said that

uneven cloud
#

You made a comment about most of us not remembering what it's like to be new. Or how hard it is to teach people.

#

Which was incredibly dismissive

misty wharf
#

I wasn't referring to anyone here in particular, just overall to people who complain about it which as I said I've seen plenty over the years

nimble smelt
#

Best practices aren't just cosmetic, advice that discards them or disregards them will lead to tech debt that has a real cost to fix.
it's the difference between selling someone a car that won't start, and a car that has a leaky radiator. They're both broken, it's just a question of when that affects you.

uneven cloud
#

Not using a long deprecated feature isn't just following "best practices."

nimble smelt
#

True but the point still stands, that just because it "works" doesn't mean it's good advice

uneven cloud
#

I agree with you on that. I did disagree that the example of best practices (pawn sensing) isn't a good one.

uneven cloud
nimble smelt
#

I'm really used to working with closed-source systems honestly. You work with something like the iOS SDK and it just... is what it is. It's going to behave in ways that aren't quite what you want and don't quite make sense, but them's the breaks, code around it.

uneven cloud
#

Unreal is not a black box like Unity. Everyone can download the engine source and use debugging to figure out how something is actually working. It's the reason why it's so badly documented.

nimble smelt
#

And like, I COULD do all that, and I might learn some things... But the hack's already done and working.

uneven cloud
#

Using Rider or Visual Assist for visual studio will let you navigate around the source code easily.

misty gale
#

Rider has been a blessing

uneven cloud
misty gale
#

I thought VS was great, untill I tried Rider

uneven cloud
#

Rider is so great.

misty gale
#

just make sure you got some ram 😛

nimble smelt
harsh storm
#

Debt is debt!

uneven cloud
#

I had to be convinced by someone at work to try it, so I did when my personal subscriptions were up. Now I use it at work as well.

harsh storm
#

Welcome to team Jetbrains

#

We hope you have the RAM

#

Rider 100% eats moar RAM than VS

misty gale
#

It's there to be used so...

#

have at it!

#

take more, please

#

if that means less waiting for me, great

nimble smelt
# harsh storm Debt is debt!

Only as long as the project continues. Whenever you ship your last update, any remaining tech debt is instantly "resolved"

harsh storm
#

When I compile UE source, I use VS because it takes less RAM and I can give more to the UE Gods 🙏

uneven cloud
#

I never noticed, but my dev machines are pretty highly speced out.

uneven cloud
nimble smelt
#

Why isn't this aborting? It just stays on this branch even though TargetActor HAS been set

uneven cloud
nimble smelt
#

Found the frame where it locates the target. And for this frame, things seem correct! But then I guess it imediately goes back to doing the other things. Hm.

#

Interesting, that log implies that it evaluates down the right-side tree at least once, but I put a breakpoint on that whole branch and it never triggers.

#

Oh oh HO look at this, I replaced that RotateToFace in the bottom left with that default wait, and NOW it works!

#

.....ugh oh my god this was the dumbest mistake

#

Posting my shame here in case someone learns from it. See if you can find the bug here.

#

||If you have the Recieve Abort AI event, but DONT call "Finish Abort", you've got a task that CANNOT BE ABORTED||

odd kestrel
#

Hello everyone! I have some AI in my game implemented with BehaviorTrees, but lately I decided to experiment with Unreal's new StateTrees, but the documentation is somewhat shallow on how they work. Is it possible interrupt a running state/task?

#

For example, let's say I have an enemy AI with several states with specific tasks on each, but I want whatever the current task/state is to be interrupted if the enemy detects the player, and then switch to chasing the player

hazy arrow
#

I wonder how can I make Pawns to Work with Detour crowd avoidance? So far i haven’t found anything special that prevents simple pawnmovementcomponent handle it. CrowdManager only references MovementComponent not CMC. So I wonder why don’t my pawns avoid each other. What functions or things do I need to implement for them to work?

Another thing, does anyone know what ai.crowd,debug does? Like there are squares on the ground in different colors , what do they mean?

twilit anvil
#

Is this the best channel to ask AI Navigation questions in? Ive been working on this for 2 days and I cant get the AI navigation to work reliably on my main world partitioned map. I'll list some of the options I've tried below:

- Project settings /Navigation mesh /Runtime Generation: dynamic
- Project settings / Navigation system / Generate Navigation Only Around Navigation Invokers: true
- Level /RecastNavMesh-Default / IsWorldPartitionedNavMesh: true
- Level /RecastNavMesh-Default / Runtime Generation: dynamic
- Editor / n.bNavmeshAllowPartitionedBuildingFromEditor 1
- NavMeshBoundsVolume is green everywhere

I can get it to run once in static or dynamic after switching modes, and then it's broken after that and neither mode will work in standalone mode. Sometimes I observed the AI working in one landscape section and not the other, but it's not consistent

#

Also, I have an empty test world that the AI works reliably in to rule out it being broken AI and not broken navigation

glacial harbor
#

Is there a way to get the class of the currently running behavior tree in C++? I don't see anything in the docs

misty wharf
#

I get the feeling this probably won't work correctly if you're using any of the BT nodes to run a subtree so for that you'd probably have to dig into the code to find out if there's some more accurate way

hidden topaz
languid iron
#

hey guys, what would be the best way to make an AI agent only be able to pass through a gate one direction and not the other and reflect this to the nav mesh? for example a door which only opens one way but not from the other side so they would take a diffrent path

dapper crest
#

Hey guys, what's common practice to avoid duplication in behavior trees? Is running subtrees the way to go? Or are the other ways to compose nodes out of a few nodes (a selector or sequence with a few children)?

dapper crest
languid iron
dapper crest
languid iron
#

yeah the runtime is the main part the player is building objects inside a room which the ai interacts with already, this also affects path finding. i wanted to be able to place a such "gate" which you can use to funnel the ai in a direction with if u blocked of the whole room becoming a one way system of sorts.

dapper crest
#

Just try making a BP that contains a mesh to block navigation and a nav mesh link? See what happens.

#

Does anyone know whether it's possible to set a value on a task node? Like RotateToFaceBBEntry has a precision, what if I want this precision to depend on something else?

agile widget
#

Hi everyone, I have a question regarding EQS, I want to make a query that points the cone to a actor, so the idea is that I have a querier in the location (0, 0, 0) and I have another actor that circles around the querier, and I want to see if it's posible to make the cone always look at the direction the actor is moving

#

so the idea I thought could work was to make a context for this querier, but I think that it's not possible since I can only create context's that return actors and not locations

misty wharf
hazy arrow
misty wharf
#

^Yeah you are likely to need to either register the pawns with the crowd manager and/or implement the ICrowdAgentInterface

dapper crest
misty wharf
#

Sure

dapper crest
agile widget
#

so i managed to create the context correctlly, but It's not working

#

if anyone has an idea

misty wharf
#

This is probably like the third time I've had to link them both, I think I need to combine them into one guide lol

misty wharf
agile widget
#

thank you for the links

#

I'm trying to make the cone that is created to always look at a actor when doing the query

#

the actor will rotate around the querier (player), and I want to make sure the locations selected are always looking at the rotating actor

#

and not simply always in front of the player

misty wharf
#

I don't think this will work because locations don't have a direction/facing

#

it's just the coordinates of the location where it is in the world

#

Although I'm not sure if I fully understood what is facing what

agile widget
#

correct, but if I grab to locations and substracts them then I get a direction vector, that should give me the place where the cone should be set

#

this is what I currently have

misty wharf
#

So what should it look like instead of this?

pastel robin
#

Hello, could anyone instruct me on how to link a sub-state tree? I have a state tree with root set to subtree and the main tree with a leaf linked tree state, but it will not fill the 'linked subtree' parameter

agile widget
#

so if the player rotates, the cone will move with his rotation so I want the cone instead of moving with the player rotation that it would always look to the mountain in the sky

misty wharf
misty wharf
agile widget
#

yeah it's maybe better to explain it like that

misty wharf
#

So despite not actually using the player's rotation in the BP graph it still rotates with the player?

agile widget
#

well the context I have right now is actually using the player has it's center location, when I use the one I showed above it won't paint the EQS

#

since it's not working correctlly

#

the context that works simply returns the player character has the querier so it's location and rotation are set to the player

#

I guess I might need and empty actor that is set in the location of the player and that is always looking at the mountain, that way I could simply use that actor has my querier and it would do what I want

#

but i thought I could use math to solve this jejejeje

hazy arrow
misty wharf
#

I can't think of the actual rest of the math off the top of my head for it though, #game-math might also help

agile widget
#

and the real issue is that the context is looking for a location, so converting the location to rotation and then to a location again, is a little bit useless

misty wharf
#

Basically what you want to do is have it first generate points from the player along the rotation axis 1, 2, 3, 4

#

Then you adjust the Z rotation say by 20 degrees, then again generate points from the player position along the rotation axis 1, 2, 3, 4

#

repeat until you're happy with it

#

this should give you the lines of points moving away from the player position as in your screenshot

#

You can do something like returned position = player pos + (direction * space between points * point index) for each "line" to plot the points on it

agile widget
#

ok, let me see if I can make it work

languid iron
agile widget
#

so i think the real issue is that the generators are expecting an actor, so i will try my hand at making my custom query generator

misty wharf
#

Ohh right you're trying to do this with a context... yeah I think you might need a custom generator

agile widget
#

so I got into the C++ of the cone generator, and yeah it's set to only work with a array of actors, since I'm giving a location, then it's not going to work

#

I'm going to override that and see if I can get what I want

misty wharf
#

Yeah take the C++ cone generator code and paste it into your own file, tweak it so it doesn't use the actor's rotation for it and you should be good :)

agile widget
#

yes, that's the idea

agile widget
#

Did really small change and it's now working has I wanted with my custom generator

#

thanks @misty wharf for the ideas, I think tomorrows I will work with the Crowd detour

#

so my enemies avoid the player and themselves when they are too near

dapper crest
crisp oar
#

My npc was working fine but after messing with the navmesh slightly it no longer is able to use it for navigation, wasn't sure if anyone has any ideas on what could of caused that and how to fix it? I was messing with the recast nav mesh and making the agent radius smaller so that it would build navigation through doors

tropic socket
#

This is a long shot, but does anyone know how to make an AI walk around a sphere? Or how to change / where to change, the navmesh so it also works with spheres?

misty wharf
#

iirc there is a directional gravity plugin on the marketplace, I'd check that

#

I don't think you can modify the navmesh to work on spheres without very significant changes to it

tropic socket
#

Fair enough, I've mucked around with a character to change the gravity to work with the sphere but it's just trying to figure out how to make AI walk around it, unless there is another method without a navmesh?

azure pulsar
#

Hi!

I'm having this issue where asynchronous nodes like PlayMontage will trigger executions long after my BT Task has finished.

Here's an example: I have a simple PlayAnimAndWrap task with a PlayMontage node which leads to various branches depending on the outcome.
However, something like this can happen in order:

  1. PlayAnimAndWrap is triggered in the Behavior Tree
  2. PlayMontage node is called in the BTTask
  3. Anim plays until blend out
  4. The "On Blend Out" execution pin gets triggered
  5. PlayAnimAndWrap calls FinishExecute
  6. PlayAnimAndWrap gets triggered again as intended
  7. PlayMontage node is called in the BTTask
  8. The "On Interrupted" execution pin gets triggered from the PREVIOUS animation interrupting the current one, on the SAME node

Is there a way around this? Like making every new BT Task an entirely new instance?
Adding a "IsTaskExecuting" check also doesn't do much because it IS being executed...but the callback that's being received is from a previous execution

uneven cloud
uneven cloud
uneven cloud
languid iron
uneven cloud
uneven cloud
uneven cloud
dapper crest
uneven cloud
glacial harbor
dapper crest
#

Is that also possible?

uneven cloud
dapper crest
#

Okay that's what I feared thanks

#

maybe to make sure we're talking about the same thing. Simple tasks have details you can change like the acceptance radius of a move to task. This is a variable on the C++ class, though I wish I could set it somehow in BP at runtime.

unborn jungle
#

How does a large procedurally generated game generate navmesh?

#

Something along the lines of Lego Fortnite

#

Surely not using nav invokers as they were very slow last time I checked

#

Valheim being another non-UE example

#

Where ideally things are simulating even quite far away

uneven cloud
crisp oar
#

I'm trying to learn AI Perception and the first tutorial I tried following did a terrible job of explaining everything. I know most UE5 Tutorials can be garbo but just checking if anyone has any suggestions.

uneven cloud
dapper crest
unborn jungle
# uneven cloud By using navigation streaming

Thanks! This looks like it'd work nicely for static navmeshes where the world is known before runtime but for fully procedural terrain can it still be done? Or would the workflow be to generate the terrain and then build the navmesh on the users PC, then streaming segments?

uneven cloud
uneven cloud
unborn jungle
#

Interesting, I'll try it out. So as soon as players start moving near a new segment it starts generating the next area and once far enough into that zone, unloads the previous one

#

Would this be what Lego Fortnite is using under the hood as AFAIK it's fully procedural for each player

uneven cloud
dapper crest
stuck bay
#

I have a state tree task that has an index member variable. I would like to increment this index everytime the state is entered, however the behavior I observe is that the index is always reset to it's initial value upon task start. Is that normal behavior? Is the state tree task being reset/reconstructed, or am I doing something wrong?

unique fern
#

Anyone here well versed with the visual logger? just have a couple questions that I can't find good answers to online

azure pulsar
harsh storm
#

All BP BT's are instanced

#

If you're in C++ land, it's a setting you flip in the constructor

uneven cloud
harsh storm
#

Oh - that's what they want to do? Ouch

uneven cloud
harsh storm
harsh storm
uneven cloud
#

It's a race condition they are dealing with. The BT task ends when the animation is blending out. So it returns to the root. If the BT task is run again, before the animation has ended, it will get interrupted. I still say they shouldn't end the task until the animation ends, but they don't want to do that for whatever reason.

harsh storm
#

Yeah - that's an odd setup

stuck bay
harsh storm
#

I honestly don't remember the actual difference between BP and C++ for State Tree tasks. But I'd wager they're going to end up being the same as with BT

#

So you'd either want to go to C++ and muck around with the struct memory stuff (it's easier in ST than BT imo) or probably have the variable live on the ST itself (I don't think blackboards exist for ST) and update/read from that

stuck bay
#

Do you remember some struct names for the "struct memory" that I could search around the codebase for?

harsh storm
#

Look at how some of the default tasks look

#

Should be really really easy to grok honestly

#

Because their memory stuff is above the struct

stuck bay
#

So something like "struct STATETREEMODULE_API FStateTreeDelayTaskInstanceData" (or any InstanceDataType) is not reconstructed when the task is entered, but rather persists between runs?

harsh storm
#

Yeah

stuck bay
#

Okay cool, thats a lead then, thanks!

unique fern
#

Nevermind, found it. Config option "stick to recent data"

azure pulsar
runic agate
#

Does anyone know of any examples in UE of offloading AI processing to external processors / devices?

noble silo
#

hey anyone got an idea how to make a clue system similiar to Hunt showdown? I want my AI to spawn and start searching for clues. I figured an EQS check would be the way but the implementation logic I am notsure how to do

dense owl
uneven cloud
noble silo
#

OK thanks

noble silo
noble silo
dapper crest
#

Any recommendations regarding debugging behavior trees? Would you add tasks or services to add prints for instance? If you want to print something that's a blackboard value, would you try to get it from a blueprint or make the debug print logic in a BT node? I sometimes set BP nodes to development only when it concerns debug info, is there a way to do this with BT nodes?

misty wharf
#

I would just start by using the BT debugger and visual logger, but if it's some specific node I know the issue might be in, I'll just add prints into that node's code

dapper crest
#

seems like printing with 0 duration in a service doesn't work though because services have an interval

#

the reason I wanted to do it in a service is because some of the data exists only on the blackboard

misty wharf
dapper crest
#

Yea I've looked into that for another project, it seems cool! But not really worth the effort for what I'm working on now.

#

Thanks for the link, I'll save it for potential later use

misty wharf
#

I guess adding a service for it would be the simplest way to do it otherwise

dapper crest
#

👍

stuck bay
#

I encountered the situation where an AI moving to a player stops if the player jumps and is too far from the navmesh so it escapes the query extent Z bounds. Is there a good way to approach this problem without just increasing the default query extent project wide, that seems far too heavy handed of a change.

tropic socket
old timber
#

Hey there! Could anyone share a quick tip on using eqs so that the AI always choose the location closest to the target? 😊

dense owl
#

Quick tip: use an EQS test

vague socket
#

Did you ever figure this out? Running into the same issue.

old timber
dense owl
#

There’s also environment query contexts you can use

old timber
#

What I understand about your tip is that there is no way to use the Distance test in the EQ to make sure the test always return the closest point to the target

dense owl
#

Not sure how you got to that conclusion but sure

misty wharf
#

(assuming your distance test and other stuff is configured correctly)

neat summit
vague socket
uneven cloud
stuck bay
#

I guess its unlikely since its along the z axis

#

Part of my problem is I also use the navmesh to determine some gameplay stuff (like who can teleport where) and I dont think the findpathsync function lets me alter the default query extents, so it has reprecussions I dont want

uneven cloud
misty gale
#

Its a struggle not trying to optimize along the way 😅

#

Its like a bad itch

dim lynx
#

I have a problem with the AI, the AI can see the player through the walls

uneven cloud
uneven cloud
stuck bay
# uneven cloud It does not. Be careful with premature optimization. If you want to know if so...

For me I sometimes check if a teleport destination is valid based on whether you have a valid path to it. There could be scenarios where a valid path gets built by picking some point on a navmesh way above the true teleport destination you want, and then that would falsely consider the result positive (I actually did have this happen, its not a contrived scenario). I am using the TestPathSync function which doesnt seem like I can specify the query extent?

uneven cloud
stuck bay
#

Thats fair, I think when I first wrote this code I had misconceptions about what TestPathSync was doing. With everything you said, projecting first would be much better and then I can freely modify the query extents, thanks!

uneven cloud
#

If you are concerned about perf, using a hierarchical path test instead of test path sync is going to make a much bigger difference.

stuck bay
#

I dont know much about that, can look into it. Im not particularly worried about perf for the teleports, those only happen once every 30-60s, was more for general AI pathfinding (if a map has 100+ AI patrolling around)

uneven cloud
#

The most expensive path cost perf wise is when a path is not found. HasPath using the hierarchical mode, is a much cheaper test than finding a path.

stuck bay
#

Any idea why Hierarchical is not the default? Is there some kind of tradeoff? just curious why you wouldnt always use it if its just faster

uneven cloud
#

There's a massive difference between "do I have a path" and "find me the best path".

stuck bay
#

I feel I am misunderstanding something. I assumed TestPathSync only tests "do I have a path", does it try to find the best path while testing if one exists if set in default mode?

sick crown
#

Okay bit of a shot in the dark here but does Unreal have a built in editor functionality to allow you to export a pathfinding mesh and then reimport?

#

Export as an obj, fbx or something

#

I know pathfinding is more than that but I only need to adjust the mesh itself

trail iron
#

Hello everyone, I want to study AI for the RTS game. Where should I start? With the documentation of epics or are there any good courses?

subtle birch
# trail iron Hello everyone, I want to study AI for the RTS game. Where should I start? With ...

In this video tutorial series we will going over everything regarding AI in Unreal Engine 5; including some examples of AI behavior typically seen in commercial video games.

In Part 1 we do some basic character setup to prepare a character for use as an AI character.

SUPPORT ME
Patreon I https://www.patreon.com/ryanlaley
Buy Me a Coffee I buym...

▶ Play video
thick oxide
#

I'm probably missing something simple here. I made a C++ subclass of UBTDecorator_BlackboardBase, but when I edit my BehaviorTree and pick New Decorator my new class doesn't appear in the list. Is there something I need to do to enable that?

vague socket
#

And I can't have them run in the same state, as these are all executed concurently, and the EQS Query task has an async return

harsh storm
trail iron
vague socket
uneven cloud
somber cave
#

Hi everyone, how does "On Target Perception Forgotten" Event work for AI Perception in UE 5.2+ ? I tried setting max age of senses to something other than 0, and also tried calling "Forget All" function of AI Perception component, both of them removed the sense indicators in debug mode, but none of them called this event!

dense owl
deep haven
#

Hey guys! So I’m still kinda stuck on this AI issue. Now it seems like the behavior tree is suck on certain sequences.
So I have a timer in the Aicontroller that indicates when the enemies attack. And it’s supposed to roam around the player while facing the player and go to the player location when the first spawn in or if they are too far away.
Any reason why this counts be happening? Please help. Thank you

uneven cloud
deep haven
#

If it helps. And also I have a timer set for the attacks because of the tutorial series I was following along

uneven cloud
#

I hate Ryan Laley so much. I don't even need to watch the tutorial to know it's going to be really terrible.

uneven cloud
# deep haven

I highly recommend watching the introduction to AI with Blueprints course on the learning library. There are so many things wrong with that BT, I don't even know where to start.

deep haven
#

If you say so.

uneven cloud
#

Most of your tasks should actually be services. You're trying to force the BT into a state machine, which loses all benefits to having a BT. You're setting an attack state randomly on a timer, instead of having actual logic.

#

You're just following a bad tutorial.

deep haven
#

Gotcha. Im relatively new to Ai programming and nothing I really found was what I was looking for as far as what kind of Ai I wanted

uneven cloud
#

No worries. The course will teach you the AI tools.

deep haven
#

Alrighty.

#

Thanks.

uneven cloud
#

You're welcome

harsh storm
stray bobcat
#

Hi All - Is there a way to make AI Perception (sight and hearing) not run on tick but rather run less frequently?

uneven cloud
#

What is the problem that you are trying to solve?

uneven cloud
somber cave
dapper crest
#

What do these stats mean specifically? Does the tick include the tstas below? And then the execution is the content of the nodes and search is the evaluation of the tree?

terse glen
#

Sorry if behaviour trees for dialogue don't belong in here but I'm in dire need of some guidance; in short I'd like to toggle a static mesh after the 'quest' is accepted (certain dialogue option is chosen), as well as changing the dialogue flow to display a different line if its accepted. In normal blueprints i could just tie this to a bool and have it check when the interaction is started / ended, how would i do it in a behaviour tree?

misty gale
#

Not an answer but... is dialogue in a bt really an option? Feels so... backwards to its purpose

misty wharf
#

I vaguely recall people not really recommending using BTs for it

misty gale
#

Nor convenient or easy to see the flow or even the spoken text

misty wharf
#

I tried it and while it worked for simple cases it requires a lot of awkward logic

misty gale
#

I can only imagine

placid halo
#

hey! I've done the

:Super( ObjectInitializer.SetDefaultSubobjectClass<UCrowdFollowingComponent>( TEXT("PathFollowingComponent") ) )

in our AI controller. We saved the BP and used it for a few days but realized that might not be the best option going forward. Upon removing that, the PathFollowingComponent is gone completely.

#

in the AAIController construction, it still gets created (line 44), and the pointer there is fine. But when anything tries to use it, it's nullptr

#

and so is the component in the editor

misty wharf
#

This is the way to go if you want to use the crowd comp, but it can happen when you change it again that any BPs will get corrupted

placid halo
#

how that gets corrupted?? 🙂

#

I've seen similar problems before (don't remember if changing the class of the component or renaming the component or both), but why/how it gets corrupted?

misty wharf
#

Not sure but as far as I can tell same reason as those other types of corruption

placid halo
#

is there any python script or commandlet on the webs that would "recreate a bp from scratch"? Maybe just gets a source BP and make a new BP?

misty wharf
#

Not sure, I think there might be some tool to fix corruption pinned on #cpp

sonic garnet
#

Im experiencing a huge fps drop when skeletal meshes are moved in any way ( in the editor with the mouse, or while playing the game ). I tested many things and concluded that the more bones a mesh has, the more fps drops when it moves. Its not a problem with pathing, shadows or animations, i tried disabling all. Replacing the mesh with something without bones works like a charm, no fps drops. So what am i missing here? How can games have 50+ animated skeletal meshes chasing you while it stays above 60 fps? Mine drops to 30 when there are 20+ enemies..
And to top it all off, the enemy is low poly.

Am i missing something importmant here? Or is my i7 6700 and GTX 1060 6gb just to weak for this?

Please help, this has stopped my progress totaly..

misty wharf
#

There's ways to optimize skeletal mesh rendering, such as turning off some physics things on them etc. but this is probably better to ask on #animation or something like that

harsh storm
placid halo
#

Also how complex skeletal meshes are matters. In terms of amount of bones and amount of skinned vertices. You generally want to limit 4 bones per vertex, but artists like to push that to 12, specially on faces.

sonic garnet
#

the bones in the mesh

#

even tho there are only 10

placid halo
#

the animation bluperint and the new control rig in UE5 might be churning many cycles of your thinking rock, depending on what you have there (real time retargeting used to be expensive, don't know how it is in UE5 these days).

harsh storm
sonic garnet
#

thats why im ruling out move component

#

cuz 1000 normal rocks or trees following me doesnt drop fps. If i put any mesh with bones back in, fps tanks

#

So what i wanna say is that if i put 20 enemies on the ground and make them follow me, fps goes from 60 to 30. IF i change their mesh to something with no bones, FPS stays 60 while they follow me.

misty wharf
#

You should profile with Unreal Insights to see where the time is being spent

sonic garnet
#

im gonna be honest here, i never profiled anything and those numbers dont mean anything to me.. 😦 can you at least tell me pls what do i put into the cmd and ill try and figure it out 😄

harsh storm
sonic garnet
#

thx 🙂

haughty tide
#

is there a way to grab custom EQS contexes that return a UObject rather than an actor or vector as UEnvQueryContext_Blackboard base does ? I just want to grab a blackboard key which is type of DynamicAbility in a generator, but the best way possible I see is using a context in this case. Open to more ideas.

stray bobcat
# uneven cloud What is the problem that you are trying to solve?

Thanks. I'll have multiple AI and I just don't need them checking sight every frame. It's going to waste performance and I'd rather have a timer that runs say 5 or 10 times a second. It will allow me to have more AI in the scene at once and save CPU for other things. I thought I read somewhere you could change how often it runs but maybe I misunderstood.

celest python
terse glen
dapper crest
#

Hey guys I'm trying to get a better understanding of navigation in Unreal. Does a dynamic nav mesh vastly affect performance? Or does the mesh get marked as dirty once it's modified and new paths are only calculated when this occurs rather than constantly?

misty gale
coral mesa
#

got a question what's the difference between RVO and boids?

#

I'm making custom movement component

#

which is gonna glue at the navmesh while moving. Doing this for performance reason ofc

#

but need avoidance rn

misty wharf
dapper crest