#gameplay-ai

1 messages Β· Page 158 of 1

ocean wren
#

you can access the navmesh and connectivity yourself, this is probably one of those use-cases

#

The other thing to think about, is if you want it pathing to your player, or your AI?

#

I'd have thought calling in backup would want to path to the AI calling for backup?

cerulean girder
#

its for the ai

#

yeah theyre heading to the ai

#

that called back up

mossy nexus
#

can you even access a raw dijkstra from UE4 natively?

cerulean girder
#

i dont think so

#

ild have to write custom for that

mossy nexus
#

that was my thought as well

cerulean girder
#

which is fine, just didnt want to reinvent the wheel if there was already a way

ocean wren
#

right, so get the navpoly under the AI's current position (assuming its on the navmesh), then do a dykstras from that navpoly, looking through the list of EQS positions you'd generated and stop at the first result

mossy nexus
#

I mean you could copy the UE A* and just throw away the heuristic

ocean wren
#

You don't really want paything as it is

#

pathing even πŸ™‚

mossy nexus
#

well pathing is a pay thing

#

so it's not wrong πŸ˜‰

mossy nexus
#

I got a query

#

suppose I have something like a rotating camera that can look for the player. it is static, but positioned in such a way that it has jurisdiction over a large area. the area is big enough that the camera doesn't have the cone size to keep watch over it all at once. I'm looking for a way to keep it relevant to the player as they traverse the area without seeming conspicuous or gamey. my initial thought was to force the pitch rotation to change in relation to how close/far the player is to the camera position. but I'm wondering if there are other, and perhaps, better ways?

#

cmon AI peeps

midnight scroll
#

Is there a particular reason that AI Focus doesn't seem that widely known? This is concerning me, because it's exactly what I want. It looks fine, it works perfect. But I've been listening to a lot of tutorials, reading through a bunch of AI stuff. Yet I haven't seen a single mention of it. I went to start implementing a small system on my own and ran into the SetFocus call. Yet tutorials and guides and everything else basically just tells you to rotate the AI yourself towards a target using tick and interpolation math. It isn't even a basic BehaviorTree node to set a basic target, nevermind to use the different levels of focus, so what the hell is wrong with this system that everyone avoids it so hard?

mossy nexus
#

I don't know. I think this is the second time I hear anyone mention SetFocus

#

but I've been doing my own system from the get go

#

I generally stay away from proprietary functions both to not need extra includes or hookins to things I don't need, and because I have greater control over my own code

midnight scroll
#

Which is fair. I won't need anything more than what this offers. I'm just really confused as to why it's so unknown. It would literally replace dozens of "How do I tell my AI to face a target" tutorials. Single BP call, Done, GG, no tick implement.. Oh right, that also means no videos and Youtube views.

ocean wren
#

CE: what do you want the camera to do? keep the player in view? lead the players current motion so that you can see the world in thier forward velocity?

mossy nexus
#

stay relevant to the player. so like, no matter where the player moves in that area, the camera has a chance of spotting the player

ocean wren
#

I've typically done that.. computed a look at position which keeps the player and some future position (based off velocity) in view. Basic trigonometry to calculate FOV and look at really.

#

Similar to what Mario 64 did πŸ™‚

mossy nexus
#

I don't know what you're referring to

ocean wren
#

you don't know Mario 64?

mossy nexus
#

I haven't actually played Mario 64

ocean wren
#

have a look at a video of it being played.. notice how the camera predicts the future position of the character.. that sort of thing

#

its basically calculating a dynamic look at position that is ahead of the target agent scaled by the agents velocity

mossy nexus
#

okay but this isn't the player camera

#

this is just an AI camera

ocean wren
#

well, it doesn't matter, I'd still do it anyway

#

that way, you never lose track of the character

mossy nexus
#

I don't think it does what I'm looking to do

#

the point is not to not lose track of the character though

#

I can handle that once the character is spotted

ocean wren
#

Well, how about this.. find a video of what you want it to do, and I'll explain how to do it πŸ™‚ assuming I know

mossy nexus
#

but this is staying relevant as an obstacle

#

as in, the camera is an enemy. you are sneaking past it

ocean wren
#

oh right, so you just want it to sweep an arc?

mossy nexus
#

the arc isn't the issue

#

the camera is overlooking a large area. at some point the player can get close enough to the camera to hide "beneath" it. I want the camera to adjust in some way so that the player can still get spotted closer to the camera

ocean wren
#

So tilt the camera down?

mossy nexus
#

yeah that was my first thought

#

but it's going to seem a bit conspicuous, being that the player hasn't been spotted yet

ocean wren
#

Why not make a camera thats one of those security ones, they're just basically a dome πŸ™‚

mossy nexus
#

like the camera knowns roughly where the player is

#

and I'd have to explain that

simple crest
#

That's gonna look hella weird lol. "It knows I'm here but it doesn't know I'm here"

Have the camera do one sweep at long and one sweep at close pitch?

ocean wren
#

why even do it? let the character have the benefit of not being spotted?

midnight scroll
#

It's a super high tech camera system with heat and air displacement sensors?

mossy nexus
ocean wren
#

have overlapping camera arcs?

simple crest
#

Or just use a pie slice detection instead of a cone

mossy nexus
simple crest
#

Indeed you could

ocean wren
#

I've never seen a security camera do that πŸ™‚

mossy nexus
ocean wren
#

Why not make it a drone? then you could have quite interesting behaviour

mossy nexus
mossy nexus
ocean wren
#

Or how about this.. have a mounting with TWO cameras? just different arcs?

simple crest
#

Lol well there you just answered your question. Duct tape two cameras together

ocean wren
#

I've seen multi-camera thingies

mossy nexus
#

got a reference?

ocean wren
#

google image search is the best reference πŸ™‚

mossy nexus
#

I have no idea what to search for

ocean wren
#

CCTV cameras

mossy nexus
#

I'm not sure a multi-camera thingie is a technical term

ocean wren
#

literally the first page πŸ™‚

mossy nexus
#

yeah okay

#

I guess I can look into that, thanks

ocean wren
#

I was thinking something more like this:

midnight scroll
ocean wren
#

See that one would naturally have views at a shallower angle too

#

The ones we have in our computer labs look liks this:

#

and the technicians can rotate/pan the camera remotely

#

I think they're called PTZ cameras

#

pan/tilt/zoom cameras

#

That last one would be a bit more visible about where its pointing, but definitely looks PTZ.

misty gale
#

Ptz cams are nice

#

We use them alot

#

Ptz dome cameras

ocean wren
#

Seems they're popular because you can remote control em πŸ™‚ lazy shits πŸ™‚

misty gale
#

Indeed

#

We remote control entire supply stations

ocean wren
#

And not ideal for when someone is trying to stealth rob your bank, too easy to catch them

#

Good for ML stuff though, having the machine learning model do the camera control and tracking and whatnot

mossy nexus
#

I keep thinking markup language when you say ML

#

instead of machine learning

ocean wren
#

machine learning markup language πŸ™‚

mossy nexus
#

MLML

#

MLUML

ocean wren
#

confusing?

mossy nexus
#

not as confusing as lisp

ocean wren
#

damn, almost 2022

mossy nexus
#

here's to another year in isolation

ocean wren
#

YES!

#

alien isolation? πŸ™‚

pine steeple
#

πŸ€”

#

i hate those multi camera setups

#

scares me, like big brother is watching me

midnight scroll
#

KAOS. Best AI pathing that avoids getting stuck?

pine steeple
#

stuck where and how

midnight scroll
#

Like, RVO stuff or crowd pathing thing.

pine steeple
#

RVO does not care for navmesh, so the agents can end up outside of navmesh bounds

#

crowd pathing does care for navmesh (slightly), but its a lot more jankier than RVO

#

i did try using both (turning on/off rvo/crowd following depending on situation) but could never get it working nice

#

best one for me was Crowd following

#

especially with big crowds

#

just reduced how often avoidance was calculated

#

every frame is ridiculous

