Cogito, ergo sum

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[edit]

Property group 'FracturedStaticMeshActor'[edit]

bBreakChunksOnActorTouch[edit]

Type: bool

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

ChunkHealthScale[edit]

Type: float

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

Default value: 1.0

FractureCullMaxDistance[edit]

Type: float

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

Default value: 4096.0

FractureCullMinDistance[edit]

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[edit]

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[edit]

Type: FracturedStaticMeshComponent

Modifiers: const, editconst


Default value: FracturedStaticMeshComponent'FracturedStaticMeshComponent0'

MaxPartsToSpawnAtOnce[edit]

Type: int

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

Default value: 6

OverrideFragmentDestroyEffects[edit]

Type: array<ParticleSystem>

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

Internal variables[edit]

bHasShownMissingSoundWarning[edit]

Type: bool

Modifiers: transient

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

ChunkHealth[edit]

Type: array<int>

Current health of each chunk

DeferredPartsToSpawn[edit]

Type: array<DeferredPartToSpawn>

Modifiers: transient

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

ExplosionFractureSound[edit]

Type: SoundCue

Cached sound for large fractures.

MI_LoseChunkPreviousMaterial[edit]

Type: MaterialInterface

Modifiers: transient

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

PartImpactEffect[edit]

Type: Actor.PhysEffectInfo

Cached info for part impacts

SingleChunkFractureSound[edit]

Type: SoundCue

Cached sound for single chunk fractures.

SkinnedComponent[edit]

Type: FracturedSkinnedMeshComponent

Modifiers: transient, const

Skinned component which will handle rendering for FracturedStaticMeshComponent

Default values[edit]

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[edit]

FracturedSkinnedComponent0[edit]

Class: Engine.FracturedSkinnedMeshComponent

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

FracturedStaticMeshComponent0[edit]

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[edit]

Class: Engine.DynamicLightEnvironmentComponent

Property Value
bDynamic False
bEnabled False
bForceNonCompositeDynamicLights True

Structs[edit]

DeferredPartToSpawn[edit]

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[edit]

Native functions[edit]

BreakOffIsolatedIslands[edit]

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[edit]

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[edit]

simulated native event ResetVisibility ()

Unhides all fragments

SpawnDeferredParts[edit]

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[edit]

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[edit]

simulated native final function ResetHealth ()

Used to init/reset health array.

SpawnPart[edit]

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[edit]

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[edit]

Explode[edit]

simulated event Explode ()

Break off all pieces in one go.

HideFragmentsToMaximizeMemoryUsage[edit]

simulated event HideFragmentsToMaximizeMemoryUsage ()

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

HideOneFragment[edit]

simulated event HideOneFragment ()

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

PostBeginPlay[edit]

simulated event PostBeginPlay ()

Overrides: Actor.PostBeginPlay


TakeDamage[edit]

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[edit]

FractureEffectIsRelevant[edit]

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[edit]

simulated function bool IsFracturedByDamageType (class<DamageTypeDmgType)

Util for checking if this damage type will cause fracture.

SetLoseChunkReplacementMaterial[edit]

simulated function SetLoseChunkReplacementMaterial ()

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