Landscape and Foliage API – Map generation using Landscape and Foliage APIs

We can use the earlier mentioned landscape generation code to create a landscape, and the procedural foliage functionality to randomly distribute some foliage on it.

Combining the capabilities of the Landscape API and Foliage API will allow you to procedurally generate complete maps. In this recipe, we will outline how this is done.

We will programmatically create a landscape and populate it with foliage using code.

Landscape and Foliage API – Map generation using Landscape and Foliage APIs

Getting ready

To prepare to perform this recipe, we will need a UE4 project with a Generate button to kick off generation. You can see the Landscape API – Landscape ...

Get Unreal Engine 4 Scripting with C++ Cookbook 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.