midnight scroll
#

Hmm.

pine steeple
midnight scroll
#

I really wish there was a way to affect navmesh, except for self.

pine steeple
#

i implemented this on engine level

#

there isnt

#

and that would be another entire headache

#

sounds good in theory, bad in practice

keen crow
#

Is there a good way to make my character just stay still in BT in an infinite in-progress task so that only a higher priority decorator may abort such idling? At some moments of my gameplay I want my NPCs to do nothing but without reevaluating each decorator every BT-tick, instead I want only blackboard-observed values to abort such behavior in higher priority decorators

mossy nexus
keen crow
mossy nexus
#

yeah

keen crow
#

then how is different from default task Finish with result In Progress?

mossy nexus
#

I guess it isn't. I had no idea that existed. but I do like not to use proprietary nodes if I can avoid it anyway

keen crow
#

ok got it. thx

ocean wren
#

Just have a wait node

#

it'll keep going back to your wait task until something more important aborts it

#

so have a wait task as your rightmost

mossy nexus
#

I guess the wait task is cheaper?

keen crow
ocean wren
#

why not?

mossy nexus
ocean wren
#

Well, it doesn't do anything, so how expensive can it be?

#

cheaper than what anyway?

mossy nexus
#

cheaper than having a perpetual progress task

#

the tree will tick regardless, no?

ocean wren
#

Well, it depends on how long you wait for

#

theoretically its supposed to be event driven.. not sure if the wait is using a timer or ticking though, haven't looked

celest python
#

iirc it just updates a float with deltatime

#
Time =+ DeltaTime;
if(Time > WaitTime)
{

finish()

}
ocean wren
#

ok, so it polls the time

#

I mean you're not going to get much cheaper than that

torpid pier
#

Anyone may know what it means when your AI has a red circle instead of the normal green circles in the AI view? My guess it's something with not spawning in correctly but its still moving but can't see it

mossy nexus
ocean wren
#

Wompa: usually if there's an error, its written to the log, so check that

#

CE: Not sure what you mean?

mossy nexus
#

that can be set to In Progress

ocean wren
#

Yeah, but what does that have to do with waiting? if you return inprogress it'll just execute the node again right? so yes you could implement a wait by timing it and returning completed instead of inprogress.. but why not just use the wait node?

mossy nexus
#

yeah so it'll execute the node again, but wouldn't that be cheaper than ticking the wait task?

ocean wren
#

it'd basically do the same thing

#

its always going to evaluate the node, the node always has to check if some time threshold has elapsed.. same thing, different approach, but personally I'd think the wait node made more sense.

celest python
#

Zoombapup, is there any possibility you know the actual difference between three?

#

I'm having issue with by path planner component, might be related with I'm using the first element in the enum

ocean wren
#

