100+enemy move alone a spline.should I use nav mesh?

the enemies don’t need to avoid obstacles. For performance,what is better?use Pawn for enemy + Ai move to+nav mesh,or just throw the Nav mesh away and use actor for the enemy and directly interpolate their location and rotation?

There’s only one way to know, and that’s to profile both approaches and see which performs best
Under the hood Move To does a similar thing, by getting a path (an array of points basically) and moving the component from one point to the next
In both cases the majority of the cost will come from actually moving the component, which you cannot avoid, especially if the component has collisions enabled
I think the difference will probably be really small, so it will most likely come down to what you think is easier/more convenient to use

1 Like

Okay.thank for suggestion.I’ll keep the Nav mesh.

Hey there @baobao4435! In my experience, Zeaf is correct that profiling both would be necessary to get a clear answer, because there are tons of factors. Though, in my experience, if the question is between 100 spline movement actors vs 100 full characters + nav mesh, it’s definitely more expensive to have the character classes and querying the nav mesh, even in situations it doesn’t have to adjust pathing.

1 Like

thank you sharing valuable experience.I know character is expensive,especially the character movement component,it’s prepared for complicated NPC or main character.change it to pawn and use floating movement instead would save a lot costs(I already changed it).and because my enemy is a very low end type of creature :joy: .so I’m wondering if I could even get rid of the nav mesh.but I was about to try implementing actor movement .but then I realized that AIController can’t possess an actor :joy: . and I might have to calculate velocity on my own by sampling distance between last frame position and current position.after a series operation I kind of doubt if there is a benefit :joy: .

Agreed! Though you may be surprised just how much pawns are doing under the hood themselves still. That said if you do need the AI controller on them, then the gap definitely tightens for sure and pawn movement isn’t much more than the actual calculations. If you do end up stress testing, I’d love to see the outcome!

1 Like