Nav Mesh Agent vs transform.Translate(Vector3.forward...);,Unity nav mesh agent vs transform.Translate(Vector3.forward);

Hello,

Im using nav mesh agent for moving IAs, but I tested transform.Translate(Vector3.forward * speed Time.deltaTime) and also works perfect for my game, I am worried abaut wich should i use, does nav mesh agen consume more resources? as my game will be a mobile game i want to optimize it as much as i can.

Best Regards.

Good day.

By default, we can say Navmesh system will consume more, but if you dont have so many agents, its irrelevant (difference is very small). NAvmesh system will give you more “realistic” movement than a simple translate. Nav mesh agents can rotate, recalculate paths, have a stopping distance, have acceleration, detect obstacles, priority over other agents, etc… just by configure it in the inspoector. If you want all this “realistic” movement by code, you need to write it all… So i recommend you nav mesh system.

So… If you have less than, lets say 30-40 agents moving simultaneously, is irrelevant what method you use for resource consumming issues.

Bye!