![]() ![]() Here, you can configure how to spawn your mesh: its scale, rotation and position relative to the spawn positon. Here, we want our cubes to collide with the player, so we'll leave our collision to BlockAll. Note that the collisions settings are separate from the actor collision settings: for example you could want to have non-colliding grass that still collides with the voxel world when dug under. Instance Settings are used to configure the Hierarchical Instanced Mesh where the mesh will be rendered. Spawning an actor allows to have physics: when you dig under a tree, it will fall. The Actor Settings section is to configure the actor that will be spawned when the instance is floating. Here, we want to spawn a cube roughly every 5 voxels, so let's set that to 5: See Sending data to the material below.ĭistance between instances in voxel is the average distance we want between our foliage instances. Instance Random can be used to send custom parameters to the foliage material. Open it, and set the Mesh property to the mesh you want to spawn: This allows to make a tree properly fall when dug under for instance. Optionally, when digging, you can check for floating foliage instances nearby, and replace them with full actors. First, we need to create a mesh spawner: a spawner stores information about what to spawn, how to spawn it and where it can be spawned.Ī mesh spawner uses a Hierarchical Instanced Mesh to render the meshes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |