#gameplay-ai

1 messages · Page 153 of 1

misty wharf
#

so it could be replaced by some other system if it for some reason needed to be

mossy nexus
#

the way you're talking about programming seems more from the perspective of "if it isn't broke, don't fix it". but programming doesn't tell you when it breaks on a system wide level. it just slowly paints you into a corner

misty wharf
#

similarly the scoring is just determined by a function which currently just happens to do it based on looking at the ratio of successful tasks in the task manager, the implementation of that could be switched to do it based on something else

mossy nexus
#

anyway, I don't really have anything more to add to this conversation

#

I've said where you could improve

#

it's your project

misty wharf
#

I don't know, I'm trying to understand what you're saying but I just hear "do the same things but just don't do it in the behavior tree"

mossy nexus
#

you understand that you'll be doing the same things regardless because those are the things you want in your game yeah?

#

I can't change what things you want in your game

#

I can only talk about how you can improve your BT logic to get out of the issues that you're in

misty wharf
#

Yeah, but what I don't understand is how is using not-BT better when it does the same thing

mossy nexus
#

and if your response to that is "ok but it's the same except outside of BT" then what do you want me to say?

#

I gave you reasons for why it's better to have it outside of the BT

misty wharf
#

the only issue I was having was dealing with the conversation because I had the logic poorly written for it but that was easily fixed, otherwise there's no problems whatsoever with how it works

mossy nexus
#

well if it's fine then there's no problem

misty wharf
#

okay good, I was just getting confused because it sounded like I shouldn't be doing any of what I'm doing in the BT for some reason :D

#

I should note that I've been doing complex software stuff for like 20 years, I just haven't done complex gamedev so much... so I would hope that I'm not completely green when it comes to not writing garbage lol

mossy nexus
#

I mean you shouldnt

#

but if you want to and it works for you, go ahead

#

I'm just trying to tell you long term it might bite you in the behind

misty wharf
#

well let me ask you this... you suggested that it's a bad idea to have the BT choose when the task is finished?

mossy nexus
#

"don't fix it just because it isn't broke" doesn't apply to wicked problems, and system architecture definitely falls under that

mossy nexus
#

it's too ambiguous to say yes or no to

misty wharf
#

okay let me reread what you wrote about this and see if I can clarify or if it was just too contextual to what we talked about

#

well I guess it could've been, not sure :P

#

I guess the alternative to having a BT task which marks the task complete is to have the task define a function which checks the npc state to determine whether it's complete or not

#

but not really sure if it makes a big difference since the task logic is otherwise handled in the task-specific BT

mossy nexus
misty wharf
#

Oh, yeah

mossy nexus
#

I think what you're doing with the task system is essentially another type of BT. you're driving behavior through tasks, but then you also want to drive behavior through the BT

#

which again, could be a problem

misty wharf
#

Well, the tasks don't strictly require it to be a BT, I just find BT convenient so each task has its own BT

mossy nexus
#

what you could rephrase the tasks to be is some sort of needs, which would make your AI more utility based. you could then hook these needs into the BT, which is the equivalent of saying "OK, BT, here are the needs. how is the AI behaving?"

misty wharf
#

it sort of is like that, it's just that each "need" is represented by a task

mossy nexus
#

whereas right now you have two disparate voices asking "task manager, how is the AI behaving?" and "BT, how is the AI behaving?"

misty wharf
#

well if you have a "need" to rent a video and buy a soda bottle, how's that different from having a task to rent a video and a task to buy a soda bottle?

mossy nexus
#

and a task doesn't need a BT to drive logic

mossy nexus
#

a need can compromise, a task can't

misty wharf
#

well if you have a need to rent a video, wouldn't it be satisfied once you rent a video, thus it "completes"

mossy nexus
#

nope

#

that would make it a task

#

the need gets satisfied somewhat, but maybe it's not enough satisfaction

misty wharf
#

"enough"?

mossy nexus
#

maybe there is a greater or lesser need to watch videos

#

so maybe a greater need rents more videos than a lesser need

#

or more soda, candy etc.

#

maybe picking up a candybar only satisfies a need partially

misty wharf
#

Right, so at that point you'd just rent two videos instead of one

#

until the need completes :P

mossy nexus
#

the need doesn't complete

#

and that's kind of the point

#

it's not a task

#

you don't complete it

misty wharf
#

well once you have fully satisfied the need then what happens?

mossy nexus
#

take the opposite example

#

what if the video an AI wants to rent isn't there

#

the task would fail

#

the need would compromise

misty wharf
#

compromise?

mossy nexus
#

so maybe if they can't find the video they are after, they would look for something different

#

just like real people would

#

that's really the backbone of how behaviors work

#

instead of being like "TASK FAILED: VIDEO NOT FOUND. EXITING STORE"

#

beep boop

misty wharf
#

Well we have a system for that actually :) If it can't find the one they wanted they come to the counter to ask where it is

mossy nexus
#

... right, so you built another system for something that could easily be handled by the behavior tree

#

again you seem convinced your way is correct

misty wharf
#

Because this is actually desirable as additional tasks for the player

mossy nexus
#

so I'm kind of done with this conversation

misty wharf
#

The player needs to do things to help the customer, and it adds additional options such as ordering the video the customer wanted, etc.

#

I'm not convinced my system is the best implementation of the thing, but there's just a bit more to it than just whether it uses tasks or needs or what

uncut python
#

@mossy nexus

#

it works exactly how i want it to lol

#

nav link proxy

#

i can use those to create a flow map

#

i can get the length of each add it up and use that as my movement rate

#

i just need to put it all in a bp where it gets the area of the location im in and fills the room i place it in

#

and i could prolly just manually change the flow direction of each arrow if i have to

mossy nexus
mossy nexus
uncut python
#

im trying to figure out how i can set the location for each point, this is really all i could find so far was an array containign the links

mossy nexus
#

I think you might be getting swayed by the visual representation. But I don't think that a navlink is what you are looking for

uncut python
#

possibly but i might experiment just a bit more

#

but ur probably right, its a bit unconventional

mossy nexus
#

well unconventional or not, I think you should try and create a specification for what you want your system to do

#

and then possible work on creating a subsystem that can help you create that

#

but that's in cpp

uncut python
#

i think your right, what im looking to do is something for cpp

#

its out of the scope of what the nav mesh was intended to do

mossy nexus
#

well figure out what you need to create first then see how you can implement

#

who will use this system? for what reason?

#

is there any point beyond just showing progress?

uncut python
#

Well if I could combine progress and navmesh into one that’d be nice, but it could be serperate systems

#

Tho with further thought Idk why I just don’t use my idea and instead do it with collision boxes

#

I’m not too confident with c++

uncut python
celest python
misty wharf
# mossy nexus I dunno, you seem quite set on keeping it as it is. what you're doing is not a m...

Well I'm not so set on it, just that when you suggest doing it in different ways, there's usually a reason why it does things in a certain way as a result of how the game is designed to work, and not just because I happen to like the program architecture :) I like using BT's because they're a system which is very easy to change unlike some other solutions, and since the game is still in fairly early stages it changes all the time... for example the task management aspect was non-existent before which made it hard to add the features I wanted, so I introduced those as separate components into the system.

celest python
mossy nexus
celest python
#

It was a pita to manage the states and task running but worth it xD

misty wharf
#

Sure, it doesn't dictate the technical implementation, but if you want your guy to jump in a certain way, there's usually several ways to code it and only some of them are suitable for your specific design

#

It doesn't mean the other ways are invalid, they might be better suited for a game where the guy jumps in some other way

mossy nexus
#

anyway I keep getting dragged into this

misty wharf
#

Well to continue with the jump analogy, if you want your game to have a realistic physics based jump, your implementation has to be different than if you want your game to have a less realistic mario jump or something :P

#

There is no one size fits all solution to software design

mossy nexus
#

it doesn't dictate that you have to use physics though, even if the end goal is a "realistic" jump. you're conflating technical implementation with design

misty wharf
#

Correct, but using a physics engine for the jump is more likely to be a valid approach if you want a realistic jump vs unrealistic jump

mossy nexus
#

I disagree

#

it's a very tunnel vision kind of thinking

misty wharf
#

I'm pretty sure that you'd have to fight the physics engine more for the unrealistic jump

mossy nexus
#

it has to be realistic therefore only real physics will make it so

misty wharf
#

I'm not saying you have to use physics for a realistic jump, I'm just saying it's more likely to be a valid alternative implementation for it, and less likely to be a valid alternative for it if you don't want it to be realistic

mossy nexus
#

again, disagree

#

that's conflating design with technical implementation

#

which is an easy way to paint yourself into a corner

#

because you only see one option as the "correct" option

misty wharf
#

Well if I want my game to work in a certain manner I surely cannot implement systems that do completely different things :P

mossy nexus
#

you can do things in a myriad of ways that lets the design work as the design should and keeps it separate from the technical implementation

#

but everything I've seen so far has kept the design and technical implementation highly coupled. which means if some of the design changes, so will the technical implementation have to change

misty wharf
#

Yes, but certain designs are easier to implement in certain ways

mossy nexus
#

this is exactly what you dont want in software development

misty wharf
#

I don't have a crystal ball so I can't predict what my game will look like in the future

#

So I don't really feel like spending a lot of time building systems that I think I might need, and instead I build a system which is easy to change

mossy nexus
#

no but you have the ability to think about low coupling so you can switch out your architecture easily whenever a new design decision has to be made. game development by and large is predicated on this since sometimes big changes come late, as much as everyone tries to avoid it

misty wharf
#

Yeah it's all pretty lightly coupled

mossy nexus
#

but it isn't

#

your entire implementation is based directly of how you have designed your game

misty wharf
#

I could throw away the BT and replace it with something else probably in a day

mossy nexus
#

so you can't have that, having shown your system, and then also say your system is lightly coupled

#

because it isn't

#

it's directly tied to your design decisions

#

and the fact that you wanted the easy route out when you first started designing

#

In planning and policy, a wicked problem is a problem that is difficult or impossible to solve because of incomplete, contradictory, and changing requirements that are often difficult to recognize. It refers to an idea or problem that cannot be fixed, where there is no single solution to the problem; and "wicked" denotes resistance to resolution...

#

this is what game development is

misty wharf
#

This seems to describe software development in general

#

I'm not quite sure how you imagine my BT is coupled, but all it is is a layer which calls functions on my characters

mossy nexus
#

it doesn't describe software development, it describes spec that needs to be implemented

misty wharf
#

so if I wanted to use some other system to run the AI, it's just a question of having that other system call the functions on my characters :P

mossy nexus
#

yes but your BT is still carrying all the heavy loading, including conversations, animations, player choices and even player rewards. that's not low coupling. that means if you threw away the BT you'd have to implement 2-4 systems to take over for it

misty wharf
#

No, all it does is it acts as a "player" for the npc

mossy nexus
#

and even then you talked about having a task manager on the side, that feeds into the BT (so you have 2 drivers for AI behavior), and some auxiliary systems on the side to kind of make those work together

#

I mean

#

you can't call this lightly coupled

#

by any stretch

#

not unless you're lying to yourself

misty wharf
#

well if it was using some other system then that other system is going to be equally coupled

#

all you're doing is moving the coupling somewhere else

mossy nexus
#

no it wouldn't lol

#

that's the whole point

#

you really do have tunnel vision

misty wharf
#

well if object A calls a function on my character, A is now coupled to the character

#

if I move that logic into object B... now object B is coupled to the character

#

how is this any different from what you're suggesting?

mossy nexus
#

you're making a simple strawman. you're not seeing the bigger picture of your systems all having to have workarounds to work together

#

if you can't see that yourself then I can't explain it to you either

#

which is why I wanted to end this conversation in the first place

misty wharf
#

I really don't know why you think you know how my system is designed based on a couple of pictures of behavior trees and a description of there being a "task manager"

mossy nexus
#

because it just keeps going in circles

#

and you keep talking about "well if it's not this system, it would be replaced by another system". not seeing that the initial idea of using that system in the first place was unnecessary

mossy nexus
#

it isn't

misty wharf
#

never said it was ¯_(ツ)_/¯

misty wharf
#

but you make a lot of assumptions about how it works without actually knowing how it works

mossy nexus
#

I haven't seen your game systems as a whole, but I've already seen plenty of red flags

#

and honestly I'm not really interested in keeping this conversation going

misty wharf
#

I don't really know what the red flag is because all you've said is that I should use a needs based system because it works better for a game that isn't my game

#

which in itself is an interesting idea but it's not really how the game works

mossy nexus
misty wharf
#

I have just one :P

mossy nexus
#

task manager

#

behavior tree

#

"just one"

misty wharf
#

all the task manager does is hold a bunch of info the BT uses..

#

it doesn't make any decisions on its own about what the AI should be doing

#

this is what I mean when I say you keep making assumptions about how it works :P

mossy nexus
#

that's already making decisions

#

so I don't know

#

seems like there's either some inconsistencies in what you're telling me, or your systems are inconsistent

#

I'll leave you with that

misty wharf
#

No I said the ai is given a set of tasks when it's spawned

#

which are just used by the BT to decide what to do

ocean wren
#

evening

winged grail
#

Does anyone know how to change the AI controller being used by an existing pawn after runtime? Do I just change the AI Controller class or do I need to use a "Spawn Actor of Class" node and spawn the AI Controller then possess the desired pawn with it, or do I need to do both?

ocean wren
#

Pretty much as I understand it yeah

winged grail
ocean wren
#

If you want to swap from one to the other, you'd have to disposess the first controller from the AI, then spawn a new AIController derived instance, call posess on the new one with the actor, then delete the old AIController

winged grail
#

Ah thank you! I hadn't even thought about needing to depossess the first one and delete it.

ocean wren
#

Yeah, the posess/unposess methods are there for swapping the controller

mossy nexus
#

if you possess another pawn does it not automatically unpossess the first?

cerulean girder
#

i managed to figure out my EQS issues, turned out that it was just a mix of lack of decent info on it and some items very poorly explained. if anyone is wondering you can make context out of any blackboard key in a custom context by accessing the queriers blackboard and pulling it from the blackboard as a literal name...also, something thats not explained at all becuase i guess they assume it would be obvious...player characters cant run eqs queries...the EQS requires an ai brain that can process the nav mesh...

uncut rune
#

Has anybody used UEnvQueryItemType_Point for a custom context before? I'm passing in a vector into the SetContextHelper but the cone generator is never generating any points for it and my RunEQSQuery node is failing in the behavior tree. Does the location that you give it have to be on the navmesh for it to work?

uncut rune
#

Yeah, I just ended up creating a dummy actor and just used UEnvQueryItemType_Actor instead for the context. Im not sure how we are supposed to use UEnvQueryItemType_Point tho. There is literally zero example usage of this anywhere online. Im assuming that the point you pass has to be on the navmesh or else it won't work? idk

cobalt palm
#

This did not end up working. The problem I am having is that I want to loop a sequence until 2 blackboard keys are of equal indexes. Once equal, I want it to break out of the sequence and go on to the next node.

pine steeple
#

why is it not working?

#

if you want it to run the next sequence, you need a a ForceSuccess node

cobalt palm
#

. . .

#

wait a second

#

This is how I have it set up currently and the first sequence works fine until the 2 blackboard keys are the same, it just keeps doing it and not breaking out and going to the BTTask_FindRegister node.

#

I think I got it. Ill have to change the code tomorrow however as it might take me a good minute to work properly.

quick sluice
#

Hello. I'm using a navmesh to navigate. Now I have a couple of moving actors (boats) and they have a box collider set to dynamic obstacle. Now I got this to work, the navmesh is rebuilding. But now I need the boats to ignore their own collider. Does anybody know how to do that?

crimson galleon
quick sluice
#

Let's say we have these 3 boats. The red area is the dynamic obstacle area. When I calculate a path it ignores the red area, but it also ignores it's own area. So it can't find a path because the box collider on the boat is blocking the boat's own path.

crimson galleon
quick sluice
#

It was from a tutorial I did.

crimson galleon
quick sluice
#

Followed

#

I'm not that experienced in UE yet to make my own haha

#

