Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize Navmesh Polling #9

Closed
Flafla2 opened this issue May 24, 2016 · 1 comment
Closed

Optimize Navmesh Polling #9

Flafla2 opened this issue May 24, 2016 · 1 comment

Comments

@Flafla2
Copy link
Owner

Flafla2 commented May 24, 2016

The API currently slows to a crawl when dealing with large Navmeshes. The most intensive step currently (at runtime) is raycasting against the Navmesh, an O(T) calculation (T=number of triangles). This performance is dismal in comparison to Unity's own navmesh, which does some sort of preprocessing beforehand. Clearly this can be improved, however I want to retain the non-invasive aspects of the current system (ie the user can currently use the Unity navmesh for AI or other things and doesn't have to limit the bake settings just because of Vive teleportation).

The easiest solution is to roll with an existing pathfinding system. Detour (a part of the Recast navigation system) seems like an excellent candidate in this regard. It shouldn't be too difficult to port Detour to C# (using C#'s native DLL binding system).

@Flafla2
Copy link
Owner Author

Flafla2 commented May 29, 2016

Addressed in version 2.0.0 (we now use Unity's physics raycasting for the initial raycast and Unity's Navmesh for sampling if a point is on the navmesh), but I may decide to reopen this if more robust control is called for.

@Flafla2 Flafla2 closed this as completed May 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant