Navigation
API > API/Plugins > API/Plugins/ApexDestruction
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- USceneComponent
- UPrimitiveComponent
- UMeshComponent
- USkinnedMeshComponent
- UDestructibleComponent
References
| Module | ApexDestruction |
| Header | /Engine/Plugins/Runtime/ApexDestruction/Source/ApexDestruction/Public/DestructibleComponent.h |
| Include | #include "DestructibleComponent.h" |
Syntax
UCLASS&40;ClassGroup&61;Physics,
HideCategories&61;&40;Object, Mesh, "Mesh&124;SkeletalAsset", "Components&124;SkinnedMesh", Mirroring, Activation, "Components&124;Activation"&41;,
Config&61;Engine, EditInlineNew, Meta&61;&40;BlueprintSpawnableComponent&41;&41;
class UDestructibleComponent :
public USkinnedMeshComponent,
public IDestructibleInterface
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bEnableHardSleeping | Enable "hard sleeping" for destruction-generated PxActors. | |
| uint32: 1 | bFractureEffectOverride | If set, use this actor's fracture effects instead of the asset's fracture effects. | |
| TArray< struct FFractureEffect > | FractureEffects | Fracture effects for each fracture level. Used only if Fracture Effect Override is set. | |
| float | LargeChunkThreshold | The minimum size required to treat chunks as Large. | |
| FComponentFractureSignature | OnComponentFracture | Called when a component is touched |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UDestructibleComponent
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| int32 | BoneIdxToChunkIdx
(
int32 BoneIdx |
||
| int32 | ChunkIdxToBoneIdx
(
int32 ChunkIdx |
||
| UDestructibleMesh * | |||
| void | SetChunkVisible
(
int32 ChunkIndex, |
This method makes a chunk (fractured piece) visible or invisible. | |
| void | SetChunkWorldRT
(
int32 ChunkIndex, |
This method sets a chunk's (fractured piece's) world rotation and translation. | |
| void | SetDestructibleMesh
(
UDestructibleMesh* NewMesh |
Overridden from USkinnedMeshComponent
| Type | Name | Description | |
|---|---|---|---|
| void | RefreshBoneTransforms
(
FActorComponentTickFunction* TickFunction |
Update functions Refresh Bone Transforms Each class will need to implement this function Ideally this function should be atomic (not relying on Tick or any other update.) | |
| bool | ShouldUpdateTransform
(
bool bLODHasChanged |
Should update transform in Tick |
Overridden from UPrimitiveComponent
| Type | Name | Description | |
|---|---|---|---|
| void | Add a force to a single rigid body. | ||
| void | AddForceAtLocation
(
FVector Force, |
Add a force to a single rigid body at a particular location in world space. | |
| void | AddForceAtLocationLocal
(
FVector Force, |
Add a force to a single rigid body at a particular location. | |
| void | AddImpulse
(
FVector Impulse, |
Add an impulse to a single rigid body. Good for one time instant burst. | |
| void | AddImpulseAtLocation
(
FVector Impulse, |
Add an impulse to a single rigid body at a specific location. | |
| void | AddRadialForce
(
FVector Origin, |
Add a force to all bodies in this component, originating from the supplied world-space location. | |
| void | AddRadialImpulse
(
FVector Origin, |
Add an impulse to all rigid bodies in this component, radiating out from the specified position. | |
| bool | Determines whether or not the simulate physics setting can be edited interactively on this component | ||
| bool | DoCustomNavigableGeometryExport
(
FNavigableGeometryExport& GeomExport |
Collects custom navigable geometry of component. | |
| FBodyInstance * | GetBodyInstance
(
FName BoneName, |
Returns BodyInstance of the component. | |
| UBodySetup * | GetBodySetup () |
Return the BodySetup to use for this PrimitiveComponent (single body case) | |
| bool | LineTraceComponent
(
FHitResult& OutHit, |
Trace a ray against just this component. | |
| void | ReceiveComponentDamage
(
float DamageAmount, |
Event called when a component is 'damaged', allowing for component class specific behaviour | |
| void | SetCollisionEnabled
(
ECollisionEnabled::Type NewType |
Controls what kind of collision is enabled for this body | |
| void | SetCollisionProfileName
(
FName InCollisionProfileName, |
Set Collision Profile Name This function is called by constructors when they set ProfileName This will change current CollisionProfileName to be this, and overwrite Collision Setting | |
| void | SetCollisionResponseToAllChannels
(
ECollisionResponse NewResponse |
Changes all ResponseToChannels container for this PrimitiveComponent. to be NewResponse | |
| void | SetCollisionResponseToChannel
(
ECollisionChannel Channel, |
Changes a member of the ResponseToChannels container for this PrimitiveComponent. | |
| void | SetCollisionResponseToChannels
(
const FCollisionResponseContainer& NewReponses |
Changes the whole ResponseToChannels container for this PrimitiveComponent. | |
| void | SetEnableGravity
(
bool bGravityEnabled |
Enables/disables whether this component is affected by gravity. | |
| void | SetMaterial
(
int32 ElementIndex, |
Changes the material applied to an element of the mesh. | |
| void | SetSimulatePhysics
(
bool bSimulate |
Sets whether or not a single body should use physics simulation, or should be 'fixed' (kinematic). | |
| bool | SweepComponent
(
FHitResult& OutHit, |
Trace a shape against just this component. | |
| void | WakeRigidBody
(
FName BoneName |
'Wake' physics simulation for a single body. |
Overridden from USceneComponent
| Type | Name | Description | |
|---|---|---|---|
| FBoxSphereBounds | CalcBounds
(
const FTransform& LocalToWorld |
Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size. | |
| FTransform | GetSocketTransform
(
FName InSocketName, |
Get world-space socket transform. | |
| bool | Returns whether the specified body is currently using physics simulation | ||
| void | OnUpdateTransform
(
EUpdateTransformFlags UpdateTransformFlags, |
Native callback when this component is moved |
Overridden from UActorComponent
| Type | Name | Description | |
|---|---|---|---|
| void | Activate
(
bool bReset |
Activates the SceneComponent, should be overridden by native child classes. | |
| void | BeginPlay () |
Used to detach physics objects before simulation begins. | |
| void | Deactivate () |
Deactivates the SceneComponent. | |
| void | Called on each component when the Actor's bEnableCollisionChanged flag changes | ||
| void | Used to create any physics engine information for this component | ||
| void | Used to shut down and physics engine structure for this component |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally | |
| void | Handles reading, writing, and reference collecting using FArchive. |
Overridden from IDestructibleInterface
| Type | Name | Description | |
|---|---|---|---|
| void | ApplyDamage
(
float DamageAmount, |
Take damage. | |
| void | ApplyRadiusDamage
(
float BaseDamage, |
Take radius damage. |
Deprecated Variables
| Type | Name | Description | |
|---|---|---|---|
| TObjectPtr< class UDestructibleMesh > | DestructibleMesh_DEPRECATED | Provide a blueprint interface for setting the destructible mesh |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| void | SetSkeletalMesh
(
USkeletalMesh* NewMesh, |
Use USkeletalMeshComponent::SetSkeletalMesh() or SetSkinnedAssetAndUpdate() instead. |