Mostly Harmless

UE3:FracturedStaticMeshActor (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> Actor >> FracturedStaticMeshActor
Package: 
Engine
Direct subclasses:
FracturedSMActorSpawnable, FracturedStaticMeshPart, PhysXDestructibleActor


Properties

Property group 'FracturedStaticMeshActor'

bBreakChunksOnActorTouch

Type: bool

If true, detach parts when an Actor with bCanCauseFractureOnTouch contacts them. Actor must not be blocked by this FSMA.

ChunkHealthScale

Type: float

Allows controlling how much 'health' chunks have on a per-instance basis

Default value: 1.0

FractureCullMaxDistance

Type: float

Maximum distance from player where actor will be allowed to fracture (scaled by global settings.)

Default value: 4096.0

FractureCullMinDistance

Type: float

Minimum distance from player where actor will ALWAYS fracture, even when outside the view frustum (scaled by global settings.)

Default value: 512.0

FracturedByDamageType

Type: array<class<DamageType> >

Set of damage types that can cause pieces to break off this FSAM. If empty, all damage types can do this.

FracturedStaticMeshComponent

Type: FracturedStaticMeshComponent

Modifiers: const, editconst


Default value: FracturedStaticMeshComponent'FracturedStaticMeshComponent0'

MaxPartsToSpawnAtOnce

Type: int

Maximum number of rigid body parts to spawn off per actor, per frame

Default value: 6

OverrideFragmentDestroyEffects

Type: array<ParticleSystem>

Allows you to override particle effects to play when chunk is hidden for just this actor.

Internal variables

bHasShownMissingSoundWarning

Type: bool

Modifiers: transient

Used so we only display the 'missing sound' warning once

ChunkHealth

Type: array<int>

Current health of each chunk

DeferredPartsToSpawn

Type: array<DeferredPartToSpawn>

Modifiers: transient

Array of parts that are waiting to be spawned in an upcoming tick

ExplosionFractureSound

Type: SoundCue

Cached sound for large fractures.

MI_LoseChunkPreviousMaterial

Type: MaterialInterface

Modifiers: transient

This is the material that was set on this FracuredStaticMeshActor before we overrode it with LoseChunkOutsideMaterial *

PartImpactEffect

Type: Actor.PhysEffectInfo

Cached info for part impacts

SingleChunkFractureSound

Type: SoundCue

Cached sound for single chunk fractures.

SkinnedComponent

Type: FracturedSkinnedMeshComponent

Modifiers: transient, const

Skinned component which will handle rendering for FracturedStaticMeshComponent

Default values

Property Value
bBlockActors True
bCollideActors True
bEdShouldSnap True
bGameRelevant True
bMovable False
bNoDelete True
bPathColliding True
bProjTarget True
bRouteBeginPlayEvenIfStatic False
bWorldGeometry True
CollisionComponent FracturedStaticMeshComponent'FracturedStaticMeshComponent0'
CollisionType COLLIDE_CustomDefault
Components[0] DynamicLightEnvironmentComponent'LightEnvironment0'
Components[1] FracturedSkinnedMeshComponent'FracturedSkinnedComponent0'
Components[2] FracturedStaticMeshComponent'FracturedStaticMeshComponent0'

Subobjects

FracturedSkinnedComponent0

Class: Engine.FracturedSkinnedMeshComponent

Property Value
bDisableAllRigidBody True
LightEnvironment DynamicLightEnvironmentComponent'Engine.Default__FracturedStaticMeshActor:LightEnvironment0'
ReplacementPrimitive None

FracturedStaticMeshComponent0

Class: Engine.FracturedStaticMeshComponent

Property Value
bAllowApproximateOcclusion True
bForceDirectLightMap True
bUseDynamicIBWithHiddenFragments True
ReplacementPrimitive None
WireframeColor
Member Value
A 255
B 255
G 128
R 0

LightEnvironment0

Class: Engine.DynamicLightEnvironmentComponent

Property Value
bDynamic False
bEnabled False
bForceNonCompositeDynamicLights True

Structs

DeferredPartToSpawn

Modifiers: native

Info about a fracture part that should be spawned in an upcoming Tick

int ChunkIndex 
Index of the chunk to spawn
Object.Vector InitialVel 
Exit velocity for this chunk
Object.Vector InitialAngVel 
Exit angular velocity for this chunk
float RelativeScale 
Relative scale
bool bExplosion 
TRUE if this part was spawned because of an explosion

Functions

Native functions

BreakOffIsolatedIslands

native simulated event BreakOffIsolatedIslands (out array<byteFragmentVis, array<intIgnoreFrags, Object.Vector ChunkDir, array<FracturedStaticMeshPartDisableCollWithPart, bool bWantPhysChunks)

Find all groups of chunks which are not connected to 'root' parts, and spawn them as new physics objects. Updates FragmentVis with new chunks that get hidden by the process.

BreakOffPartsInRadius

simulated native event BreakOffPartsInRadius (Object.Vector Origin, float Radius, float RBStrength, bool bWantPhysChunksAndParticles)

Util to break off all parts within radius of the explosion

ResetVisibility

simulated native event ResetVisibility ()

Unhides all fragments

SpawnDeferredParts

native simulated event bool SpawnDeferredParts ()

Gives the actor a chance to spawn chunks that may have been deferred

Returns:

Returns true if there are still any deferred parts left to spawn

RemoveDecals

simulated native final protected function RemoveDecals (int IndexToRemoveDecalsFrom)

This function will remove all of the currently attached decals from the object. Basically, we want to have decals attach to these objects and then on state change (due to damage usually), we will just detach them all with the big particle effect that occurs it should not be noticeable.

ResetHealth

simulated native final function ResetHealth ()

Used to init/reset health array.

SpawnPart

simulated native final function FracturedStaticMeshPart SpawnPart (int ChunkIndex, Object.Vector InitialVel, Object.Vector InitialAngVel, float RelativeScale, bool bExplosion)

Spawn one chunk of this mesh as its own Actor, with the supplied velocities and scale relative to this Actor.

SpawnPartMulti

simulated native final function FracturedStaticMeshPart SpawnPartMulti (array<intChunkIndices, Object.Vector InitialVel, Object.Vector InitialAngVel, float RelativeScale, bool bExplosion)

Does the same as SpawnPart, but takes an array of chunks to make part of the new part.

Events

Explode

simulated event Explode ()

Break off all pieces in one go.

HideFragmentsToMaximizeMemoryUsage

simulated event HideFragmentsToMaximizeMemoryUsage ()

Hide some percentage of the fragments from this mesh to maximize memory usage - does not spawn physics pieces etc

HideOneFragment

simulated event HideOneFragment ()

Hide one fragment from this mesh - does not spawn physics pieces etc

PostBeginPlay

simulated event PostBeginPlay ()

Overrides: Actor.PostBeginPlay


TakeDamage

simulated event TakeDamage (int Damage, Controller EventInstigator, Object.Vector HitLocation, Object.Vector Momentum, class<DamageTypeDamageType, optional Actor.TraceHitInfo HitInfo, optional Actor DamageCauser)

Overrides: Actor.TakeDamage

TakeDamage will hide/spawn chunks when they get shot.

Other instance functions

FractureEffectIsRelevant

simulated function bool FractureEffectIsRelevant (bool bForceDedicated, Pawn EffectInstigator, out byte bWantPhysChunksAndParticles)

Specialized to handle explicit effect instigators. Also, handles None instigators -- these are special weapons (eg dummyfire) and are always relevant. Also, for fractured static meshes we only spawn effects if the mesh itself has been rendered recently.

IsFracturedByDamageType

simulated function bool IsFracturedByDamageType (class<DamageTypeDmgType)

Util for checking if this damage type will cause fracture.

SetLoseChunkReplacementMaterial

simulated function SetLoseChunkReplacementMaterial ()

This will possibly set the material on the FracturedMesh after we have lost a chunk. *