Well, the first one is using what it says, a 2D raycast against the navpolies in the navmesh, I suspect the second is using some kind of heirarchical data structure to speed that up (likely the octree as I've seen that in the nav code), the last is probably using the regular A* pathfinder

#

Whats the issue you're having?

celest python
#

Path points (offsets to actual target location) was sometimes not updating their location but I realised it was related with something else

#

Been trying to solve it since two weeks, was getting suspicious about everything in the end. Randomly I found the actual issue and it's fixed now πŸ˜„

ocean wren
#

Good stuff

celest python
#

I guess first one just provides "has path" or "does not have path" info

#

While others can provide actual info about navmesh

ocean wren
#

Well, the first one is just a raycast, so its a line test against the navpoly bounds, gives you a hit when the raycast hits an edge of the navpoly that isn't connected to another one

#

done in 2D, so its basically a line/line intersection test

#

I've used it a few times to probe the edges of navmeshes for cover generation, but ended up using physics raycasts instead

celest python
#

noted, thanks

tranquil robin
#

I have a scene in space and I want the actor to fly to certain point, only problem is that from certain angles there's one another actor on the way. My simple timeline changing the actors location towards the target fails as it collides with that actor. Is there some pathfinding node that works in 3D space that would easily just allow it to detour around the other actor?

ocean wren
#

There's a free plugin on the marketplace that might do what you want

#

but in general, no

tranquil robin
#

Thanks, I know the plugin but it's outdated, not working on the current versions

ocean wren
#

Ah, you're out of luck then

tranquil robin
#

I made sort of vector swing arm type of solution that has center point on the obstructing mesh, but unfortunately on short distances that also fails since my obstructing mesh is spinning and has some extending parts

#

well, i guess it is in to watching tutorials and learning how to build flying AIs from scratch

ocean wren
#

You're basically in need of some collision avoidance, which you could do reasonably with simple steering behaviours, but it depends on your flight physics model

tranquil robin
#

it might work with some capsules to detect collision that then push the actor to other direction, but since my dumb linear, or optional pivot around, system is just on timelines, feels like it gets super messy if try add another layer or manipulation on top of that timeline. Anyways, thanks for the input, I'll go search for some vids on how to make flying AI

ocean wren
#

Why are you using timelines?

tranquil robin
#

there wasn't suppose to be any AI in the beginning, but then there's this specific case if the player gets lost and needs to be "force" returned to the starting point (without just teleporting)

ocean wren
#

Timelines seem a very weird solution is all.. I'd have thought a sequencer sequence? or is this just an interpolation value?

tranquil robin
#

so in most cases I can just have timeline lenth based on the distance to fly the player back to beginning, but it doesn't work if the player happens to be exactly behind the goal where he suppose to fly to begin with

#

it's interpolating yes

#

since it's empty space, except the station, that's the only object player can collide with. problem is someone might fly so far of the course they have no idea where the station even is and needs to be forced back to beginning point before their time runs out

#

they are suppose to dock with the station and that can only be done from one side

ocean wren
#

Why not teleport them?

tranquil robin
#

it's a simulator, you'll be sitting in actual capsule, looking out of window seeing the space

#

that would be highly non-immersive if it just jumped location

ocean wren
#

so you need some way to point them towards the station then?

#

or some kind of auto-docking thing?

tranquil robin
#

there are guides and such, but i just need fail safe automation to fly them back to front. auto docking is already there basically, in case they fail to do it... but it just doesn't work if they close to the station. linear flight works on front, pivot around works from behind the station, except if they are too close to the station

#

maybe trying to do this with timelines was fool's way to begin with

ocean wren
#

Yeah, that sounded a bit of a weird approach

tranquil robin
#

i just thought AI is too big topic for me to go into

#

i'm new to UE and no programming experience, just somehow ended up doing this thing

ocean wren
#

Hehehe.. thats how things work πŸ™‚

viral plover
#

Anyone here have experience with the AI sight rotation instantly snapping towards the target location when using the "MoveTo" AI behavior? I can't seem to fix it in a way that doesn't make matters worse. I would like for the sight perception to follow the actor rotation, which doesn't seem to work when the AI behavior is in charge.

It works fine when I work with character rotations outside of the AI behavior tree though.

midnight scroll
#

I had a problem with that. I had to override the Pawn's C++ FaceRotation and not call Super. I use the following settings in the images there.

void ATarrionCharacterBase::FaceRotation(FRotator NewControlRotation, float DeltaTime)
{

}
viral plover
mossy nexus
#

just make your own BT task where you do a smooth rotation turn before doing a move to

celest python
#

Sadly its not exposed to BPs

#

Enabling use controller rotation yaw makes the pawn also instantly snap directions now.
Usually people lerp the rotation in FaceRotation and it makes it act like bOrientRotationYaw

viral plover
midnight scroll
#

Yeah, that's far out of BP only range. If you don't need the pawn to look at the control rotation for strafing or whatever, you can just orient rotation to movement.

#

If you need control rotation looking, you'll have to pretty much override anything in BP by disabling it all and doing it yourself.

mossy nexus
#

all of this just makes me glad that I made my own system

midnight scroll
#

Looking at the function. I'm not sure if I needed to override that actually..

#

Oh. Well thanks. You just pointed out I can remove that. πŸ˜„ Different settings.

#

Uncheck that, and use my other CMC settings and it works fine.

viral plover
#

Set Focal Point seems to override the the direction snapping, and be compatible with interpolation called upon from the actor blueprint

midnight scroll
#

Nah, you don't need to interpolate. CMC will do it for you.

viral plover
#

My character doesn't rotate at all though when I use the focal point blueprint πŸ˜… (While moving)

midnight scroll
#

Should. I'm using the default focus system as well.

#

Without the FaceRotation override, which I just took out, I'm fairly sure nothing I've done is not BP accessible.

viral plover
#

Can the MoveTo C++ code be accessed in a BP project though?

mossy nexus
#

the move to task is just a wrapper for AIMoveTo

#

which exists as a node in BP

viral plover
#

ah

tranquil robin
midnight scroll
#

As far as I know AIMoveTo relies on the navmesh.

tranquil robin
#

What about "Find Path to Location"?

mossy nexus
midnight scroll
#

There were some plugins like a year ago I was glancing at for flying AI. No memory of them though.

mossy nexus
#

I was toying with the concept of having sky banded navmesh, but my world is not high tech enough to require that

tranquil robin
#

One more question, can these AI related nodes be used in other blueprints? For example, keypress spawns something,followed by these nodes to get path... or do these exclusively have to go to the AI blueprint?

mossy nexus
#

they require an AI controller

#

it doesn't have to be in the AI controller blueprint

#

but you need an AI controlled pawn to make use of them

tranquil robin
#

So I found AI controller on the create blueprint list before, but I couldn't figure out how to integrate that together with the actor I want to be AI controlled

mossy nexus
#

it needs to be a pawn

tranquil robin
#

And on the blueprint where I spawn this actor, error is that the AI controller doesn't exist when I try to call it... so I figured that much that somehow it needs to be manually created

mossy nexus
#

pawn is the term for anything AI controlled

#

pawns also have an option to automatically spawn an AI controller of a given type in their default settings

tranquil robin
#

so how do I combine the AIcontroller and Pawn? Because on pawn I can't find the AI controller

#

As in I was trying to add AIcontroller to the pawn using add component, but I can't find it there

mossy nexus
mossy nexus
#

controllers possess their pawns

#

I'd look up MathewW's videos on AI controller

#

you're obviously not aware of how the system works yet so no point in me explaining the very basics

tranquil robin
#

Yeah, I also saw that AI Controller Class thingy, but figured since I couldn't get it to work I missed something. Anyways, you already helped me understand few things. I was actually checking his video on AIMoveTo, that's why I asked if it requires that guiding area, NavMesh, like you mentioned to. But I'll look up his video on AI controller too

#

Thanks

midnight scroll
#

Does anyone happen to know off hand how to stop AI from slowing down when choosing a new moveto target? Like if you tell them to run to a place far in the distance, they start running, you tell them to run to a point just a few units away from the far away point, it's not even a full degree of rotation away from their current target, but they sort of pause for a quarter second and then start running again.

#

Seems that RequestedMoveUseAcceleration in the AI's CMC was what I was after. Disabling it stops that behavior.

misty wharf
#

Interesting, I would have thought it could be a result of the pathfinding

#

but good to know that's a thing

midnight scroll
#

Some people have reportedly also created full BT Tasks that do the entire movement. Not sure what that changes, but I guess it also solves it if you never call finish execute on the task until movement is done.

mossy nexus
#

yeah I consolidate movement behavior in sequences

fleet pebble
#

Hi
This is my first week with the engine.
I have a pack of animations, a pack of characters, and an environment.
I want to walk the characters around the environment giving them some level of autonomous control.
Then I'll film cartoons in the environment.
I figured out how to retarget the animations from the animation pack to the scanned archviz character pack cause they use the UE4 mannequin
then I made a character object and added the skeleton and the static mesh and an idle animation
then I added a blueprint to the character object that I made and used a simple move to relocate it to a position on the map
all of this was sort of done automatically for me by the engine.
I have like...a million animations in this pack.
Is there a guide that someone can point me to that will help me do things like switch to the walking animation, walk the character somewhere, when they stop, change to the idle animation, make them stretch periodically, etc?
I've gotten to the point where I have to actually learn something lol and I'm not sure what to look up

#

can I just control all that from the character's blueprint?

#

because I watched a video last night that says I can make an AI component and a behavior tree ... can I buy a pack that does that? Any recommendations?

ocean wren
#

You'd probably be better off using sequencer and just playing the animations rather than trying to do AI

#

Theres a video on the Unreal Engine youtube channel from the Epic guys on how to use sequencer

fleet pebble
#

sweet

#

thx

midnight scroll
#

Am I missing a setting somewhere? Is there any way to turn EQS queries into the local space of the querying AI?

#

Meh. Screw it, will just write my own.

midnight scroll
#

The wut?

mossy nexus
#

Not invented here (NIH) is the tendency to avoid using or buying products, research, standards, or knowledge from external origins. It is usually adopted by social, corporate, or institutional cultures. Research illustrates a strong bias against ideas from the outside.The reasons for not wanting to use the work of others are varied, but can incl...

#

okay admittedly they don't paint it favorably

#

but I think it's entirely fair to write your own stuff in lieu of existing elements

midnight scroll
#

Oh. Yay. The custom EQS generator class crashes the engine.

midnight scroll
#

So. I'm curious why this doesn't work? This doesn't create points when used in an EQS testing pawn like other generators do. Hard coded some world points for testing.

#

Ah. Wasn't enough to change the Generated Item Type in the EQS menu. Had to change it as a class default for the generator.

celest python
#

Just FYI, I dont know what changed but overhead decreased to 0.05ms

#

I guess it differs from Standalone to Shipping

#

Now I can do infinite amount of pathfindings πŸ˜„

misty gale
#

just serialize them and you can do infinite anyways πŸ˜›

#

well.. capped by amount per frame and distance to travel before new pathrequest but thats not an issue at 75

dawn loom
#

what is the "best practice" way of running a behaviour tree?

#

is it with a BT component or with a Run BT blueprint call?

#

and how can I get the BT/BB from blueprint?

celest python
#

On a tick with 0.2s interval

celest python
dawn loom
#

@mossy nexus after thinking about it I guess I should have a service that loops on a .5 second delay that checks if a new task is available when an AI is idle

mossy nexus
#

well

#

I would have the AI query the director when it's idle

dawn loom
#

it's better than making the manager itself check the BBs of the AI controllers to see if they're not doing anything

mossy nexus
#

and the director could then say "do x"

dawn loom
#

yeah that's what I will implement I think

mossy nexus
#

you could also have the director assign roles to your AI and do role based behaviors

dawn loom
#

they're basically NPCs that will move around a little bit to play animations in front of locations

mossy nexus
#

a role would be a struct containing an array of positions, which could themselves be actors or structs

mossy nexus
tardy talon
#

When the other actor gets out of the perception radius, does this then also change the value of the blackboard key back to nothing(or default)?

dawn loom
#

but yeah I will also have to map the locations to an animation to play somehow (probably through an enum for the location type)

#

I guess you could call it a "role" actually

mossy nexus
#

my setup is

#

Point actor that holds information such as animation, duration of stay any potential custom logic

dawn loom
#

how do you get the actors from the manager?

mossy nexus
#

you assign them at editor time

dawn loom
#

I'm thinking about having different zones with different managers so I can't simply query all in map

#

it sounds kinda painful tho no?

mossy nexus
#

what is your alternative?

#

for me it's two nodes in the level BP

dawn loom
#

I was thinking about what kind of gismos can be seen in the level editor

#

something like the spline one but with only points would be cool

mossy nexus
#

that sounds like a pain

dawn loom
#

or at worst having actors that are attached to the manager on the level editor

mossy nexus
#

that's what I am doing?

dawn loom
#

ah you meant attach them by assign them

#

I thought you meant selecting them in the property editor

grizzled hazel
#

"Never do at run time what could be done at compile time" - some smart guy who I don't remember the name of

mossy nexus
#

but the director doesn't know which tasks are supposed to b active until you tell it

grizzled hazel
#

If it's really basic ai then have them all set up in editor and assigned

dawn loom
#

at runtime you would just need to get all the attached actors

mossy nexus
#

this is probably one of the few places I would advocate for level markup

dawn loom
#

and yeah, I'm not the level designer

#

so I have to make it dead simple

mossy nexus
#

actors in world. put them into an array. activate. director goes brrr

dawn loom
#

why put them into an array tho? you could simply attach them

#

in the world outliner

mossy nexus
#

stop

#

you're doing silly stuff

dawn loom
#

that's what I'm going to do πŸ˜†

mossy nexus
#

do it right

dawn loom
#

I can't stand the idea of having to add items in the array one by one

#

it also adds room for error like adding the same actor twice

mossy nexus
#

well get used to it

#

at some point you're handing it over to a designer

dawn loom
#

that's the whole issue

#

if you tell them "just drag and drop it on the manager in the outliner"

#

it's much simpler than

mossy nexus
#

that's not how it works

dawn loom
#

"add empty elements in the list then select the proper actor"

#

it works tho

mossy nexus
#

yeah but it's really bad

dawn loom
#

why?

mossy nexus
#

esoteric thinking

dawn loom
#

how is it bad?

mossy nexus
#

stick to simple things that work

#

you can optimize later

#

You're trying to optimize before even doing anything

dawn loom
#

???

#

hold my glass of water

#

😳

mossy nexus
#

because there is no good way of just dropping a manager into a level and expecting it to understand everything

#

it's a fallacy

#

you can automate behavior and registration

#

and tbh I would advocate using a subsystem in CPP instead of a manager actor

dawn loom
mossy nexus
#

that's silly

dawn loom
#

why is it silly? :0

mossy nexus
#

what happens if those tasks are done?

dawn loom
#

I meant to put tasklocation

mossy nexus
#

no global overview

dawn loom
#

it doesn't get deleted

#

tasks are never done

mossy nexus
#

attaching also make ordering a pain in the behind

grizzled hazel
#

At this point just have a spline to move along if multiple objects are hard

dawn loom
#

as I said it will pick a random task

#

it's attached only on the editor so that when the map is loaded I can know which manager has which tasks

mossy nexus
#

you should have only one manager

#

not a million

#

It's like you want to make it hard for yourself

dawn loom
#

I need exactly 2 because NPCs can't move between a certain area and another

mossy nexus
#

doesn't matter for the manager

#

you're conflating tjings

grizzled hazel
#

This is starting to sound like how darksouls 1 has its ai set up and limited

dawn loom
#

well it does since when a task is assigned the npc will always do it

mossy nexus
#

and that's why your thinking is esoteric IMO

dawn loom
#

I think you guys don't realize the dead simplicity of what I'm doing

grizzled hazel
#

Just use tags if you want specific areas

mossy nexus
#

i think you're trying to oversimplify how complex AI is

grizzled hazel
#

Or a plugin

mossy nexus
#

tags are fine for this. the important thing is having a single robust manager

grizzled hazel
#

NIH Be damned

misty gale
dawn loom
mossy nexus
#

no

grizzled hazel
#

All AI is complex

mossy nexus
#

I'm not

grizzled hazel
#

It's the I part

dawn loom
#

the manager could be replaced with a literal array

mossy nexus
#

you're completely misunderstanding the concept of a manager class

dawn loom
#

there is no "task" to be done, only locations to be in

grizzled hazel
#

Then a sequence would suffice

dawn loom
#

random AIs will be in random locations and move around

#

but that's all

grizzled hazel
#

Then some fluid dynamics using meshes is in order

mossy nexus
#

except those locations are supposed to have animations as well. you need durations for themz because they can't stay in one place indefinitely

dawn loom
#

that will be handled by the AI

#

it will play the animation a random amount of times

mossy nexus
#

how will the AI know what to do

misty gale
dawn loom
#

I'll just get the attached actors and register them to the manager

grizzled hazel
#

Bad practice

mossy nexus
#

lol

dawn loom
mossy nexus
#

esoteric thinking

grizzled hazel
#

Because it can just be set before runtime

dawn loom
#

having an array where you can place twice the same actor is better?

grizzled hazel
#

The compiler can handle that

mossy nexus
#

stop conflating things and start listening instead of trying to have your own opinion all the time lol

dawn loom
#

what compiler are you even talking about?

misty gale
#

Wait, I'm getting this wrong right? Is it bad practice to let the AI auto register, but good practice to manually pick them? This must for sure be me missing some memos

grizzled hazel
#

The engine you're working in, unreal, has a compiler and can at compile time fix stuff like multiple arrays

mossy nexus
#

you obviously don't know architecture very well but you act like you know everything.yet every step you want to take is painting yourself into a corner

misty gale
#

Or misunderstanding whats been said, at the very least :p

grizzled hazel
#

If it's known at compile time

dawn loom
#

do you even know what a compiler is my friend?

mossy nexus
grizzled hazel
#

...

#

No need to be rude

dawn loom
#

if I put an array in my manager and put the same task location in it multiple times how can the "compiler" know that?

mossy nexus
#

if you don't want to listen why are you even here?

dawn loom
mossy nexus
#

ok, good luck then!

dawn loom
#

I gave you a valid criticism and thought of an "esoteric" better way for me to handle things

mossy nexus
#

yes because you conflate things

dawn loom
#

but that's wrong because all I say is wrong?

misty gale
#

Im a bit confused about the multiple tasks attatched to the manager tho

dawn loom
#

I'm not even understanding @mossy nexus's solution because they never explained it fully

mossy nexus
#

maybe because you never took th time to listen?

misty gale
#

Wouldnt tasks also be actors in the world?

mossy nexus
#

you immediately went NO I DON'T LIKE THAT

misty gale
#

With their own locations, and logic?

#

'Smart objects' or whatever

mossy nexus
#

arrays bad

#

etc

dawn loom
#

but if I got it right, I should make two BP classes, one for tasks and one for the manager, have only manager even though it handles two distinct areas that are unreachable from one another, put the tasks in the map and then register it through an array manually by putting the tasks on the array

#

my criticism was, why not attach locations to their manager instead of letting designers add it to the array

#

because having an array means the same task could be in it twice

#

which means two AI could be sent to it at the same time

#

and having one manager instead of two would just mean having two arrays instead of one and switching between them

#

and again, why not attach them, there is literally no reason to not attach them

mossy nexus
#

what happens once you want to switch over to using something like subsystem instead? every level will have to change its approach because you conflated ownership in level with mapping

dawn loom
#

why would I ever move to a subsystem?

mossy nexus
#

why wouldn't you?

#

it's the premier way of doing things

dawn loom
#

and how would that literally change anything ?

mossy nexus
#

accessible everywhere without hitches

dawn loom
#

if my BP classes are in a subsystem or not won't change the fact that they can be attached or not

mossy nexus
#

yes it would

#

a subsystem isn't an actor

misty gale
#

Subsystems are awesome, i've heard

#

No clue how to make one yet tho πŸ˜„

mossy nexus
#

the fact that you still insist on having a manager as an actor I don't think is helping you

dawn loom
#

sorry I think I misunderstood what you meant by subsystem

#

but still

#

why would I ever move to a subsystem?

mossy nexus
#

it's just driving you down this path of making decisions that will leave you with huge tech debt

misty gale
#

Also makes sense for thr ai to query the manager

#

Not the other way around

mossy nexus
#

yes

misty gale
#

At best, manager idles , while all ai do their stuff πŸ˜„

dawn loom
#

as I said the "manager" is nothing more than an array of locations

misty gale
#

Instead of constantly checking what every single one is doing

mossy nexus
#

you still have the issue of ordering

misty gale
#

Ending up with a ton of edge cases and scenarios where the manager must handle it

dawn loom
#

it would only check what they are doing when it needs to assign something to one of them

dawn loom
#

how can you order a list of location meant to be picked randomly?

#

what would even be the point?

mossy nexus
#

what if a task requires more than one location?

dawn loom
#

as I said, idk what you have in mind but if you listened to what I'm saying

#

it's not even a task

#

it's just standing

#

and playing an animation

misty gale
#

What is the ai really doing here? Random idle walking?

dawn loom
#

yes

#

that's literally all

mossy nexus
#

why even have a manager then lol

#

just assign random points to AI and done

dawn loom
#

I said it's dead simple but I guess I'm just thinking "esoterically"

misty gale
#

Not sure it counts as ai at all tbh πŸ˜…

dawn loom
#

because it needs to go to predefined spots

mossy nexus
misty gale
#

Random points, wasnt it?

mossy nexus
#

not because of your "simplicity"

dawn loom
#

I think the only one conflating things here is you my friend

dawn loom
mossy nexus
#

just lol

dawn loom
#

what criticism πŸ˜…

#

you're criticizing me instead of criticizing any part of my system

#

all the while asking me to make it much more complicated

#

for absolutely no reason

#

and packing things together when they don't need to

#

that's the definition of conflating πŸ˜…

mossy nexus
#

I'm criticizing your thinking because you're trying to do 3 things at once

#

instead of focusing on a layered system

#

if you truly want a dead simple system. don't have a manager

misty gale
#

Could still have a manager

#

But not for the ai

dawn loom
#

how would an AI know if a spot is empty or not then?

mossy nexus
#

just assign random points directly to the AI

misty gale
#

For the locations

#

As they are fixed

dawn loom
#

it's more of a locations manager than an AI manager actually

misty gale
#

Predefined*

mossy nexus
#

or not even, just collision detection

misty gale
#

Youd want to know before that

dawn loom
misty gale
#

Before sending an ai to a spot

#

That you know is already taken

mossy nexus
#

they wanted dead simple

misty gale
#

SimpleParalell :p

dawn loom
#

πŸ˜…

mossy nexus
#

if the tasks never change you don't need a manager

dawn loom
#

I would have been done with my system if I was working instead of chatting πŸ˜…

misty gale
#

Id be done with my game if i uninstalled discord

mossy nexus
#

if no overview is needed you don't need a manager

mossy nexus
#

just assign points on the AI

#

done

dawn loom
#

no because they could go to the same spot

#

and leave others open

mossy nexus
#

oh right you hate arrays

#

I forgot

dawn loom
#

wtf is wrong with you?

#

jesus

mossy nexus
dawn loom
#

I said I think building the array from attached locations is better from a designer UX point of view

misty gale
#

So manager must know if a spot is assigned to an npc

#

If it is, pick another

dawn loom
#

I said it picks the spots randomly

misty gale
#

Or keep them in sorted array

dawn loom
#

for the 542123th time

#

telling me I'm not listening

mossy nexus
dawn loom
#

when literally not reading what I'm saying

#

it picks one of the spots randomly

#

not a literal random location

#

I said it when you were talking about order

mossy nexus
#

if two AIs aren't even sharing the same spots, how could they collide?

dawn loom
#

I told you order doesn't matter because it'd pick them randomly

#

and spoiler, I don't hate arrays

#

I just don't see why I would make a public array when it could fetch the attached actors and copy that on begin play

#

I would have literally been done if I wasn't talking

misty gale
#

Copy? What? πŸ˜…

mossy nexus
#

ok buddy, good luck

dawn loom
#

ty

misty gale
#

I missed the copy memo :(

dawn loom
#

this is what I meant by copy

#

this is in the "manager"

misty gale
#

Ohhh

#

I see

#

Id just let the actors register to the manager directly but i suppose this does the job

#

Being registered, they could use dispatchers to communicate with the manager

#

If needed

#

Like if their state changes

dawn loom
#

they don't need anything really

#

initially I was thinking about having literal vectors for the location

#

I don't even need an actor

#

I could have a struct with a vector and an enum for the type of animation to play

mossy nexus
dawn loom
#

it's pointless to try to force a certain solution on me*

#

I take any criticism of my system and when my manager was broken (before I even had had a good thought about it) and you gave me valid criticism I listened and changed the way I see things

misty gale
#

Actors are easier to manage, since they can hold info beyond just their location

#

They could also have custom logic if you wanted expansion down the line

dawn loom
#

but here it's a tradeoff between making it a pain for designers and a potential source of bugs vs ???

#

I guess the downside would be if I want to change my BP to a subsystem it would be an issue but why would I ever do that

dawn loom
dawn loom
#

in fact all of this is unnecessary

#

our game didn't even need any of this

misty gale
#

If thats decided, then its all good

#

Im often ovetthinking how flexible i want my systems to be

dawn loom
#

I'm only doing it to get used to BTs and BBs only

misty gale
#

Overengineering is a true curse

#

At times

dawn loom
#

the NPCs were literally skeletal meshes looping an animation

#

I thought it would be more fun if some could move around locations

#

but that's all

mossy nexus
misty gale
#

Its a tradeoff tho

mossy nexus
#

I think having to unwind years of tech debt trumps overthinking easily

#

but your mileage may vary

dawn loom
#

I am 100% with you on this one @mossy nexus

#

in fact I'm rewriting everything in our project (not talking about AI) specifically because they used drag and drop BPs and made spaghetti code

#

but again here it's dead simple

#

and the risk of having the array not be correctly filled by the LD is just too big

mossy nexus
dawn loom
#

I will always be 100% against selecting items that are in a level on the details panel of a blueprint (be it an actor or a subsystem)

#

and I would much rather have them attached or be part of the actor itself

misty gale
ocean wren
#

Hhaha.. you guys really just talked over each other πŸ™‚ read the thread back..

#

so... how I'd do this.. I'd have a BP that auto-registers itself with an actor (you can find specific actors in a level onBeginPlay). That means you don't need to have your LD's do anything but drag positions for your AI to go to. The actor they register themselves with would be the one that AI uses to get the location to go to. I take the point that they're just locations, but in my experience they never are "just" locations. You have to reserve them otherwise you have multiple entities going to the same spot etc.

#

the point I think people were trying to make, was that parenting actors to other actors is kind of lame as a setup. Plus UE editor doesn't make that ideal.

misty gale
#

Nice summay ^^

ocean wren
#

I'd suggest it was a better idea to just have the "place you can go to" register itself as a place to some central system (doesn't matter if its a single actor or a system) mainly because your LD's can have a nice gizmo based position to edit and see and group in the outliner and such

dawn loom
#

the issue is that there are two areas that won't be reachable from one another

#

and I don't need to make the actors have a "reserved" tag because they would simply be removed from the array when they're taken

#

and then put back in it when they're freed

ocean wren
#

So add a "area ID" to your BP that registers a position so that when an AI queries for positions it gets only those

misty gale
#

Also, two weeks from now some gd says "we need the ai to do more"

#

"Would be cool if the npc would do x"

#

Then your system is ready for this with smart actors :p

ocean wren
#

well, ok, having two arrays vs an array with a reserved bool.. whatever πŸ™‚

misty gale
#

Or potentially smart* actors

dawn loom
#

I'm the GD technically (and I already have the AI doing more, it can stare at and follow the player randomly if it's nearby)