Ok now I have this.

#

The capsule collider was to recognize when the boat hit a waypoint

#

But now I do it with the new box collider

crimson galleon
#

so what part of this is the tutorial?

quick sluice
#

The tutorial used a static navmesh. Now I changed it to dynamic and I'm rebuilding the path every 0,25 seconds

crimson galleon
#

and this is so boats dont collide with each but avoid?

quick sluice
#

Yes

#

They ignore the red area, but they also ignore their own red area.

crimson galleon
#

so if you disable the colliders from influencing the navmesh, they can navigate just fine?

quick sluice
#

yes

#

but they collide

#

because they don't ignore eachother, that's what I'm trying to accomplish

crimson galleon
#

yeah, thats a tall order to me, maybe someone more versed in navmesh code can help. I use the RVO avoidance but that lives on pawns, and even then, the movement gets funky

#

there's not too much bp/surface level stuff to do with navmesh unfortunately, even less so with realtime. Would need to dive into the navmesh code and make custom searches.

quick sluice
#

Yeah I looked into RVO, but I can't use that. I use steering forces behavior to make the boats turn slowly towards the next waypoint,

#

So I calculate waypoints

#

(or the tutorial did)

#

Thanks for you help though

crimson galleon
#

depending on the number of boats, an actor EQS query could help decide movement, otherwise maybe a line or sphere trace as a sort of awareness in front of the boat to know if a collision may happen

quick sluice
#

Yeah I was thinking of doing that and I'm still going to implement something like that. But I think I can do that after I get basic pathing to work. Otherwise they are a bit dumb, what if there are 10 boats in a corner, the boats get stuck then.

#

I just have to find out how to avoid a collision with their own collider. I think the UE guys have thought about that as well, I just have to find out how 😉

#

Thanks again! I'll keep googling

autumn ibex
#

does anyone know if this is an expensive function? I'm calling it every 0.1 seconds

crimson galleon
#

alright, and again, EQS seems the most viable

quick sluice
#

EQS?

crimson galleon
#

look it up 🙂

quick sluice
#

Will do, thanks a lot!

urban wadi
#

anyone here that knows a little bit about animations blueprints

cursive oxide
#

Ya a little bit

urban wadi
#

Is there a way to have a master blueprint anim that sole purpose is for storing shared variables that i can share with all the other anim blueprints from the AI in my game?

cursive oxide
urban wadi
#

yeah nevermind i will change channels

cursive oxide
#

Sure

quick sluice
#

Hello! Still struggling with the NavMesh, maybe somebody has the Holy Grail today. As you can see there are three actors. They are the same actor. They have a collision box which is set as dynamic obstacle. Now when I hit play, there is only one actor which is updating the NavMesh. The other is not doing anything at all, and the other other is doing it at start and is then not doing anything to the NavMesh. Is there a NavMesh expert in the house or somebody who has a clever idea how to find out what's going wrong?

#

Actually I have no clue what's happening here and why it's not working. They are the same actors not doing the same thing.

cold trout
quick sluice
#

The box collision is a component from the static mesh

#

It doesn't matter how high I place them. (I think I copied them with the alt key) always only 1 boat is updating the navmesh

#

Yeah if I read my own post there is something really buggy going on here.

cold trout
#

you can make them visible during the game as well (SetHiddenInGame=false), thus you can see if they happened to have been moved somewhere odd

quick sluice
#

Maybe I should create a new navmesh

#

going to try that first

#

Nope not working 😦 It just updates one ship

misty gale
#

Have you played around with collision settings ?

#

on the instances ?

quick sluice
#

No it's set to OverlapAllDynamic I'll try to change that, thanks

#

Also thanks to SoakingRich btw

#

I appreciate the help

misty gale
#

you were using dynamic nav mesh with nav invokers?

quick sluice
#

Nope without invokers Just a dynamic mesh

#

I just tried adding invokers but the problem persists

misty gale
#

yeap, im having the same issue

#

the pawn doesnt update it

#

while the actors do

#

which is odd, since collision is set up the same way

#

but i guess you're not using character class?

#

adding a sphere to it solves it in my test scenario...

#

as long as original capsule is marked as dynamic obstacle

#

removing the sphere, removes the updating...

#

adding it, makes it work again....

#

Hmm

#

testing further it seems its the capsule collision volume that's struggling. Here with the same setup as the sphere collision, but as a capsule;

#

it now updates (which default capsule does not), but doesnt apply the modifier data ..

#

@quick sluice

quick sluice
#

Wow awesome. So I guess we ran into an engine bug?

#

Thanks so much

#

I thought I was going nuts

misty gale
#

possibly

#

what collision volume are you using anyways?

quick sluice
#

What version of the engine are you?

#

I'm using a box collider

misty gale
#

4.27.1

#

using box collider seem to work as it should

quick sluice
#

Yeah me too. I'll try to switch to 4.27 or older when I'm back at my pc

#

Hmm did you still have the sphere attached?

misty gale
#

No, i removed the sphere

quick sluice
#

Does it also work when moving?

misty gale
#

yeah , this is during movement (paused)

quick sluice
#

Ah then it must be my bad

misty gale
quick sluice
#

Can't test right now

misty gale
#

default settings except marked it as a Dynamic Obstacle

quick sluice
#

Hmm I m thinking about restarting my project. I just can't get it to work with the exact same settings

misty gale
#

im using default navmeshbounds volume, if that matters

quick sluice
#

Me too

simple crest
#

Why are you guys doing this?

quick sluice
#

What do you mean?

simple crest
#

You're getting pawns to cut out the navmesh around them as they use it to move?

quick sluice
#

Not pawns, actors

#

But yes

simple crest
#

Wait then what are these moving things? Are they like dynamic obstacles that move around on a fixed path?

worthy python
#

Hello! Anyone know How can I detect edges of the cover mesh (walls and similar objects)?

quick sluice
#

I'm really new to using navmeshes

#

So if I'm doing it wrong please tell me xD

misty gale
quick sluice
#

yup

misty gale
#

I just had some barrell actors laying around 😂

simple crest
#

I mean you're giving conflicting info, looking up higher you're talking about pathing the ships. You can't cut out the navmesh for this as you've already discovered, build your own proper vector field/force based avoidance system if RVO and crowd avoidance both can't do what you want

misty gale
#

I think the issue is getting the navmesh to update in the first place

simple crest
#

No the issue is even trying to update the nav mesh

#

It's a naive broken idea

misty wharf
#

I feel like I said this before, your thing which uses the navmesh to navigate cannot itself modify its own navmesh

simple crest
#

You're going to just spend all your cpu updating the mesh all game and constantly break pathing

misty gale
#

Thats true ^

quick sluice
#

Thanks for helping me out @misty gale

misty wharf
#

Yeah it does take a moment for it to recalculate it even with a smaller navmesh

quick sluice
#

I'll have to dive deeper into this because yeah I'm really new to this

misty gale
#

Yeah i noticed early in the pathfinding quest how slownit was

#

Makes sense tho, tons of updating to do , all the time

simple crest
#

With boats doing steering as well, you're trying to solve a nontrivial problem, I don't have an easy answer otherwise

#

So expect to put some time in here

misty gale
#

Custom logic for reaching path location

quick sluice
#

I have implementing steering forces on the boats

misty gale
#

Not using simple move to

quick sluice
#

I don't use moveto

#

I use find path synchronicly

misty gale
#

Expected as much

quick sluice
#

But yeah I'll have to dive deeper into this the upcoming weeks.

#

Thanks all for giving me a direction

misty gale
#

Im gonna need some custom logic for the pathing etc aswell,

#

Many routes to consider when it comes to avoidance etc

quick sluice
#

Yup

misty gale
#

Especially when you increase the number of ai to rts /city builder standards

quick sluice
#

I was just planning to having boats. But yeah it's not a very solid idea

#

I had to implement a lot of "hacks" to get it to work

#

I stored HoJo's comment to check it out tomorrow

#

But very awesome you were helping me Squize! It made HoJo make that correcting comment xD

misty gale
#

No worries 😛

barren jewel
#

Anyone know why an AI move would work on static mesh but not on a landscape? My AI moves fine when it's on a static mesh but stops when it's landscape, even though the navmesh is set up

