^ Now!
v1.3 Released
Grab the latest release from this page or from the title post of this thread.
–
Unbound Worlds! (Experimental feature)
Background:
Perhaps one of the biggest limitations in the plugin was its fixed navigable bounds which forced you to set your map size to a small-ish box. Granted, you could use a really large volume and compromise on load-times but in hindsight it was unreasonable for one tiny aspect of the game (AI Navigation) to hamstring your entire thought-process around what map size of your game needs to be. I suspect this may have turned some people away from using the plugin too.
I realized this the hard way while testing my nature game’s “Simulation” game-mode where players should (ideally) be able to travel to any distant part of the map and shape the ecology there. So I spent some time adding plants, etc to a distant terrain and when I started adding creatures (AI) to the map, POOF… nothing happened. Why? The navigable volume was waaaaay back on another side of the map!
So I wrote a new “Unbound Navigation Manager” class that allows you to run navigation queries from anywhere without worrying about the navigable volume box!
How to use:
Simply add the new manager “DonNavigationManagerUnbound” into your map (be sure to delete the old manager). You will now be able to schedule navigation queries from anywhere!
The new manager will still show a navigable bounds box but don’t worry, it won’t be used unless you explicitly override the variable “IsUnbound” to false.
What’s more, dynamic obstacles will not need to call “ScheduleDynamicCollisionUpdate” to register their collisions because everything is calculated on the fly with the unbound manager. That’s a huge relief for highly procedural setups like my game where managing dynamic collisions can become a huge burden.
Finally, this is a highly experimental feature that hasn’t been fully tested so beware! Even in my own game it is disabled by default. I’m using the new manager though and exposing a simple menu option from which unbound worlds can be activated at run-time for testing or playing around with.
Limitations:
-
The unbound manager is obviously slower, watch out for timeouts on your navigation queries. This is really a compromise between performance and the ability to navigate anywhere.
-
Long-distance navigation is NOT solved by this update! Long-distance navigation continues to remain something that will be really really slow and almost certainly timeout. This update allows you navigate from any starting point to any destination, but that destination still needs to be at a reasonable distance away from your starting point. If your AI needs to navigate from one corner of the world to another I would suggest breaking it up with pre-set waypoints or by creating dedicated obstacle-free airspaces that your AI can rely on for moving between different zones. Once it has arrived at a new zone, it can launch a navigation query to navigate around that space.
–
Looking ahead, there’s some interesting stuff possible with the unbound manager like allowing variable voxel sizes for each query. In simple words, an AI can decide what voxel size (precision) to use at run-time depending on its unique needs at that point in time. This could be one way of allowing long-distance travel. An AI could use a really large voxel size for long-distance travel or even progressively increase the voxel size the closer it gets to the target (a pseudo-octree like solution perhaps). This is not implemented though, it’s just me day-dreaming about how the birds in my game are going to perform their long-distance migrations to distant lands some day
PS: Separate downloads for 4.11 and 4.12 in v1.3. If you want to use it in other Unreal versions like 4.10, you’ll need to fix compilation errors (arising out of engine API changes) in Visual Studio, should be very straightforward to do that though.