dawn loom
dawn loom
#

but what's so wrong about attaching actors?

misty gale
#

But then something outside the manager is modifying what the manager is ment to control?

#

Containment

ocean wren
#

So generally, I'd have whatever data needs to be associated with a position within the position object, and have queries on the manager actor/system to filter them

dawn loom
#

let's not go down the rabbit hole of OOP

ocean wren
#

well, the attaching actors thing is just a pain in the arse when you want to move them properly and when you want to version control the level or do multiple editor stuff. But hey, if thats what you like, go for it

#

I mean if you're the only one working on it, you do what you want.. but my experience has been that the editor doesn't do well with heirarchies of objects for some reason, I guess I might have seen some edge cases but still

grizzled hazel
#

Also wouldn't just a nav modifier do the job of separating areas?

dawn loom
#

I find it harder to have to make people put area tags or fill an array manually from instances in the level

#

Than to attach even if it's a pain

ocean wren
#

You don't fill the array manually

dawn loom
#

Especially since the parent won't move

ocean wren
#

thats the point

#

they fill themselves into a central system

grizzled hazel
#

Like there are nav modifiers made specifically for separating areas like you want, no need for multiple systems

dawn loom
ocean wren
#

Well, if you use individual actors, you can set multiple properties on all selected actors at once, so using a tag or id for each area would work there

#

just add an id/tag/whatever to your position objects

#

select the ones you want in each seperate area, give them different values

#

that'd just be part of the query setup right

#

"give me points near me in area 1", "give me a point in area 2"

grizzled hazel
#

Just gonna throw this here

dawn loom
#

I think it'd be even simpler to figure areas from what is reachable or not

ocean wren
#

he's not using navigation in this particular aspect though

dawn loom
#

no need to have a tag or an ID or anything

ocean wren
#

so nav isn't the issue

dawn loom
#

I think this might be a perfect solution

ocean wren
#

so its not JUST selecting a point then

misty gale
#

πŸ˜…

dawn loom
#

it is

ocean wren
#

its selecting a reachable point

misty gale
#

It almost never is

ocean wren
#

at random

dawn loom
#

yeah

ocean wren
#

that isn't already being used

dawn loom
#

yup

ocean wren
#

THAT ISN'T "JUST" A POINT πŸ™‚

dawn loom
#

it's virtually the same though

#

because if it's used it won't be selectable

grizzled hazel
#

You see why we've been at this for HOURS now?

dawn loom
#

and all points will be reachable if they're in the array (either attached or from deducing it with the area)

grizzled hazel
#

God I should've remembered nav areas earlier...

ocean wren
#

I dont think there's a way to contrain a thing within the navmesh though

#

constrain even

#

although to be fair, it'd only be a simple construction script change to do that

misty gale
#

Wait, howd nav mesh fix this you said?

dawn loom
#

also sorry if what I said to you earlier sounded rude, I didn't mean to, I simply wasn't understanding what you meant with "compile time" as I'm a software dev (and I studied regular computer science), when you start the editor the "compile time" is already done, I guess you meant on construction @grizzled hazel

worthy python
#

Hello. Where can I find an example of this visibility algorithm? I want separate the safe and danger zones.

dawn loom
grizzled hazel
#

When you ship for development it compiles it

misty gale
#

Is that easily accessible?

#

Didnt think it was

#

Atlast not in bp

grizzled hazel
#

This is why things like fast paths are important for anims and so on

misty gale
#

Worked out some custom crap to handle it instead

dawn loom
#

ah I don't know about that

dawn loom
#

from a recovering performance maniac point of view I understand how doing something on begin play is technically at runtime

#

but I'd argue this would be so cheap it wouldn't even be too insane to do it multiple times per second

#

or even on tick

#

god forbids

misty gale
#

I use tick on a daily basis for ai πŸ˜„

grizzled hazel
#

You better not have any bp casts...

dawn loom
grizzled hazel
#

Tick on ai is fine just not in bp

dawn loom
#

btw I'm more of a C++ person than a BP person and if it was only up to me I'd have made my own state machine in C++ but I'm trying to be considerate of others

ocean wren
#

I thought this was a one man thing?

dawn loom
#

no I'm the only dev but there are 2 others on the team

grizzled hazel
#

Do it in cpp

ocean wren
#

DO IT πŸ™‚

dawn loom
#

I won't tick anything

ocean wren
#

fuck the others, they hate you secretly anyway πŸ™‚

#

screw those guys

dawn loom
#

I was thinking about making a BT with BTT/BTD/BTS in C++ but it looks like an absolute hellish pain to use those

misty gale
#

My tick is mostly for movement , for now

#

Its how i handle my 2k ai

#

Other methods go sluggish

dawn loom
#

so right now either I say fuck BTs, BBs, and may hell ensue

#

and do everything in C++

ocean wren
#

you can use BT's and BB's in C++ just fine

dawn loom
#

or try to be considerate and use BP (but probably make anything that is frequent enough in C++)

misty gale
#

Are they reviewing your code?

misty gale
#

Peer review?

dawn loom
#

they could move some stuff around in the BT if I made it simple enough

#

but they wouldn't understand anything if I make it in C++

ocean wren
#

But they wouldn't see the C++ would they

#

thats kind of the point

dawn loom
#

speaking of them I have a meeting on discord with them in 5 minutes

grizzled hazel
ocean wren
#

all they see is the BT in the editor, not the C++ code underlying it

dawn loom
#

they might, I don't know if I'll stay in this company for long but I could get some shares so it's in my best interest to leave them something they could modify easily after me

#

oh you mean about BTTs in C++

ocean wren
#

I mean the BT nodes are all in C++ anyway

dawn loom
#

nah that's just for me

#

if I go full C++ I'll scrap the BT

#

BT nodes in C++ look painful to make

ocean wren
#

oh I get you.. not sure why you'd do that

#

its just deriving from a base class.. I don't see why you'd think that was painful

dawn loom
#

I mean the BTT_MoveTo which sounds simple as hell is like 400 lines in the .cpp

ocean wren
#

Because it isn't simple

#

navigating a path on a navmesh isn't simple

#

especially one with string pulling

#

and potentially collision avoidance

dawn loom
#

we're not talking about the actual AI move tho

#

it's only the task but well

misty gale
#

Clean code for your buddies (and others who might see it) would be like 80% cpp and 20% bp exposed if you want the best possible rep :p

#

Showing clear lines between the two πŸ₯²

dawn loom
#

yeah that's what I do mostly but well I'm still kinda learning

misty gale
#

Same

#

So im more talk than game, if you catch my drift

uncut python
#

So ive been working on improving my level a ton and now my level is more advanced that my AI Director can handle, i want to play test to see what changes I need to make. I want to have hordes spawn procedurally along my level, but only spawning in in front of me, the frequency being determined by numerous variables. How can i define whats forward progress in my level and backwards progress using the navmesh

#

i currently have a system with EQS but the AI are spawning a bit more randomized than id like, Id like to somehow maybe make my grid so that it paths out along the remaining (linear) level that i havent traversed yet

mossy nexus
uncut python
#

I was thinking maybe a spline path if i have to but id like it to be reliant on the navmesh itself

misty gale
#

How would one handle npc pickups? Would they register to the npc manager aswell, and any idle npc would be assigned to pick it up and deliver it to its destination?

mossy nexus
#

as in

#

an actor that has animation etc. on it already

uncut python
mossy nexus
misty gale
#

Its a resource in my scenario,

mossy nexus
#

right, same difference

misty gale
#

Transporting a resource from a production building to some designated storage area

#

But yeah its the same

#

Was planning on tag for the 'item' data, which uses a db to get the mesh and stats for thenitem

mossy nexus
#

if you have an AI director you could query AI director for high level things, such as spaces that accept your resource

#

anyway more complex than that and you're probably looking at an inventory system of some sort

tardy talon
#

Is this a good use of casting to avoid them sensing other enemies? Enemy class is quite light and should always be loaded when this is hit

misty gale
#

I do indeed. I did start on a second component for the buildings, so i can keep a clear line of responsibility

tardy talon
#

I know you can filter by using C++ but I dont know C++ hehe

mossy nexus
crimson galleon
misty gale
#

Buildings being any building, including storage areas and whatnot. Also makes it easier for high level player control of them, and collecting/showing stats and whatnot

tardy talon
mossy nexus
#

check tag against tag

crimson galleon
mossy nexus
#

sort of like faction

tardy talon
#

oh lol I thought there was a setting for filter by tag on the component

#

this makes more sense hehe

mossy nexus
#

I generally have a set of actors to look out for, and then check faction on those down the line

tardy talon
#

