Please watch this short video. http://screencast.com/t/vw2a5FdOOT It shows the problem.

It's using the build in Unity navigation and followed the guide to build the demo in the video.

Everytime I add a new obstacle than all agends pauses (hiccups) for a short time. I think this is because they have to recalculate a new path. How to make this recalculation in a background thread? I want to make a mace tower defense.

Thank you for reading an watching!

  • \$\begingroup\$ Out of curiosity: does Unity's navmesh even allow dynamic obstacles or runtime updating? Or is that from a plugin in the asset store? Anyway, if you are asking how to make the updating be calculated in a different CPU thread than the main game's, that's not trivial at all (you would have to read a lot first on multi-threading). And honestly, I'm not sure that solves the problem because it doesn't make sense to let characters move before path updating is completed (they could end up inside the new obstacle). \$\endgroup\$ – MAnd Nov 29 '15 at 21:26
  • \$\begingroup\$ Yes unity supports runtime obstacles. But it gets these hiccups if there are many agends \$\endgroup\$ – zeiteisen Nov 29 '15 at 21:28

Built-in navigation has lagging problems (more than lagging, actually), that's a known issue. I suggest you to use a better navigation solution.

This is, for example, pretty fast: http://arongranberg.com/astar/


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.