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

GlobalMeshMaterial : UMaterialInterface *
Material to display on the global mesh
Signature
UMaterialInterface* AMRUKDestructibleGlobalMeshSpawner::GlobalMeshMaterial
PointsPerUnitX : float
The number of points per unit along 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.
Signature
float AMRUKDestructibleGlobalMeshSpawner::PointsPerUnitX
PointsPerUnitY : float
The number of points per unit along 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.
Signature
float AMRUKDestructibleGlobalMeshSpawner::PointsPerUnitY
PointsPerUnitZ : float
The number of points per unit along the Z axis Increase this value to get smaller cracks in the global mesh. Decrease this value to get bigger cracks in the global mesh.
Signature
float AMRUKDestructibleGlobalMeshSpawner::PointsPerUnitZ
ReservedBottom : double
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.
Signature
double AMRUKDestructibleGlobalMeshSpawner::ReservedBottom
ReservedTop : double
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.
Signature
double AMRUKDestructibleGlobalMeshSpawner::ReservedTop
SpawnMode : EMRUKSpawnMode
Whether destructible meshes should be spawned automatically.
Signature
EMRUKSpawnMode AMRUKDestructibleGlobalMeshSpawner::SpawnMode

Member Functions

AddDestructibleGlobalMesh ( Room )
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.
Signature
AMRUKDestructibleGlobalMesh * AMRUKDestructibleGlobalMeshSpawner::AddDestructibleGlobalMesh(AMRUKRoom *Room)
Parameters
Room: AMRUKRoom *  The room.
BeginPlay ()
Signature
void AMRUKDestructibleGlobalMeshSpawner::BeginPlay() override
Returns
void
FindDestructibleMeshForRoom ( Room )
Find the destructible mesh that has been spawned for the given room.
Signature
AMRUKDestructibleGlobalMesh * AMRUKDestructibleGlobalMeshSpawner::FindDestructibleMeshForRoom(AMRUKRoom *Room)
Parameters
Room: AMRUKRoom *  Room to look for the destructible mesh
Returns
AMRUKDestructibleGlobalMesh *  The destructible mesh