or well it doesnt there should be a blueprint setting for this >: (

misty gale
#

There is? 😢

crimson galleon
#

All actors already have a tag feature

tardy talon
#

No I mean there should be a setting on the perception component

#

like this

crimson galleon
#

Try breaking the stimulus

#

But i getcha there. Detection by affiliation sucks though - for bp

tardy talon
#

Is the get tag then branch more efficient than a cast? why use 2 nodes when 1 do trick

mossy nexus
# tardy talon

yeah I mean this is what I'd use instead of tag. I'm not sure if the perception component handles targets as well though. like for instance, what if you have an enemy structure?

crimson galleon
tardy talon
#

Haha fair enough thanks!

crimson galleon
crimson galleon
tardy talon
#

True true

misty gale
#

If only tag was gameplaytag

tardy talon
#

for now its fine like this but in a bigger project for sure

crimson galleon
# tardy talon What does that mean?

You may not need to break the stimulus. I usually do to check if it is a successful result or not because aip fires when they spot and lose sight of anything detectable

tardy talon
#

good points

celest python
misty gale
#

I see

#

My stuff isnt time sensitive so im just doing one request per frame

#

Gotta add something extra for avoidance soon tho

celest python
#

Just to understand your mindset a little more; I still dont understand why did you use 'serialization' word at the beginning? I didnt study serialization features much so maybe I'm missing something πŸ€”

misty gale
#

It was a bad word to use, my bad :p

#

Not a native englisher (obviously), so was the first word that came to me when i wrote it

#

Calling it a queue was more accurate really

ocean wren
#

detection by affiliation is broken because you can't have an affiliation for the player, which is just bizarre

mossy nexus
#

good to know

#

once again seems that I made the right choice in making custom perception 🦾

ocean wren
#

Its not broken in general, its just that the component is added to the AIController and not on the controller class where it should be

#

or rather, on the pawn side of things, instead of the controller

#

not typing well tonight πŸ™‚

mossy nexus
#

so only fixable incpp?

ocean wren
#

Yeah, this is a case where I'd do it myself in C++

#

Using an interface

#

Then you could have a BP version too

#

its one of the downsides of inheritance trees, if you get it in the wrong part of the tree you get it wrong, which they've done

uncut python
#

is there a collision settings i need to fix?

uncut python
#

they work up until i melee them, they fall down and get back up and are supposed to keep running

#

I can get some more screen shots when i get back from work

crimson galleon
#

so they move initially but not after some event?

uncut python
#

correct, the behavior tree is also showing the correct info, its retriggering the move to after the melee fall event occurs

#

anbd theyre rotating towards me in what it looks like an attempts to come after me, but they stutter a little and wont move

crimson galleon
#

sounds like the fall event is changing something then....?

#

could they be ping ponging between two BT states/branches?

uncut python
#

ive checked the bt and it appears to the run the same way before and after

#

I also notice something similar near door ways they start to bunch up with eachother and just stand there ujable to move after no matter my position

#

like 1 will go thru the door fine then 2 come and they swarm up after 1 gets caight

crimson galleon
#

so will one Ai alone work without problems entirely?

uncut python
#

Yes

crimson galleon
#

then maybe multiple are messing each other up by affecting the navmesh area

uncut python
#

Possibly, I tried pulling up AI debugger but I couldn’t find anything to show that, is there a way to visualize the navmesh area

crimson galleon
#

console command: show navigation

uncut python
#

Sweet thanks I’ll try it when I get home

#

Thank you

uncut python
ember agate
#

Hello, i made a simple character and on event play i have "ai move to" but its not working, it was working but i did some changes to map now it stopped working, i also deleted navmesh bounds and re added them but still not moving, move to location or actor works so the character can move

misty gale
#

Navmesh move it

ember agate
#

If you mean navmesh bounds it doesnt work if i move it

misty gale
#

Was worth a shot making it rebuild

#

Been known to work more than a few times before

#

Does the ai move to respond with failed?

ember agate
#

nope, it doesnt fire the on success or failed

#

the simple move to location works too

misty gale
#

Does it execute at all? Got a screenshot?

ember agate
#

Weird, plugging "self" into pawn input worked, but it i tried that before and it didnt work, also i dont remember i had it when it was working the first time

uncut python
uncut python
#

i found it i beleive

#

I was disabling collision on the capsule during the animation so i can walk through the zombies at least until a proper stumble back animation

#

when i turn back on collision once the anim is over they mustve slightlky clipped into eachother and caused an overlap. Seems to work for now but ill keep an eye on it

#

thank you

crimson galleon
#

trippy

celest python
#

Anyone knows where exactly previous (or current) velocity get zeroed when a new path requested for AI?

#

When following player, AI stops for a second before moving to another player and I want to prevent this

#

Nvm already found it (ApplyRequestedMove() on CMC)

midnight scroll
#

Oh. didn't see you found it. πŸ˜„

celest python
#

Thanks though πŸ™‚

midnight scroll
#

Couple different things affect that apparently.

tardy talon
#

AI behaviour trees are the most unintuitive thing I've come across so far 😭

pine steeple
#

i like them

#

easy to use once you learn them

celest python
#

Avoidance Time is way cheaper than I expected

#

Interesting

#

Its literally nothing but 0.02ms on 30 CMC

misty gale
#

what does that include

celest python
#

Its bUseRVOAvoidance in CMC

misty gale
#

yeah "AvoidanceTime"

#

does that include all things related to avoidance?

#

guess i gotta dive into it and see what it does

celest python
#

It's UAvoidanceManager's processing time

#

Anything related to avoidance yes

misty gale
#

Ah Alright cool

#

still to expensive πŸ˜„

celest python
#

It's beyond my programming skills πŸ˜„

#

Pretty sure Epic also got it from somewhere

#

Does not look like Epic's work

misty gale
#

probably beyond mine too, so it'll be interesting to see what i can come up with that's dirt cheap, and works sufficiently

celest python
#

It kinda breaks the movement

#

Controller Yaw and Avoidance velocity direction does not seem to be matching

#

Pawn looks at the target goal but moves to right without rotating

misty gale
#

Yeah i've seen that , almost as if someone just did linetrace forward and if hit pawn add right vector location offset x)

#

I'll probably use some combination of some crowdmanagement along with better pathfinding

celest python
#

CrowdManager is too expensive though

#

Barely can handle 30 pawns

misty gale
#

custom implementation of one i guess

#

i know there's stuff for predicting existing paths and collision time etc

#

so that'll probably be the main workload

#

so the cost will be during pathfinding, which is fine in my case

#

then some simple movement handling for when roads are too crowded etc

celest python
#

It might be nice if it was multithreaded

#

Could lower the overhead almost for free

misty gale
#

yeah that'd help a ton

tardy talon
# pine steeple easy to use once you learn them

Just seems so much more effort and you gotta learn what dexorators and service and blackboard Keys and when I want to communicatie with the BT I need to set up a key, then referenxe that key in another blueprint to then implement it in my BT it seems so much to try and connect to eachother

#

But yeah should get easier with practise

worthy python
#

Hello. Where can I find an example of this visibility algorithm? I want separate the safe and danger zones.

celest python
ocean wren
#

RVO was an academic paper called Reciprocal Velocity Obstacles for Real-Time Multi-Agent navigation by Jur Van Den Berg: https://gamma.cs.unc.edu/RVO/

#

and the associated library

#

from back in 2008, so there's likely a ton of better approaches now

#

I'm not a huge fan of RVO's πŸ™‚

#

just feels wrong to treat paths as geometric constraints to me

celest python
#

It's too aggressive and dominant over the movement component

#

Pawns literally slide

#

And somehow they manage to slide towards back

misty gale
#

I wonder what AutoStore ℒ️ uses for their pathing for robots in the warehouse

#

probably some simplified stuff since its really just a 2d grid

#

Along with a relatively limited amount of agents

ocean wren
# celest python I did not like it either

I don't think the sliding is the main problem, its more that there's no giving way to other people are any of that social stuff we tend to do unless there's a huge crowd

#

humans are surprisingly pliable πŸ™‚

#

RVO's are just too rigid

mossy nexus
celest python
#

lmao πŸ˜„

celest python
ocean wren
#

You can cover sliding by having foot placement take care of it..

#

its only a problem because the sliding isn't natural

#

people don't slide left/right, but they could step left or right and it'll look better

celest python
#

But shouldnt it accelerate towards to somewhere instead of sliding at the first place? πŸ€”

#

Sliding towards right-front or left-back for example is okay but it looks like they directly slide to right and left

#

Which makes it even more un-natural

ocean wren
#

Well, sliding is just moving away isn't it.. you can cover that in the animation system

#

but yeah, the main issue is just that people wouldn't do it anyway

#

they'd avoid any of that in the first place if they could

#

it looks weird because its got rigid colliders

celest python
#

That's a "maybe" for my project 😦 I have ~100 of pawns running around and most of the optimization comes from reducing anim BP complexity and movement component

ocean wren
#

I'm sure if you switched the rigid bodies off even that RVO would look better

mossy nexus
celest python
#

My only concern is we wont be able to guarantee it's going to work on other platforms so if something goes wrong I wont be able to fix it by myself and my friend helping me doesnt have a UE background at all to fix things

tardy talon
#

^what that guy said

tranquil robin
#

So I have AIMoveTo and it seems to work sort of but it doesn't quite arrive at the target actor I set to it move to( Which has no collisions). But depending the direction where it aproachs, the movement always stops slightly before getting there. Think of if the target object goal would be a center of the clock, instead of navigating to the absolute middle, the AI stops at the number circle, it just falls shot. Not sure where to control it so that I would go exactly the middle all the time

silent ivy
#

Join the Discord if you have questions πŸ™‚

uncut python
#

Woah

silent ivy
#

Ahh i feel it, good luck with whatever you're working on!

mossy nexus
ocean wren
#

"Blueprints" and "advanced" don't go together πŸ™‚

fiery skiff
#

How do I get input info from an AI? I'm trying to get my turn in place animation to run by using Get Turn but it doesnt work on an AI because there is no data coming from the source that Get Turn reads from

pine steeple
#

75 blueprints though

#

maybe someone should re-write those blueprints into fast functioning c++

cobalt palm
#

Hello, I have an AI that moves to a spot in line, however if an AI leaves the line it tells all the AI that are either in line/moving to the line to stop their movement and MoveTo an updated spot in line.

However, what I have found is that the AI will move to the spot they are told to move to, then they move to the old spot they were originally going.

I used the Stop Active Movement function but am realizing that it doesnt make the AI forget about the orignal location but rather just stops the AI for a split second. Is there a way to have the ai stop doing the MoveTo function?

#

Ive also tried the StopMovement function via the AI controller but that did not work.

mossy nexus
#

you need some sort of manager to tell the AI to move to the next spot when one opens up

cobalt palm
mossy nexus
#

sounds like you need to check your logic then

#

to me this looks like you're not changing the target

cobalt palm
#

I know the stop movement is working as I can see the AI stop for a split second, however I need it to abort moving to that spot and instead move to the new one. Its almost as if the AI MoveTo functions are stacking in their own queue.

mossy nexus
#

I don't know why you're using stop movement

#

just change the target moveto

#

you're trying to omit a bug instead of fixing it

#

or at least that's how it sounds

cobalt palm
#

It seems as though I used the normal MoveTo function. So I instead am using the AIMoveTo and it seems to have worked. Well see. Thanks though.

warped robin
#

Hello everyone! I'm working with BT's right now and I've put together a composite decorator, which seems really cool. BUT, Is there not a way to set an observer abort on a composite? you can do it internally but that doesn't work because I'm AND'ing conditions together, I only want to abort if both conditions are true (for example)

mossy nexus
mossy nexus
warped robin
#

noooooooooooo.gif

#

thank you though. I guess I'll make a copy and add that

mossy nexus
#

yeah

#

I was thinking the same

tranquil robin
# mossy nexus check collision view if something is blocking it. contrary to popular belief, co...

Thanks, there isn't anything else since it is in empty 3D space. The moving actor is just empty, as in there's no mesh or something that's corner could arrive to the end first and then technically register it there. The agent size is still at -1. On BT the move to radius is 5 but it fall sort more like 100-200 units. Maybe it is just some sort of local space world space issue, gonna look into that next

tranquil robin
#

this area nav mesh has no collision

mossy nexus
#

what do you mean no collision?

tranquil robin
#

maybe i answered wrong question... i have built the data for navigation and this area has no visualized data that would make the AI stop or go around it

celest python
#

Also check visual logger

viscid oasis
#

Anyway to vary up the MoveTo for AI? They're followeing the exact same path and I'd like to add some variety.

celest python
#

Try RVO avoidance and adding offsets to target goal

viscid oasis
#

okay, I'll look into that. Thanks @celest python

tranquil robin
#

I have empty actor as target to fly to, and another empty actor as AI flying there, and still the AI doesn't reach the position of the target actor. Is it possible that the movement stops just because their bounding boxes are toucing? Even though there's nothing inside with bounds preview I still see blue cube and yellow sphere on both actors, and visually it would make about the distance where the stopping happens

viscid oasis
#

Sounds like it. What's the acceptance critiera?

lyric flint
#

I need my AI to be able to pathfind close to walls. There appears to be a hard cap on navmesh generation at like 35-40 units. My current solution is to scale everything up twice as big but even then, there's still a pretty big gap between the walls and navmesh

#

I have some smaller entities that I want to pathfind close to walls too, so this is a pretty frustrating limitation in UE4 and 5

#

Every item in the navmesh generation settings is minimized

#

problem solved, never seen this in my life but apparently it's automatically added and overwrites some of the settings you can enter in the project settings.

crimson galleon
lyric flint
#

@crimson galleon where?

tranquil robin
#

To be honest I don't even care about it flying to other actor location, that actor is there just to mark the spot since I don't know how on the blackboard keys I could define a world location. If I make a vector key with 0,0,0 the AI pawn just fly to seemingly random direction and never stops

#

Also I'm not calling AIMoveTo node manually, it just happens on the BT so it seems I don't have access to what the node would have on regular blueprint

viscid oasis
#

I'm referring to the AIMoveTo - but that doesn't seem to be the core issue you're having.

#

navmesh agent radius can be found via the CMC.

tranquil robin
#

The radius is at -1.. these are all defaults. I had it on bigger values before and originally thought that would be the culprit but no

viscid oasis
#

hmm sorry not sure

tranquil robin
#

Thanks anyways, I'll keep looking

ocean wren
#

Aren't you making a space sim? AIMoveTo doesn't work for agents that aren't on a navmesh

tranquil robin
#

I have 3D navmesh now

#

It works, circles around objects, or flies through (if not built into the data) but for some reason the movement to arrive at target always fails short from any direction

ocean wren
#

Usually, that's because it has a value on the movement to allow it to stop near something. On the regular AIMoveTo there's a value that is "how close do I need to get to be near it"

#

can't remember what the value is called in the task, but it should be obvious if you read the docs

tranquil robin
#

So on BT the acceptable radius is 0

ocean wren
#

You really don't want 0 btw.. have some small value but not 0

tranquil robin
#

It feels and looks like what you say is correct, I just can't find where it actually allows this result to happen. Yeah I have it at 5 now which is the default value, but same happens with 0

#

seems like it always falls short and visually it feels like it is pretty much the distance between as if bounding boxes of those empty actors were touching, could be coincidence

viscid oasis
#

hmm I had something similar ages ago. I'm trying to remember the situation. Basically the actor would detect how far away it was so it'd move closer It was outside the acceptance radius until it was close enough but it wasn't close enough to trigger the overlapping or whatever needed to return the MoveTo successfully, so it'd get caught in this loop.

#

It was a few years ago. Drove me nuts. I had to manually do the MoveTo and do a HitTrace on it (or something like that) .