API reference
API reference
Select your platform
No SDKs available
No versions available

AMRUKDestructibleGlobalMeshSpawner Class

Extends AActor
The destructible global mesh spawner allows to spawn (automatically) destructible global meshes when new rooms are created. A destructible global mesh is a version of the global mesh that can be destructed during runtime. The bulk of the work is performed in UDestructibleMeshComponent. It will perform on start a one time preprocessing step to segment the given global mesh into smaller chunks. After that the chunks can be used during the game and removed (e.g. with ray casts) at any time during the game simulating as if the global mesh would crack down. To enhance the visual quality when cracking the (e.g. removing mesh chunks) global mesh a particle system could be used. The system allows to define areas that should be non destructible.

Fields

Whether destructible meshes should be spawned automatically.
Material to display on the global mesh
Density of mesh segments on the X axis. Increase this value to get smaller cracks in the global mesh. Decrease this value to get bigger cracks in the global mesh.
How many segmentation points should be created at a maximum.
Density of mesh segments on the Y axis. Increase this value to get smaller cracks in the global mesh. Decrease this value to get bigger cracks in the global mesh.
Area on the top of the mesh that should be indestructible. The area is given in centimeters 1.0 == 1 cm -1.0 means no reserved area.
Area on the bottom of the mesh that should be indestructible. The area is given in centimeters 1.0 == 1 cm -1.0 means no reserved area.

Member Functions

void BeginPlay ( )
Find the destructible mesh that has been spawned for the given room.
Parameters
Room
Room to look for the destructible mesh
Returns
The destructible mesh
Add new destructible mesh for the given room. A mesh will only get spawned if no destructible mesh has been spawned for the room yet.
Parameters
Room
The room.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon