How it works...

We use a technique called Binary-Space Partitioning (BSP), and the node is the bread and butter of it all, along with the split function defined.

Also, we use the main component to drive all the high-level work. However, given that the splitting happens recursively, we just need to take care of the split function for the base and recursive case, and then create the connections between the blocks.

Get Unity 2018 Artificial Intelligence Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.