barren jewel
#

Nvm deleting the nav meshes and re-doing it fixed

quick sluice
#

Good morning! Here I am again with yet another question. I rebuilt my project this night and am now using Pawns for the ships. I use a simple AIMoveTo function to try to get those ships to move to a random location. The function returns success but my boats aren't moving. I added a FLoating Movement Component and increased it's speed but the boats are not doing a thing. Anybody got an idea?

#

This is the blueprint I'm using.

misty gale
#

Mornings! hehe. Is it reporting failed?

quick sluice
#

Nope

#

It should work, but the boats just won't move

misty gale
#

so its printing success?

quick sluice
#

Yes

misty gale
#

and there is an AI controller for the pawn?

quick sluice
#

Yup, just the default one

#

I'm trying to no do hacky things this time

#

So I want to keep it as simple as possible for now

#

These are the Pawn settings

misty gale
#

You cant use AI move to for a ship to turn nicely,

#

so not sure i'd call it hacky 😛

#

Auto possess spawned and placed in world

quick sluice
#

No I know, but for now it's good if it even moves

quick sluice
#

Do you know any way to debug this? I read something about the VisLog

misty gale
#

Sadly no,

#

i do all my movement customly

#

cba having issues or being limited by simple move to 😛

quick sluice
#

Ah yeah in the end I'll have that too. Just want to try RVO and Crowd controll first this time

#

Yup

misty gale
#

gonna do some custom logic on that aswell in the end, gotta keep the cost to a minimum

quick sluice
#

Yeah

misty gale
#

try to get random point in reachable radius ?

#

altho.. if its not reachable, i'd think the task would fail

#

so its prob not that

quick sluice
#

Yeah I spawned actors on the locations, they were spawning fine. I also branched that boolean it returns and it returns success

#

true

#

I think the ships want to move, but the speed is very low or something

misty gale
#

surely you've activated the nav movement?

quick sluice
#

This is mine

misty gale
#

check if your pawn is flying

quick sluice
#

How do I check that?

#

It's a boat, so it's flying in the water. Or am I being stupid again?

misty gale
#

there's a node

#

is flying

#

from the floating pawn component

quick sluice
#

No it's not

misty gale
#

So.. thats an issue i'd imagine 😛

quick sluice
#

Yeah I found it, it's not flying

#

So I disabled the check again

misty gale
#

check the others

#

and figure out what state its really in

quick sluice
#

Alright, will do that!

#

It's in none of the checkable states

#

I couldn't find the isWalking node

#

But I unchecked every box. Is that a good thing?

misty gale
#

is moving on ground == walking

#

no,they should be checked,

#

but i'd imagine it must be in the right mode to move

#

so if its current mode is walking on ground, it must have the "can walk" checked

quick sluice
#

Ahh

misty gale
#

again i'd think the moveto would fail if current movement mode != capable mode, but idk

quick sluice
#

It's in none of the states

#

:/

misty gale
#

not sure what it takes to make it fly tbh

#

probably just some height above ground

quick sluice
#

Yeah, I think I'm going to dive into the Pawn docs.

#

First time using them you know

misty gale
#

on my end its instantly working..

quick sluice
#

Oh man

#

This again

#

xD

#

Let me go back to the cube model

#

instead of my beat

#

boat

#

maybe it's the mesh

#

Nope it's not the mesh

#

I bet it's some checkbox I missed, it always is

misty gale
#

i did nothing to the floating movement component

#

just added it

#

changed 0 settings

#

went straight from pawn, no changes

quick sluice
#

Thanks it's useful information, but I'm going nuts

#

Maybe I should step back and try again later.

#

Been way to long on this again.

#

Gonna make some islands or something 😛

#

Thanks for helping me out man, one day I will get it right.

misty gale
#

Wasnt much help but sure, np ^^

#

yeah you will

quick sluice
#

Learning something new everyday

#

Was diving in Behavior Trees, EQS, decorators, services this morning

#

It overwhelmed me

misty gale
#

EQS, havnt even touched that

#

not sure i want to

quick sluice
#

Why not?

misty gale
#

It's just a lot 😛

#

to many things on the study list already

quick sluice
#

Yeah everytime I think I've got this beast of an Engine under control there pops stuff up which will cost me weeks

misty gale
#

yeah exactly

#

surely the current project is gonna give me some real curveballs very soon

#

so a lot of time is gonna go into that pit x)

quick sluice
#

Ah, what are you making?

misty gale
#

some city builder game

#

tons of AI in it

quick sluice
#

Wow, yeah I can imagine

#

I always dive in before reading.

#

and hitting the wall i yesterday had xD

misty gale
#

I wont lie, i tend to dive first aswell

#

i've probably not layed out the scope of the game properly yet either, so thats definetly gonna bite me sooner or later

#

probably later, after some overengineered stuff has been made

pine steeple
#

i eqs all the things

#

i think we have around 35 eqs queries in the project

quick sluice
pine steeple
#

steering?

quick sluice
#

EQS queries are going to hit me in the upcoming months

pine steeple
#

you doing vehicles?

quick sluice
#

Ships

pine steeple
#

you dont want to path find

#

well you do, but you want to make a spline

#

so you can create curves

#

between points

quick sluice
#

Yeah I had that covered

#

It steered smooth

#

but everything else was going wrong

pine steeple
#

:/

#

i only done bipedal and monsters for AI

misty gale
#

As long as you can find a path tho, the rest is just ... well, steering

quick sluice
#

Yup

misty gale
#

you barely have to be on the nav mesh to get a resulting path

pine steeple
#

custom movement component could handle that tho

misty gale
#

and as for boats, everything is realllly just a 2d location

pine steeple
#

as path following just sends the acceleration into the movement component

quick sluice
#

Yeah, but boats have to avoid eachother

#

and that made it a lot more difficult

#

I should have made a behavior tree

#

But before yesterday I didn't even knew what that was

misty gale
#

depending on the amount of boats, avoidance shouldnt be impossible to handle with custom code

quick sluice
#

This time I will first do the UE way or at least try it, then making custom code

#

I know there has to be a lot eventually

#

But I can;t even get this simple move to thing working

#

So I have to dedicate that first

#

to *

#

ANd then the RVO, then the Chrowd Control or something HoJo was pointing at

misty gale
#

Start with a new project, simple landscape, and go from there

quick sluice
#

Did that tonight

pine steeple
#

i would personally use boid type avoidance tho

#

rvo is kinda similar to that

quick sluice
#

And again a new term

#

I have to look it up,

#

boid type avoidance

pine steeple
#

beat me to it

quick sluice
#

The steering was doing fine

misty gale
#

I'd say start with the simple stuff

#

general pathing, steering etc

#

avoidance can be added later on

quick sluice
#

Yeah I did not have that implementing

#

I had smooth steering

#

the first tutoriall

#

Which worked, it was still a bit buggy

#

but it looked quite good

#

But now I'm dedicated in understanding the basics first

#

before doing custom shit

misty gale
#

Taking it in small steps at the time helps with motivation aswell 🙂 seeing progress, if ever so slight

quick sluice
#

Yes

#

But that progress is nonexistent when MoveTo doesnt even work ;D

misty gale
#

finally got my movement to work as i wanted it to, after way to much time spent on it 😄

#

Again, why i dont use moveto xD

quick sluice
#

😄 yeah it's undebuggable

#

but I read good things about the vislog

#

So planning on diving in that rabbit hole today

#

But still, with all this failure

#

I'm loving Unreal

#

It's awesome

misty gale
quick sluice
#

Good work!

misty gale
#

Thanks 😛 Alot more work ahead tho. I cant even imagine doing collision/avoidance on this yet

#

gonna need some optimized methods for it

#

currently bp only as im just iterating. Maybe this time ill take the step and move it into c++ after a while

quick sluice
#

Can't help you with that unfortunately but if I can I will!

#

Why to c++?

misty gale
#

performance

quick sluice
#

Ah

misty gale
#

currently 800 pathfollowers cost me about 3 ms (rendering mostly),

quick sluice
#

I don't know if that's much

misty gale
#

Adding collision directly takes it to a stall pretty fast

#

this was with default collision

quick sluice
#

Ah yeah

misty gale
#

not good at all

quick sluice
#

Nope at least it's linear and not exponential xD

#

Tell me if it's stupid what I said. But could imagine that stalling higher

misty gale
#

Not sure what you mean

#

did you expect it to handle that amount of pawns better?

#

or worse

#

cus this is very bad 😛

quick sluice
#

I didn't expect anything because I simply don't know. But your graph is a linear graph, it could also be exponantial

#

that would suck a lot harder

misty gale
#

my logic is self limiting to some degree tho

quick sluice
#

but yeah going into the reds isn't a good sign

misty gale
#

lower framerate means less AI's processed

quick sluice
#

Ah that's a neat solution

misty gale
#

well.... maybe? xD

#

then again, if anyone is at > 33ms it'll reach unplayable very fast, so i guess it doesnt matter much

#

so wether it then can handle maxpawns or not doesnt matter to much

#

Every pathrequest is also serialized, so i can easily control how much processing i can spare for the AI

quick sluice
#

Ah you're storing old paths

#

for reuse?

misty gale
#

No, but they're all funnelled into the manager, which returns a path to them

#

so i dont have 800 actors requesting paths at the same time , synchronized

#

So whenever they wanna go somewhere (random for testing ), they request a path

quick sluice
#

Ah that's very clever

misty gale
#

which is added to a map in the manager

#

which in turn, after some checks and adjustments, returns the path it found

#

Also found that forwarding the tick to the actors are cheaper than enabling tick on them, so im currently doing that too

quick sluice
#

Ah nice!

misty gale
#

Feels a bit messy, but we'll see how it goes down the road

quick sluice
#

You can refactor later right

misty gale
#

i could also let the manager do all the movement aswell, but that feels even worse

quick sluice
#

Hehe, I wish I could give you solid advice mate

misty gale
#

no worries, paying attention to performance as i move along and do necessary adjustments

#

refactoring when needed, yes ^^

quick sluice
#

Yup

#

It's already quite impressive to me what you did

#

I hope to be there over a couple of weeks, months even 😛

misty gale
#

slow and steady is my strategy 😛

quick sluice
#

Yup!

worthy python
#

Hello! Anyone know How to detect edges of the cover meshes simple?

mossy nexus
#

no, complex

worthy python
#

or complex

#

I need it to define the edge as accurately as possible for place for shooting (and cover animations), but I haven't found anything about how it's done in other games

mossy nexus
#

it's a very complex process

#

especially if done by automation

#

it's easier if you do markup

#

but then you have to manually do markup

#

which may be a lot of time wasted

worthy python
#

automation way uses ray tracing?

mossy nexus
#

ray tracing, navmesh, all kinds of things

#

unless you have strong experience with cpp I would not attempt it

worthy python
#

I trying to create automation system with tracing but it's hard to create something that will works with all types of objects (for example i need a different way to detect edge in cylinder and cube)

mossy nexus
#

and settle for markup instead

worthy python
#

Thank you. Can I ask about any documentation or materials that can help to understand me a general principle of complex way?

mossy nexus
#

there isn't any

#

at least that I know of

#

for full automation it's about determining direction and constant tracing once behind cover

#

in either case, if you don't have cpp experience anything but very simple manually placed markup will be very difficult to do

worthy python
#

I have a little cpp experience and big blueprint experience. What kind of things I need to know in cpp to create something that can work correctly?

mossy nexus
#

blueprint experience doesn't matter

#

but create actors of a type, shape them to be the size of the cover

#

then gather those actors and query for how close you are to the box extents of those actors

#

is a very basic way of doing markup

#

the actor can also have direction so you know which way the cover is facing

#

and of course that has to be done on all sides of the cover

worthy python
#

like this?

mossy nexus
#

yes but consider that you don't know if all those sides are viable in cover

worthy python
#

I compared direction to the enemy with arrows

#

this way got me a valid place

mossy nexus
#

yes it will generate direction

#

but what if the cover is too small?

#

what if there are multiple enemies?

mossy nexus
#

GB is a beast

celest python
#

Rather than mesh edges, you should try to detect navmesh edges

#

Because detecting mesh edges require CPU access ans its expensive

#

Also navmesh is more accurate

mossy nexus
#

in either case it requires cpp to do something proper like this

#

BP doesn't have this level of functionality exposed

#

so I'd say use the plugin if you can

celest python
#

Yeah, and not just C++, I guess you need something advanced level of C++

mossy nexus
#

exactly

worthy python
#

idk how to fix problem with multiple enemies. I can check their eyes with eqs test (can they see selected point or not)

worthy python
celest python
#

I saw this, not bad, but nowhere fancy as GB's system

#

GB's one has multhithreading and visibility options

#

For example AI will not try to get cover behind a glass of wall

worthy python
#

Can I use it if i'm cpp beginner? (I'm not about modify, use only)

celest python
#

Sure you can use it with BPs too

#

Just build the building, and implement it to your BT

worthy python
#

thank you for info

#

thanks to both of you yeee

ocean wren
#

For cover, you can get the edges of the navmesh if you're using CPP

#

and trace points along that

#

I did that for my cover generator

#

I'd advise a look at the cover system setup for CryEngine as a good starting point to be honest, I mostly did the same stuff but for UE

misty wharf
#

Ground Branch always makes me think of Ground Force lol

#

which was a garden makeover show on BBC

calm herald
#

@misty gale Could you elaborate on forwarding tick to actors?
How do you do it?

misty gale
#

It's probably as dumb as it sounds

#

the manager uses a dispatcher ran on tick

#

every AI that needs to move subscribes to this

calm herald
#

It's not dumb if it gives result 🙂

misty gale
calm herald
#

So you basically replace tick with the event dispatcher?

misty gale
#

yepp

misty wharf
#

That seems a bit pointless 🤔

misty gale
#

You would think so

calm herald
#

And how much is the performance benefit?

#

As opposed to using regular tick

misty wharf
#

Surely it's zero and possibly negative?

#

I wonder what's the point of this when the AI could instead just selectively enable or disable its own tick function?

misty gale
#

im setting up the test again just to verify (i did adjustments to the npc afterwards)

#

^thats exactly what i had first zomg

#

and i saw performance difference

misty wharf
#

That's strange :D

misty gale
#

on 800 actors, i saved 1 ms

magic jasper
#

Dynamic Delegates are slow as hell

#

Wouldn't use them for anything performance critical

misty gale
#

I'm not sure what to tell you beyond this test

misty wharf
#

1ms compared to what

misty gale
#

its not scientifically accurate

misty wharf
#

is it 17ms vs 18ms?

misty gale
#

yeah

misty wharf
#

feels like it could be a fluke tbh

#

Are all of the actors ticking in the slower example? Or just the ones which would be ticked by the event?

misty gale
#

just the ones that would be, but in the test it's all of them

#

but im turning it on and off as they reach their destination, yes

misty wharf
#

I mean if it's not even always the same amount of them which are concurrently ticking then I don't think you can really say anything from this result

#

10x the number of actors, you should get a 10x difference or at least higher than 1ms :D

misty gale
#

true

celest python
#

Calling a few dynamic delegates sometimes takes 1ms alone in my project 😢

#

(pro tip: never make your health components delegates dynamic) 😄

misty wharf
#

yeah as Jambax said the event dispatcher itself should already make it slower than regular tick which makes this a bit odd

celest python
#

BP tick is also very slow

misty wharf
#

All of my delegates are dynamic but pretty much all of them are only called on occasion

celest python
#

If this was tested with C++ tick vs Aggregated C++ tick difference could be huge

misty gale
#

there's a few other variables in this aswell, which is path length, as the location is random

#

dunno how much of a difference it makes but shouldnt be much in my guesstimate

misty wharf
#

Yeah tbh just the pathing and collision checks and such could easily factor into it

misty gale
#

there's no collision check

misty wharf
#

they have no colliders or it's disabled?

misty gale
#

none

#

Its just an ISM moving around

#

Actor Tick with 1600 Pathfollowers

#

vs forwarded tick

#

< 1ms

#

so the test is kinda invalid i guess? xD

#

it should've doubled

misty wharf
#

Yeah I think it's just some other thing based on that

misty gale
#

game went up by 2 ms tho

#

Spikes should be ignored due to screenshot

#

it was 2 ms difference in the first test with 800 ai aswell
2ms difference on game

#

Not really sure what this tells me. I think ill move along with the forwarded tick for now, its an easy swap later on if it were to cause trouble anyways

#

the print string up in the left is there to just confirm that we're at the same amount of pathfollowers (no que left)

#

this is also happening if i disable movement. Purely activating tick vs subscribing gives me a 2ms difference in game... no clue why. Not sure why it doesnt increase with npc amount either.. seems odd to me

mossy nexus
#

as in stat AI

#

or if it's not AI, then actor at least

misty gale
#

stat actor? (havnt profiled before)

mossy nexus
#

sure

misty gale
#

It doesnt show anything extra

#

stat uobject does give me a list

mossy nexus
#

I think the system is a step in the right direction, but instead of using delegates, one could try registering all actors to a director on beginplay, then use director's tick to loop through the list of registered actors and process them

#

that's very ECS like and avoids dynamic delegates

misty gale
#

For sure, i already have the list, so swapping to that method should be very little work

#

Didn't know delegates were considered slow

mossy nexus
#

everything is slow

#

cpu is only going brrr when there's nothing to do

misty gale
#

weird results again,

#

2 ms slower with direct update calls

#

probably due to bp array

misty gale
#

Is there a command for specific profiling of a single actor?

#

Seem i dont really need it, all my calls are from or related to the npc anyways

ocean wren
#

whuddup

#

anyone got any positive fun AI stuff to show? 🙂

misty wharf
#

FORCEINLINE bool IsSuccsessful() const { return Status == EEnvQueryStatus::Success; }

I was mildly amused by this typo in EQS code lol

ocean wren
#

So I've got this little demo to make. Basically using some sentiment analysis we did a few weeks back to drive some gameplay in UE for a chat-sentiment-based twitch livestream, anyone think of a cool idea for essentially positive-negative based AI action to portray on a twitch stream?

misty wharf
#

Scale the actor's head up or down lol

ocean wren
#

I was thinking of maybe making a simple crowd sim, where the positive-negative values for each chat stream will make a little crowd happier or angrier

#

oooh, yeah, that would work actually.. have a percentage chance of throwing a molotov cocktail 🙂 hahaha

misty wharf
#

the crowd thing seems like it has a lot of possibilities

#

I was playing this game called Anarcute recently which sorta does that, you control a crowd of cute animals who go rioting and destroy stuff :D

ocean wren
#

yeah, can just spawn occasional lunatics that like throw stuff and self destruct or something 🙂

#

a bit like a violent pikmin 😉

#

anarcute? oooh.. lemmie look

#

works for me 🙂 yeah, something like a non-playable AI driven version of this, but with adversarial teams

#

right, project "Twitch plays overthrow" is a go!

mossy nexus
#

I think my AI is too conservative and boring to be considered "fun" 😔

#

I mean I love it and it's great

#

it's just not very advanced

#

doesn't even seek cover or anything

misty gale
#

Same lol. Even when done im not sure i'd call it fun to any extent

mossy nexus
#

I does do the occasional dodge

#

and has some role based behavior

ocean wren
#

But whyyyyyy!

#

Dammit all, I want FUN AI

#

Well, sod it, I'll do it myself

mossy nexus
#

it is fun

#

in the scope of the game

#

but in the game it's just one of many layered systems 😅

ocean wren
#

layered systems sounds like sort of spreadsheet type busy-work ala Eve Online 🙂

#

I want RIOTS

#

so, I'm going to have to code a mob director aren't I 🙂

#

need to look up the UE web integration stuff I guess

misty wharf
#

is it going to make your characters an offer they can't refuse?

ocean wren
#

no, I mean sort of rioting mob.. not "the" mob 🙂

misty wharf
#

lol

mossy nexus
#

although if you did make a director for the mafia mob, should it be called the godfather?

ocean wren
#

that's a cool name for an AI system. Epic probably have that in the list of silly names they're going to use along with niagara and nanite

crimson galleon
#

it will be called Cortex 😎

celest python
#

If it is not gonna be useless as Cortana, let them name it anything they want lol

ocean wren
#

it'll be useless AND named something silly/cheesy

#

charisma or something

#

I remember back when Sony was pushing the "emotion engine" on goddam PS2

#

total horse...t

#

it was basically a triangle rasterizer

#

and the press were touting it as some kind of emotion synthesis thing 🙂

#

I think someone at Sony PR got their wires crossed

misty wharf
#

Lol

#

at least it was a memorable name

#

like BLAST PROCESSING

ocean wren
#

BLASTWAVE the new AI technology from MOAR EPIC THAN YOU games

alpine path
#

How can I force AI to respect vertical distance when actor tries to get to the closest point on nav mesh? AI jumps off the cliff instead of taking ladders path.

crimson galleon
night pilot
#

I want to use SetFocus on my Mob. But, my Mob was not looking at the Pitch axis. What am I doing wrong?.
I use default Character and AIController.

misty gale
#

the controller rotation doesnt necessarily update when the pawn does

pine steeple
#

control rotation will never rotate pitch

#

or your capsule will end up rotated

#

you want to print GetBaseAimRotation

still path
#

Why does some pawns don't instantly update sensed targets? As if ai perception ticked every 5 seconds or so

#

In settings, this thing is set to 0 so it should tick every frame but it does not appear to do so

#

literally blind for some time

misty wharf
#

@still path you might have so many perception things that it's getting timesliced due to taking too long. There are config values for it which you can change to adjust the maximum perception processing duration (but I don't remember what they are off the top of my head), or you can use IGenericTeamAgentInterface to implement teams support and perhaps use that to reduce the amount of perceived actors

still path
#

Any way doing that in bp or some key words to google that stuff?

misty wharf
#

generic team agent needs to be done in C++, the config stuff should be possible to just put into DefaultGame or DefaultEngine or something, but I don't really know what to google for it

still path
#

Ok, thank you

night pilot
#

@pine steeple You misunderstood. I need a controller rotation. Please see the blueprint again.

pine steeple
#

@night pilot that will not set pitch unless you are looking at another pawn

#

this is in the code

night pilot
#

@pine steepleWow! 😱 Why did Epic Games do this?

#

@pine steepleOk. thx!

pine steeple
#

because it was a shooter engine originally

#

so its probably just a remnant

#

make your target point a pawn

#

and it should work

quick sluice
#

Hello all, I found out why my ships weren't moving. It was because the ship is high above the ocean floor and the pawn has to be close to the navmesh to find a path. Is there a way to set the amount of distance an AI Pawn can have above a navmesh to still find a path?

alpine path
#

@crimson galleonI need a function to get distance to closest point on nav mesh in 3d space. I did not find any "GetDistanceTo 2d node"

#

@quick sluiceNavData->GetConfig().DefaultQueryExtent I think this one can help

lyric flint
#

the biggest part of ai is just navmesh

#

right?

#

and behavior trees

#

the rest is code

ocean wren
quick sluice
timber mortar
#

my AI has become sentient, help?

#

i accidently set bAllowSentience to true and now i can't change it back or it'll kill me

alpine path
#

@quick sluiceYou can change it here: ProjectSettings->NavigationSystem->Agents->DefaultQueryExtent

ocean wren
#

Is that only for vertical extents?

#

Oh yeah, I guess if you don't have any "upstairs" that'd work

undone hull
#

hi guys! hope everyone is doing great 💙 wanted to ask if there's a way to know if a BTTask failed and notify it to the Controller/BTComponent/BB? thanks!

alpine path
#

@undone hullyou can wrap it with selector and add second node to notify. But ofc it is better to do in c++ in proper way

quick sluice
#

Will try that out when I'm back at my computer again.

winged grail
# quick sluice Hello all, I found out why my ships weren't moving. It was because the ship is h...

I'm still relatively inexperienced so could be off, but I feel like in addition to the other answers you could also periodically line trace from the ocean surface to the ocean floor, and then offset the Z transform of the static/skeletalmesh component in your actor by that distance (so you still only have the one actor navigating itself; if the distance between the two doesn't change then you could also just have a constant offset).

