ð Building and Place of Interest (POI)
Last updated
Last updated
Starting 5.5 you can now spawn Place of Interest (POI). Those are level assemblies you can build yourself and spawn through the biomes, villages, farms, cemeteries, rivers, and lakes. This new system also comes with a tag generator to facilitate your workflow and is shared between Massive Village and Massive World. This means that a POI can be used seamlessly by both tools.
First, go to MassiveShared, right-click on BP_MassiveTags, and Run Editor Utility Widget, this will open the small UI to generate tags
The POI can be created in any scene but I have left an example in Massive/MassiveWorld/Demo/MassiveWorld_Assembly
In this level, the POI is already packed, so we need to break it first.
Once "broken" you can see all the static meshes added inside that level and can modify them again.
The logic is simple, you add some tags on every static mesh, and depending on the tag added PCG will spawn them with a certain logic.
For example, you probably want the trees to be at the landscape level and want a random Z rotation. To do this you just need to select the trees, and click on the two buttons "Project To Landscape" and "Rotate Z only". This will add the required tags for PCG.
When you are ready to pack again, you can create a level instance like this. I tend to use the center min Z for the pivot type but feel free to experiment.
And finally, you need to create a PCG data level by right-clicking on the newly created scene.
And this makes it ready to be added inside the Biomes/Villages!
You can still update the level instance after but don't forget to repack the PCG asset to update its content.
This example is simple and made with trees, but it could also be used for anything. For example, you can spawn a small log cabin as a Place of Interest (POI), have the wood logs snap to the ground, some progs to spawn 50% of the time, etc. This feature will be shared among Massive World and Village.
Since 5.5 there is a new way to add interactive doors and it is a lot easier now. All you need to do is to add the tag "Door" in your level instance, you can also use the tag tool for this.
Behind the scene, PCG will see that tag and the mesh. With that information, it will know to spawn a Door blueprint and use the mesh you provided in that level instance.
The door blueprint I made is simple but easy to replace. In order to do this go inside PCG_PlaceOfInterest, near the end, you will see a node called "Spawn Actor"
In there, replace the template actor class for your template blueprint
Now, PCG knows that it needs to spawn your blueprint when it sees the tag "door" but we need to fill the static mesh with the one you used in your level instance POI. For that, you need to create a variable "static mesh" in your blueprint to modify and then create a function "Update Door Mesh" to update the mesh with it.
The name of the variable and function must match perfectly.