quick sluice
winged grail
cobalt palm
#

Hello I am creting a customer ai for a shopping game and have this blackboard that doesnt seem to work how I would like it to.

When the AI spawns and runs this bb, the first thing it should do is initialize a max amount of shelves to go to. Then, it goes to a sequence where it finds a shelf in an array of all shelves based on an index, waits, goes to the shelf, then the index is incremented only if it isnt higher than the max amount of shelves. If the index will become higher, a finish execute is called with a "false" success. This in turn should run the last sequence where it finds a random register, moves to it, and finish with a failed result. But for some reason the middle sequence where the ai goes from shelf to shelf runs too many time.

#

As you can see the middle seuqence has 2 decorators, one to infinitely loop it so that it will continue to go to the shelves, and the other that compares the index and the max amount of shelves to break out of the sequences and move on to the last sequence.

#

After looking at the log, it seems that if the middle sequence fails, for some reason the whole main sequence is restarted instead of moving onto the last sequence.

misty wharf
#

This is how aborting works. It counts as a failure

#

You can try adding a Force Success decorator to the middle branch

#

this should allow it to abort, but still report a success

#

but note that it will report success for any failure condition from the child nodes as well

cobalt palm
#

Hm. So becuase I have it having a finish execute as false, it restarts the whole thing?

So what about the condition I added on the middle branch that compares the 2 entries? When it aborts itself will it restart, or just move on?

misty wharf
#

the reason it restarts is because it's a failure and this is how Sequence nodes handle failure

#

A Sequence node executes its children until one of them fails, at that point it itself will fail

#

since it's the root of your tree, it effectively restarts the tree

cobalt palm
#

Ok, so any failure restarts the whole thing. So what could I instead do to get the same desired result?

misty wharf
#

As I said add a Force Success decorator for the one in the middle

#

this forces it to always return a success regardless of what happens, which would make it continue to the next node when it gets aborted

#

Alternatively you can try using a conditional loop decorator instead of a loop with infinite iterations

cobalt palm
misty wharf
#

Ah I see

cobalt palm
quick sluice
#

Anybody got an idea as why my pawn isn't respecting the Z axis? It heads up 1800 z then starts moving on the same plane. I want it to stay at 0

winged grail
quick sluice
#

I set it to -1000 and it still flies to 1800 before leveling

winged grail
#

I'd either do a "get actor location" on self and then plug the z value of that in, or line trace to the landscape and plug the z value of that in just to trial.

quick sluice
#

Yeah I'm struggling with navmeshes for days now

#

Can't even get a basic MoveTo to work 😭

winged grail
#

Are there any collision bounds blocking it?

quick sluice
#

Nope

winged grail
#

You've probably already done this but you could try disconnecting all the extraneous things, and then manually entering the vector values into the "MoveTo" node just to see if the behaviour persists (or alternatively just create a new pawn class and run a "event begin play" move to XYZ function). Sorry I'm not more help!

quick sluice
#

Yeah it was in the FLoating Pawn Movement Component

#

!

#

Planar constraint

#

Another mystery solved

winged grail
#

Nice! Hopefully when I inevitably encounter something similar I'll remember this 😆 .

quick sluice
#

😄 I'll stick around this channel the upcoming time. Hope I can help you out one day.

mossy nexus
#

but that probably won't stop certain things from triggering

misty wharf
#

Oh that's good to know

quick sluice
#

How do I open the AI Debug panel? Internet says it's the " ' " key

#

But it doesn't work.

misty wharf
#

I think the thing it's referring to is the gameplay debugger

#

on a US layout it's the ' key but if you're not using a US layout, it's probably one of the keys on left side of enter

#

I think you can also change the keybind for it from editor settings if you can't get it open

quick sluice
#

Alright I'll try the editor settings, thanks!

mint bolt
#

Hello, I have an issue with navagents. I have a huge dragon that requires a large capsule size. In order to fix it getting stuck I've added one more supported NavAgent with a radius of 150.

#

The issue now is that all other NPC's are using that large NavAgent instead of the default one, causing them to get stuck in small spaces (which did not happen before). Any ideas on how is a Character assigned to a NavAgent? I've disabled 'UpdateNavAventWithOwenersCollision' in the character movement, but it still creates issue. And that happens after a level transition (I use a single persistent level with multiple levels streaming in/out'). Any ideas?

mossy nexus
#

you need 2 navmeshes

#

one for each agent

#

there are probably some settings on each actor in regards to which navmesh to use

mint bolt
mint bolt
mint bolt
#

I just want to make sure that my small NPC's use the 'Default' and NOT the 'Large' one

lone stump
#

@mint bolt on character movement component, there's nav movement section. Put radius and height to match what you defined in agent and uncheck update nav agent with owners collision

mint bolt
lone stump
#

it breaks the moment sublevel gets streamed in?

mint bolt
#

Yes. I have a sys that unloads the current level and loads the next one. As streaming levels (but I think that's irrelevant).

#

The point is that at some point the agents have to pick what navmesh to use and they're picking the wrong one it would seem.

#

I'm looking through the source code but it seems i'm too dump to figure it out.

lone stump
#

As far as I know they picked it when spawned. Are you using gameplay debugger (') to confirm their nav data gets changed?

mint bolt
#

Let me check with that. I'm quite sure it's fine though since the navdata is built & stuff, but I'll double check.

#

One minute since with loading & stuff everything is so slow.

#

Aaaand it crashed... still better than compiling shaders.

#

@lone stump Is there any way to be able to select a character without (')? Since my camera is focused on the main character and I can't simulate the game since on a simulation I can't switch levels.

lone stump
#

@mint bolt you can use ; to open debug camera and point it at the AI you're debugging. When deugger opens you can use ; to go back to the character

mint bolt
#

Doesn't work.

#

Yes, the docs said it should work like that but when I open the debug camera it doesn't allow me to change the focused actor.

lone stump
#

you just want to be in debug camera so you can aim at AI and then do '

mint bolt
#

Yes, but in the debug camera the (') doesn't work.

lone stump
#

works for me :S

mint bolt
#

Hm...

#

Any idea were is the gameplay debugger in code somewhere? Maybe I can scrub where from that 'NavData' info is retrieved:

#

Atm it says 'Large' which is obviously wrong. It should be 'Default'.

#

All right... it seems that the selection is automated based on some sort of criteria. It's obvious that the criteria doesn't work for my case because of some other variable that I have somewhere around my code. I'll just have to see what criteria is not matching.

mint bolt
#

I've tested and yes, I can confirm. After a level transition the 'NavData' instead of being 'Default' as is normal, it is set to the 'Large' agent. I'll try look on why it is like that after a level transition.

#

@lone stumpif you're curious I've found the issue. It would seem that the best fitting agent based on the radius is chosen. I have 2 supported nav agents. One has a radius of 35 (Default) and another a radius of 150 (Large).

It would seem that an actor that has a radius of 48.0 is closer to the 'Large' agent than of the 'Default' agent. I would call that 'Unreal Logic'. Certainly not very logic to me.

lone stump
#

@mint bolt good that you found it 🙂 yeah, it checks radius first, then height. Larger one is always chosen because if it chose smaller one it wouldn't be able to walk through smaller spaces, better to think you're bigger than smaller

mint bolt
lone stump
#

np, glad you solved it. Why did it change on level streaming though? Streamed level had large agent, but regular one didn't?

mint bolt
#

It's complicated. Because I've added a 'Large' actor later and when I've tested on that level the pathfinding was NOT built for the large agent. However when I was streaming it it was seeing that the pathfinding was incomplete and it was building it at runtime (since I use runtime path generation). When testing in the editor everything was fine since everyone was using the only available build pathfinding since it was the default. On a level stream it was re-build correctly and some NPC's started using the 'Large' pathfinding.

#

That made the issue quite difficult to observe and only at runtime after a level load.

#

And if you think that was complicated, don't worry that's not even the tip of the iceberg :). Another one was the height based goal reaching in 'MoveToRandom' in BT tree nodes.

lone stump
#

Level streaming makes everything more fun 😄

mint bolt
#

Yes, and makes me want to shoot myself. And with our custom save/load system on top of that the fun is complete.

uncut rune
#

Yeah, multiplayer and level streaming that the 2 big things in Unreal that makes everything else alot more complicated 😆

cobalt palm
#

Hello, juet need some ideas for this. I have a customer ai that will enter the store, go to a couple shelves, then go to a register, and go back to the point of spawn. Now once they are back at their point of spawn I would like them to despawn so that no runtime errors occurs.

Would it be viable to create a new task that despawns the customer/ai once after they arrived at the spawn location? Or is there any easier option?

misty wharf
#

You could do that, or just use an overlap box or something at the spawn point which despawns the actor

#

It doesn't really make a huge difference

lyric flint
#

Anyone know what the use case would be for Grid AI Controller

#

and if it would work for my purpose

#

Have a guess what i'm trying to remake

lyric flint
#

What would be best way to cast to the GridAIC would that work ??

mossy nexus
#

I don't know what the grid AIC is really

#

but if you want them to move in line I guess you could do that by code

lyric flint
#

is there a way to force the Navmesh to regen whilst game is running ??

mossy nexus
#

yes if you set the navmesh to be dynamic

#

but I'm not sure why you'd need that in your case?

lyric flint
#

i have workaround for now so should be fine

lyric flint
#

So anyone help with this, How would i give AI a area to seach within for a point to go to ??

misty gale
#

nav modifier and filter?

lyric flint
#

modifier ??

#

bassically when a certian behaviour is used on the tree i need the AI to stay in relative corners but still roam around in them corners until told otherwise

winged grail
lyric flint
#

thanks

winged grail
#

Could definitely get that behaviour using this. Alternatively, since it's such a small area you could probably just do something much less dynamic, like using a series of collision boxes or movement points to define zones of movement.You could also use the EQS system in conjunction with some predefined vectors if you're wanting to avoid overlap with other characters (could use this in conjunction with the other suggestions or on its own).

lyric flint
#

yeah I did think of doing something where a "Zone" will have array of locations and it just randomly picks one

#

just thought it there was more of method of doing it that has less sending of thing between everything

winged grail
#

I don't know if it's helpful, but I use a combination of different methods for moving units in my project. For instance, I have "scout" units, that basically take a north, south, east, or west coordinate from a town, and then use an EQS to generate some movable points around it's perimeter in the desired quadrant, but I also have more of a spline movement system that guards in the city generate random reachable points on to move along roads and paths. Then I'm debating the possibility of using the navigation queries from that video to avoid moving into buildings unless they're actively pursuing someone or satisfying a need (to avoid cutting through buildings and such).

lyric flint
#

see mine is a remake of classic not to copy and release but to see if I have a reachable Goal can I achieve it. In this case work out to make the PacMan game am i able to use what is available to me knowledge and help through methods to create the game to a playable level

#

and with it being PacMan it dosen't need complex things. But I'm trying to furture proof stuff rather then get it in working and then clean up as it were

#

as they say sometimes can't make something without making a mess in process sometimes

winged grail
#

Yeah that makes sense, I've definitely ended up revamping a bunch of my systems multiple times as I learn more. I would maybe start with a system that you find simple and approachable and then tweak and revise from there, but everyone has different preferences and I'm pretty new so take anything I say with a grain of salt. Good luck with the project though!

lyric flint
#

thats the plan it is turning out to seem

next patio
#

Has someone experienced the problem with Nav Mesh Bounds Volume in UE5 not working? In a new created level the nav mesh bound volume appears its green area, in the main level not.

crimson galleon
crimson galleon
#

then rebuild

next patio
#

Rebuild the level?

crimson galleon
#

alright, when you build navigation it creates this recast object, that's sort of like the nav mesh container, that sometimes stops updating. Delete the recast object then rebuild navigation. This is not deleting the nav mesh bounds. Do this in the level that has the issue

next patio
crimson galleon
lyric flint
#

Hi all

#

needs really help here

#

I need help setting Enum values in Behavior tree which each actor has control on what enum value is set

#

anyone able to help would be great please 🙂

#

sorted it

#

I have a rouge Delay

cobalt palm
#

Hello,

I am having this issue where the sequence on the far right runs before the "Compare Blackboard entries" fails which is THEN supposed to run the sequence on the right.

crimson galleon
cobalt palm
# crimson galleon did you ask this before? and wasn't the idea that having an infinite loop like t...

I did, however I fixed some code and found some errors during runtime.

Correct the infinite loop would never exit so that the ai will keep going to the next target point, however, there is a decorator that compares the bb entries that will fail the sequence so that the ai will go on to the sequence on the right, but a force success was needed so that the middle branch failing wouldn't restart everything.

crimson galleon
cobalt palm
#

Sure can.

crimson galleon
#

and it doesn't at all fire the first 2 branches?

cobalt palm
# crimson galleon and it doesn't at all fire the first 2 branches?

No, see. Everything works fine, some of the time.

The only problem I am having, is that it sometimes leaves the middle branch too ealry, or too late, where the Shelf Index and Max Shelves entries are not equal (which should keep the middle branch running) but will still go on to the last branch.

crimson galleon
cobalt palm
#

The findshelf task gets an object from the world based on the shelf index. It grabbed the location and Moves to it. It then waits, and goes to the IncrementShelfIndex where it adds 1 to the shelf index. It then goes back to findshelf, gets the array and gets the object with the updated index value and gets a new location.

I want this to stop when the Shelf index and Max Shelves entries are equal to each other. Once they are equal the middle sequence loop will break as the "Compare Blackboard Entries" will fail but has a force success so that the BT doesnt restart and it goes to the last branch on the right.

However the problem is that, even though the middle branch has the decorator to run until the 2 values are equal, the ai still sometimes runs the last branch.

crimson galleon
#

this is still more than i can grasp in how its all setup. honestly, sounds like it would be easier with a selector and then each task branch has conditions to determine it

primal plinth
#

Hello.
I know, how to make simple chase player behavior with "Move to Target Actor". It's done.
Then I placed arrow component in Player_Character_BP, and tried to make AI character to move to player's arrow component's location, instead just chasing Player with next BT_Task:

#

But no success. AI Character keeps just chase player, instead move to its arrow component location. Any tips, plz.

crimson galleon
primal plinth
#

I casted target actor to a specific character class. Also, no success.
Try to get the component ref.

crimson galleon
#

lose the getcomponentbyclass node and call the reference itself

#

looking at this, the component would exist inside BP_Echo, so look for the component name

primal plinth
lyric flint
#

for AI how can i increase the amount the Navmesh covers ??

#

This is the mesh and collision

#

Then in game the navigation where you see the boundary of navibal area

mossy nexus
lyric flint
#

so if the point at which the AI grabs the player position is not withing the nav mesh

#

right up against the wall. The AI will still take the effect to try get to it so will take time to get there if it can great if not then it won't mark as failed until it tried to get to it

#

only at that stage does the AI Move To rerun

#

for Pink Ghost ambush this dosen't work that well as it predicts location then waits till it's tried to get to it before failing the AIMove to

lyric flint
#

is there a way to give AI an area to stay within

#

so if I tell it to find location in a specific location but want it to only path using a specific part of navMesh what would be best way ?

pine steeple
#

you have to use NavModifiers and NavFilters

#

only way to do it

lyric flint
#

well i tried that

#

the ghosts each have there own Enum to say which brance they should run

#

when i try it out it seems the system is only choosing one of the Ghost to do whats needs

#

is the error i am facing is because all the Ghost are trying to use one Behaviour tree

#

rather then each having there individual BT ??

pine steeple
#

they cant run the same tree

#

they would have there own copy

lyric flint
#

that'll be my issue then

pine steeple
#

?

lyric flint
#

I can't have child of a Behaviour tree so it's gonna have to be just dupplicates

pine steeple
#

they will have there own copy of the above tree

#

BT's are not shared between AI

lyric flint
#

oh you mean like a in game child BT ?? so in game it will run it's on tree

#

so what your saying is each AI would need a seperate BT

pine steeple
#

no

lyric flint
#

same BB just seperate BT

pine steeple
#

no