Language:
Discover
By Skill Level
By Category

USkeletalMeshComponent

Choose your OS:

Inheritance Hierarchy

Syntax

class USkeletalMeshComponent :
    public USkinnedMeshComponent ,
    public IInterface_CollisionDataProvider

Remarks

SkeletalMeshComponent is used to create an instance of an animated SkeletalMesh asset.

Variables

Name Description

Public variable

physx::PxAggreg...

 

Aggregate

Physics-engine representation of PxAggregate which contains a physics asset instance with more than numbers of bodies.

Public variable

FSingleAnimatio ...

 

AnimationData

Protected variable

TEnumAsByte < EA ...

 

AnimationMode

Animation anim: Matinee related data start - this needs to be replaced to new system.

Public variable

UAnimBlueprintG ...

 

AnimBlueprintGeneratedClass

Public variable

TSubclassOf < UA ...

 

AnimClass

The AnimBlueprint class to use. Use 'SetAnimInstanceClass' to change at runtime.

Public variable

FBlendedHeapCur ...

 

AnimCurves

Temporary storage for curves

Public variable

UAnimInstance &...

 

AnimScriptInstance

The active animation graph program instance.

Public variable

uint32 : 1

 

bAnimTreeInitialised

If true, AnimTree has been initialised.

Public variable

uint32 : 1

 

bBlendPhysics

Enables blending in of physics bodies whether Simulate or not

Protected variable

bool

 

bClothingSimulationSuspended

Whether the clothing simulation is suspended (not the same as disabled, we no longer run the sim but keep the last valid sim data around)

Public variable

uint32 : 1

 

bClothMorphTarget

Cloth morph target option This option will be applied only before playing because should do pre-calculation to reduce computation time for run-time play so it's impossible to change this option in run-time

Public variable

uint32 : 1

 

bCollideWithAttachedChildren

Can't collide with part of attached children if total collision volumes exceed 16 capsules or 32 planes per convex

Public variable

uint32 : 1

 

bCollideWithEnvironment

Can't collide with part of environment if total collision volumes exceed 16 capsules or 32 planes per convex

Public variable

uint32 : 1

 

bDeferMovementFromSceneQueries

OptimizationWhether animation and world transform updates are deferred.

Public variable

uint32 : 1

 

bDeferredKinematicUpdate

Indicates that this SkeletalMeshComponent has deferred kinematic bone updates until next physics sim.

Public variable

uint32 : 1

 

bDisableClothSimulation

Disable cloth simulation and play original animation without simulation

Public variable

uint32 : 1

 

bEnableLineCheckWithBounds

If true, line checks will test against the bounding box of this skeletal mesh component and return a hit if there is a collision.

Public variable

uint32 : 1

 

bEnablePerPolyCollision

Uses skinned data for collision data.

Public variable

uint32 : 1

 

bEnablePhysicsOnDedicatedServer

If true, simulate physics for this component on a dedicated server.

Public variable

bool

 

bForceRefpose

Misc If true, force the mesh into the reference pose - is an optimization.

Public variable

uint32 : 1

 

bHasValidBodies

If true, there is at least one body in the current PhysicsAsset with a valid bone in the current SkeletalMesh

Public variable

uint32 : 1

 

bIncludeComponentLocationIntoBounds

If true, the Location of this Component will be included into its bounds calculation (this can be useful when using SMU_OnlyTickPoseWhenRendered on a character that moves away from the root and no bones are left near the origin of the component)

Public variable

uint32 : 1

 

bIsAutonomousTickPose

True if calling TickPose() from Autonomous networking updates.

Public variable

bool

 

bLocalSpaceKinematics

Temporary fix for local space kinematics.

Public variable

uint32 : 1

 

bLocalSpaceSimulation

It's worth trying this option when you feel that the current cloth simulation is unstable.

Public variable

uint32 : 1

 

bNoSkeletonUpdate

Skips Ticking and Bone Refresh.

Public variable

TArray < struct ...

 

Bodies

Array of FBodyInstance objects, storing per-instance state about about each body.

Public variable

int32

 

BodyIndex

Public variable

UBodySetup *...

 

BodySetup

Used for per poly collision.

Public variable

uint32 : 1

 

bOldForceRefPose

If bForceRefPose was set last tick.

Public variable

TArray < FTransf ...

 

BoneSpaceTransforms

Temporary array of local-space (relative to parent bone) rotation/translation for each bone.

Public variable

uint32 : 1

 

bOnlyAllowAutonomousTickPose

If true TickPose() will not be called from the Component's TickComponent function.

Public variable

uint32 : 1

 

bPauseAnims

Pauses this component's animations (doesn't tick them, but still refreshes bones)

Public variable

uint32 : 1

 

bPrevDisableClothSimulation

To save previous state

Public variable

uint32 : 1

 

bRequiredBonesUpToDate

If false, indicates that on the next call to UpdateSkelPose the RequiredBones array should be recalculated.

Public variable

uint32 : 1

 

bResetAfterTeleport

Reset the clothing after moving the clothing position (called teleport)

Public variable

uint32 : 1

 

bShowPrePhysBones

Bool that enables debug drawing of the skeleton before it is passed to the physics.

Protected variable

uint32 : 1

 

bUpdateAnimationInEditor

If true, this will Tick until disabled

Public variable

uint32 : 1

 

bUpdateJointsFromAnimation

If we should pass joint position to joints each frame, so that they can be used by motorized joints to drive the ragdoll based on the animation.

Public variable

bool

 

bUseRefPoseOnInitAnim

On InitAnim should we set to ref pose (if false use first tick of animation data)

Public variable

uint16

 

CachedAnimCurveUidVersion

Cache AnimCurveUidVersion from Skeleton and this will be used to identify if it needs to be updated

Public variable

TArray < FTransf ...

 

CachedBoneSpaceTransforms

Update Rate.

Public variable

TArray < FTransf ...

 

CachedComponentSpaceTransforms

Cached SpaceBases for Update Rate optimization.

Public variable

FBlendedHeapCur ...

 

CachedCurve

Cached Curve result for Update Rate optimization

Public variable

float

 

ClothBlendWeight

Weight to blend between simulated results and key-framed positions if weight is 1.0, shows only cloth simulation results and 0.0 will show only skinned results

Public variable

TSubclassOf < cl...

 

ClothingSimulationFactory

Class of the object responsible for

Public variable

float

 

ClothMaxDistanceScale

Public variable

EClothingTelepo ...

 

ClothTeleportMode

Whether we need to teleport cloth.

Public variable

FSkeletalMeshCo ...

 

ClothTickFunction

WITH_PHYSX.

Public variable

TArray < struct ...

 

Constraints

Array of FConstraintInstance structs, storing per-instance state about each constraint.

Protected variable

TMap < int32 , FC ...

 

CurrentSimulationData_GameThread

Simulation data written back to the component after the simulation has taken place This should only ever be written to during the clothing completion task.

Public variable

TArray < FBoneIn ...

 

FillComponentSpaceTransformsRequiredBones

Temporary array of bone indices required to populate component space transforms

Public variable

float

 

GlobalAnimRateScale

Used to scale speed of all animations on this skeletal mesh.

Public variable

TEnumAsByte < EK ...

 

KinematicBonesUpdateType

If we are running physics, should we update non-simulated bones based on the animation bone positions.

Public variable

float

 

LastPoseTickTime

Keep track of when animation has been ticked to ensure it is ticked only once per frame.

Public variable

FVector

 

LineCheckBoundsScale

If bEnableLineCheckWithBounds is true, scale the bounds by this value before doing line check.

Public variable

FOnAnimInitiali ...

 

OnAnimInitialized

Broadcast when the components anim instance is initialized.

Public variable

FConstraintBrok ...

 

OnConstraintBroken

Notification when constraint is broken.

Public variable

FOnSkeletalMesh ...

 

OnSkeletalMeshPropertyChanged

Public variable

TEnumAsByte < EP ...

 

PhysicsTransformUpdateMode

Whether physics simulation updates component transform.

Public variable

UAnimInstance &...

 

PostProcessAnimInstance

An instance created from the PostPhysicsBlueprint property of the skeletal mesh we're using, Runs after physics has been blended

Public variable

int32

 

RagdollAggregateThreshold

Threshold for physics asset bodies above which we use an aggregate for broadphase collisions

Public variable

TArray < FBoneIn ...

 

RequiredBones

Temporary array of bone indices required this frame. Filled in by UpdateSkelPose.

Public variable

USkeletalMeshCo...

 

RootBodyData

Index of the 'Root Body', or top body in the asset hierarchy.

Public variable

FVector

 

RootBoneTranslation

Offset of the root bone from the reference pose. Used to offset bounding box.

Public variable

TArray < UAnimIn ...

 

SubInstances

Any running sub anim instances that need to be updates on the game thread

Public variable

FTransform

 

TransformToRoot

Public variable

EDynamicActorSc ...

 

UseAsyncScene

The simulation scene to use for this instance.

Constructors

Name Description

Public function

USkeletalMeshComponent

(
    const FObjectInitializer & ObjectIn...
)

Functions

Name Description

Public function

void

 

AccumulateAllBodiesBelowPhysicsBlendWeight

(
    const FName & InBoneName,
    float AddPhysicsBlendWeight,
    bool bSkipCustomPhysicsType
)

Accumulate AddPhysicsBlendWeight to physics blendweight for all of the bones below passed in bone to be simulated

Public function

void

 

AddClothingBounds

(
    FBoxSphereBounds & InOutBounds,
    const FTransform & LocalToWorld
)

Given bounds InOutBounds, expand them to also enclose the clothing simulation mesh

Public function Virtual

void

 

AddForceToAllBodiesBelow

(
    FVector Force,
    FName BoneName,
    bool bAccelChange,
    bool bIncludeSelf
)

Add a force to all rigid bodies below.

Public function Virtual

void

 

AddImpulseToAllBodiesBelow

(
    FVector Impulse,
    FName BoneName,
    bool bVelChange,
    bool bIncludeSelf
)

Add impulse to all single rigid bodies below. Good for one time instant burst.

Public function

void

 

AllowAnimCurveEvaluation

(
    FName NameOfCurve,
    bool bAllow
)

Public function

void

 

ApplyAnimationCurvesToComponent

(
    const TMap < FName , float >* In...,
    const TMap < FName , float >* In...
)

Apply animation curves to this component

Public function

void

 

ApplyDeltaToAllPhysicsTransforms

(
    const FVector & DeltaLocation,
    const FQuat & DeltaRotation
)

Set physics transforms for all bodies

Public function

void

 

BindClothToMasterPoseComponent()

If this component has a valid MasterPoseComponent then this function makes cloth items on the slave component take the transforms of the cloth items on the master component instead of simulating separately.

Public function

void

 

BlendInPhysics

(
    FTickFunction & ThisTickFunction
)

Take the results of the physics and blend them with the animation state (based on the PhysicsWeight parameter), and update the SpaceBases array.

Public function

void

 

BlendPhysicsBones

(
    TArray < FBoneIndexType >& Bones
)

Blend of Physics Bones with PhysicsWeight and Animated Bones with (1-PhysicsWeight)

Public function

void

 

BreakConstraint

(
    FVector Impulse,
    FVector HitLocation,
    FName InBoneName
)

Break a constraint off a Gore mesh.

Protected function

bool

 

CanSimulateClothing()

Returns whether we're able to run a simulation (ignoring the suspend flag)

Public function Virtual

void

 

CheckClothTeleport()

Check linear and angular thresholds for clothing teleport

Public function Virtual

void

 

ClearAnimNotifyErrors

(
    UObject * InSourceNotify
)

Clears currently stored errors. Call before triggering anim notifies for a particular mesh.

Public function

void

 

ClearMorphTargets()

Clear all Morph Target that are set to this mesh

Public function

void

 

CompleteParallelAnimationEvaluation

(
    bool bDoPostAnimEvaluation
)

Public function

void

 

CompleteParallelClothSimulation()

Callback when the parallel clothing task finishes, copies needed data back to component for gamethread

Public function

void

 

ComputeRequiredBones

(
    TArray < FBoneIndexType >& OutRequi...,
    TArray < FBoneIndexType >& OutFillC...,
    int32 LODIndex,
    bool bIgnorePhysicsAsset
)

Computes the required bones in this SkeletalMeshComponent based on current SkeletalMesh, LOD and PhysicsAsset

Public function

void

 

ConditionallyDispatchQueuedAnimEvents()

Public function

FRootMotionM ...

 

ConsumeRootMotion()

Consume and return pending root motion from our internal anim instances (main, sub and post)

Protected function

FRootMotionM ...

 

ConsumeRootMotion_Internal

(
    float InAlpha
)

Consume and return pending root motion from our internal anim instances (main, sub and post)

Public function

FTransform

 

ConvertLocalRootMotionToWorld

(
    const FTransform & InTransform
)

Take extracted RootMotion and convert it from local space to world space.

Public function

void

 

CopyChildrenClothCollisionsToParent()

Children's collisions can affect to parent's cloth reversely

Public function

void

 

CopyClothCollisionsToChildren()

Copy parent's cloth collisions to attached children, where parent means this component

Public function

void

 

CreateBodySetup()

Public function

void

 

DebugDrawClothing

(
    FPrimitiveDrawInterface * PDI
)

Draw the currently clothing state, using the editor extender interface

Public function

void

 

EvaluatePostProcessMeshInstance

(
    TArray < FTransform >& OutBoneSpace...,
    FCompactPose & InOutPose,
    FBlendedHeapCurve & OutCurve,
    const USkeletalMesh * InSkeleta...,
    FVector & OutRootBoneTranslation
)

Evaluates the post process instance from the skeletal mesh this component is using.

Public function

void

 

FindClothCollisions

(
    FClothCollisionData & OutCollisions
)

Find if this component has collisions for clothing and return the results calculated by bone transforms

Public function

FName

 

FindConstraintBoneName

(
    int32 ConstraintIndex
)

Find Constraint Name from index

Constraint Joint Name

Public function

int32

 

FindConstraintIndex

(
    FName ConstraintName
)

Find Constraint Index from the name

Constraint Index

Public function

FConstraintI ...

 

FindConstraintInstance

(
    FName ConName
)

Find instance of the constraint that matches the name supplied.

Public function

int32

 

FindRootBodyIndex()

Find the root body index

Public function

void

 

ForceClothNextUpdateTeleport()

Used to indicate we should force 'teleport' during the next call to UpdateClothState, This will transform positions and velocities and thus keep the simulation state, just translate it to a new pose.

Public function

void

 

ForceClothNextUpdateTeleportAndReset()

Used to indicate we should force 'teleport and reset' during the next call to UpdateClothState.

Public function

int32

 

ForEachBodyBelow

(
    FName BoneName,
    bool bIncludeSelf,
    bool bSkipCustomType,
    TFunctionRef < void(FBodyInstance &#...
)

Iterates over all bodies below and executes Func. Returns number of bodies found

Public function

bool

 

GetAllowedAnimCurveEvaluate()

Public function

const FBlend ...

 

GetAnimationCurves()

Access Curve Array for reading

Public function

EAnimationMo ...

 

GetAnimationMode()

Public function

UAnimInstanc ...

 

GetAnimInstance()

Returns the animation instance that is driving the class (if available).

Public function

float

 

GetBoneMass

(
    FName BoneName,
    bool bScaleMass
)

Returns the mass (in kg) of the given bone

Public function

FVector

 

GetClosestCollidingRigidBodyLocation

(
    const FVector & TestLocation
)

Iterates through all bodies in our PhysicsAsset and returns the location of the closest bone associated with a body that has collision enabled.

Public function

bool

 

GetClosestPointOnPhysicsAsset

(
    const FVector & WorldPosition,
    FClosestPointOnPhysicsAsset & Close...,
    bool bApproximate
)

Given a world position, find the closest point on the physics asset.

Public function

const ICloth ...

 

GetClothingSimulation()

Get the current clothing simulation (read only)

Public function

float

 

GetClothMaxDistanceScale()

Blueprint callable methods

Public function

bool

 

GetClothSimulatedPosition_GameThread

(
    const FGuid & AssetGuid,
    int32 VertexIndex,
    FVector & OutSimulPos
)

This is the total cloth time split up among multiple computation (updating gpu, updating sim, etc...)

Public function

const TMap < ...

 

GetCurrentClothingData_GameThread()

Get the current simulation data map for the clothing on this component.

Public function

void

 

GetCurrentJointAngles

(
    FName InBoneName,
    float& Swing1Angle,
    float& TwistAngle,
    float& Swing2Angle
)

Gets the current Angular state for a named bone constraint

Public function

void

 

GetCurrentRefToLocalMatrices

(
    TArray < FMatrix >& OutRefToLocals,
    int32 InLodIdx
)

Public function

bool

 

GetDisableAnimCurves()

Public function

const TArray ...

 

GetDisallowedAnimCurvesEvaluation()

Public function

const FBlend ...

 

GetEditableAnimationCurves()

Public function

FBlendedHeap ...

 

GetEditableAnimationCurves()

Get Access to the current editable Curve Array - uses same buffer as space bases

Public function

float

 

GetMorphTarget

(
    FName MorphTargetName
)

Get Morph target with given name

Public function

const TMap < ...

 

GetMorphTargetCurves()

Public function

const TArray ...

 

GetPendingRadialForces()

Public function Static

uint32

 

GetPhysicsSceneType

(
    const UPhysicsAsset & PhysAsset,
    const FPhysScene & PhysScene,
    EDynamicActorScene SimulationScene
)

Public function

float

 

GetPlayRate()

Animation play functions

Public function

float

 

GetPosition()

Animation play functions

Public function

UAnimInstanc ...

 

GetPostProcessInstance()

Returns the active post process instance is one is available.

Public function

UAnimSingleN ...

 

GetSingleNodeInstance()

Public function

FVector

 

GetSkeletalCenterOfMass()

Returns the center of mass of the skeletal mesh, instead of the root body's location

Public function

float

 

GetTeleportDistanceThreshold()

Gets the teleportation distance threshold.

Threshold value.

Public function

float

 

GetTeleportRotationThreshold()

Gets the teleportation rotation threshold.

Threshold in degrees.

Public function

float

 

GetTotalMassBelowBone

(
    FName InBoneName
)

Utility which returns total mass of all bones below the supplied one in the hierarchy (including this one).

Public function

bool

 

GetUpdateAnimationInEditor()

Return true if currently updating in editor is true this is non BP because this is only used for slave component to detect master component ticking state

Public function

void

 

GetUpdateClothSimulationData

(
    TMap < int32 , FClothSimulData >& Ou...,
    USkeletalMeshComponent * Overri...
)

Store cloth simulation data into OutClothSimData

Public function

bool

 

HandleExistingParallelEvaluationTask

(
    bool bBlockOnTask,
    bool bPerformPostAnimEvaluation
)

Management function for if we want to do an evaluation but may already be running one bBlockOnTask - if true and we are currently performing parallel eval we wait for it to finish bPerformPostAnimEvaluation - if true and we are currently performing parallel eval we call PostAnimEvaluation too return true if parallel task was running.

Public function Virtual

void

 

InitAnim

(
    bool bForceReinit
)

Animation

Public function

void

 

InitArticulated

(
    FPhysScene * PhysScene
)

Initialize PhysicsAssetInstance for the physicsAsset

Public function

bool

 

InitializeAnimScriptInstance

(
    bool bForceReinit
)

Public function

void

 

InitSkelControls()

Initialize SkelControls

Public function

void

 

InstantiatePhysicsAsset

(
    const UPhysicsAsset & PhysAsset,
    const FVector & Scale3D,
    TArray < FBodyInstance * >& Out...,
    TArray < FConstraintInstance * >...,
    FPhysScene * PhysScene,
    USkeletalMeshComponent * Owning...,
    int32 UseRootBodyIndex,
    physx::PxAggregate* UseAggrega...
)

Instantiates bodies given a physics asset.

Public function

bool

 

IsAnimBlueprintInstanced()

WITH_CLOTH_COLLISION_DETECTION.

Public function

bool

 

IsBodyGravityEnabled

(
    FName BoneName
)

Checks whether or not gravity is enabled on the given bone.

Public function

bool

 

IsClothBoundToMasterComponent()

Public function

bool

 

IsClothingSimulationSuspended()

Gets whether or not the clothing simulation is currently suspended

Public function

bool

 

IsPlaying()

Animation play functions

Public function

bool

 

IsPostEvaluatingAnimation()

Are we currently within PostAnimEvaluation.

Public function

bool

 

IsRunningParallelEvaluation()

Returns whether we are currently trying to run a parallel animation evaluation task.

Public function Virtual

bool

 

IsWindEnabled()

True if wind is enabled

Public function

bool

 

K2_GetClosestPointOnPhysicsAsset

(
    const FVector & WorldPosition,
    FVector & ClosestWorldPosition,
    FVector & Normal,
    FName & BoneName,
    float& Distance
)

Given a world position, find the closest point on the physics asset.

Protected function

bool

 

NeedToSpawnAnimScriptInstance()

Protected function

bool

 

NeedToSpawnPostPhysicsInstance()

Public function Virtual

void

 

NotifySkelControlBeyondLimit

(
    USkelControlLookAt* LookAt
)

Notifier when look at control goes beyond of limit - candidate for delegate

Public function

void

 

OverrideAnimationData

(
    UAnimationAsset * InAnimToPlay,
    bool bIsLooping,
    bool bIsPlaying,
    float Position,
    float PlayRate
)

This overrides current AnimationData parameter in the SkeletalMeshComponent.

Public function

void

 

ParallelAnimationEvaluation()

Parallel evaluation wrappers.

Public function

void

 

PerformAnimationEvaluation

(
    const USkeletalMesh * InSkeleta...,
    UAnimInstance * InAnimInstance,
    TArray < FTransform >& OutSpaceBase...,
    TArray < FTransform >& OutBoneSpace...,
    FVector & OutRootBoneTranslation,
    FBlendedHeapCurve & OutCurve
)

Runs the animation evaluation for the current pose into the supplied variables

Public function

void

 

Play

(
    bool bLooping
)

Animation play functions

Public function

void

 

PlayAnimation

(
    UAnimationAsset * NewAnimToPlay,
    bool bLooping
)

Animation play functions

Public function

bool

 

PoseTickedThisFrame()

Checked whether we have already ticked the pose this frame

Public function

void

 

PostAnimEvaluation

(
    FAnimationEvaluationContext & Evalu...
)

Public function

void

 

ProcessClothCollisionWithEnvironment()

Public function

void

 

RecalcRequiredBones

(
    int32 LODIndex
)

Recalculates the RequiredBones array in this SkeletalMeshComponent based on current SkeletalMesh, LOD and PhysicsAsset.

Public function

void

 

RecalcRequiredCurves()

Recalculates the AnimCurveUids array in RequiredBone of this SkeletalMeshComponent based on current required bone set Is called when Skeleton->IsRequiredCurvesUpToDate() = false

Public function

void

 

RecreateClothingActors()

Destroys and recreates the clothing actors in the current simulation

Public function

void

 

RegisterClothTick

(
    bool bRegister
)

Handle registering our pre cloth tick function.

Public function

void

 

RegisterEndPhysicsTick

(
    bool bRegister
)

Handle registering our end physics tick function.

Public function

FDelegateHan ...

 

RegisterOnPhysicsCreatedDelegate

(
    const FOnSkelMeshPhysicsCreated& D...
)

Register/Unregister for physics state creation callback

Public function

FDelegateHan ...

 

RegisterOnSkeletalMeshPropertyChanged

(
    const FOnSkeletalMeshPropertyChange ...
)

Register / Unregister delegates called when the skeletal mesh property is changed

Public function

FDelegateHan ...

 

RegisterOnTeleportDelegate

(
    const FOnSkelMeshTeleported & Deleg...
)

Register/Unregister for teleport callback

Public function

void

 

ReleaseAllClothingResources()

Remove all clothing actors from their simulation and clear any other necessary clothing data to leave the simulations in a clean state

Public function

void

 

RemoveAllClothingActors()

Remove clothing actors from their simulation

Public function Virtual

void

 

ReportAnimNotifyError

(
    const FText & Error,
    UObject * InSourceNotify
)

Subclasses such as DebugSkelMeshComponent keep track of errors in the anim notifies so they can be displayed to the user.

Public function

void

 

ResetAllBodiesSimulatePhysics()

Allows you to reset bodies Simulate state based on where bUsePhysics is set to true in the BodySetup.

Public function

void

 

ResetAllowedAnimCurveEvaluation()

By reset, it will allow all the curves to be evaluated

Public function

void

 

ResetClothTeleportMode()

Reset the teleport mode of a next update to 'Continuous'

Public function

void

 

ResetRootBodyIndex()

Reset Root Body Index

Public function

void

 

ResumeClothingSimulation()

Resumes a previously suspended clothing simulation, teleporting the clothing on the next tick

Public function

void

 

SetAllBodiesBelowPhysicsBlendWeight

(
    const FName & InBoneName,
    float PhysicsBlendWeight,
    bool bSkipCustomPhysicsType,
    bool bIncludeSelf
)

Set all of the bones below passed in bone to be simulated

Public function

void

 

SetAllBodiesBelowSimulatePhysics

(
    const FName & InBoneName,
    bool bNewSimulate,
    bool bIncludeSelf
)

Set all of the bones below passed in bone to be simulated

Public function

void

 

SetAllBodiesCollisionObjectType

(
    ECollisionChannel NewChannel
)

Set the movement channel of all bodies

Public function

void

 

SetAllBodiesNotifyRigidBodyCollision

(
    bool bNewNotifyRigidBodyCollision
)

Set the rigid body notification state for all bodies.

Public function

void

 

SetAllBodiesPhysicsBlendWeight

(
    float PhysicsBlendWeight,
    bool bSkipCustomPhysicsType
)

Public function

void

 

SetAllBodiesSimulatePhysics

(
    bool bNewSimulate
)

Set bSimulatePhysics to true for all bone bodies.

Public function

void

 

SetAllMotorsAngularDriveParams

(
    float InSpring,
    float InDamping,
    float InForceLimit,
    bool bSkipCustomPhysicsType
)

Set Angular Drive motors params for all constraint instances

Public function

void

 

SetAllMotorsAngularPositionDrive

(
    bool bEnableSwingDrive,
    bool bEnableTwistDrive,
    bool bSkipCustomPhysicsType
)

Enable or Disable AngularPositionDrive.

Public function

void

 

SetAllMotorsAngularVelocityDrive

(
    bool bEnableSwingDrive,
    bool bEnableTwistDrive,
    bool bSkipCustomPhysicsType
)

Enable or Disable AngularVelocityDrive.

Public function

void

 

SetAllowAnimCurveEvaluation

(
    bool bInAllow
)

Public function

void

 

SetAllowedAnimCurvesEvaluation

(
    const TArray < FName >& List,
    bool bAllow
)

Resets, and then only allow the following list to be allowed/disallowed

Public function Virtual

void

 

SetAllPhysicsAngularVelocityInRadians

(
    FVector const& NewVel,
    bool bAddToCurrent
)

Public function

void

 

SetAngularLimits

(
    FName InBoneName,
    float Swing1LimitAngle,
    float TwistLimitAngle,
    float Swing2LimitAngle
)

Sets the Angular Motion Ranges for a named bone

Public function

void

 

SetAnimation

(
    UAnimationAsset * NewAnimToPlay
)

Animation play functions

Public function

void

 

SetAnimationMode

(
    EAnimationMode::Type InAnimationMod...
)

Below are the interface to control animation when animation mode, not blueprint mode

Public function

void

 

SetAnimInstanceClass

(
    UClass * NewClass
)

Public function Virtual

void

 

SetBodyNotifyRigidBodyCollision

(
    bool bNewNotifyRigidBodyCollision,
    FName BoneName
)

Changes the value of bNotifyRigidBodyCollision for a given body

Public function

void

 

SetClothMaxDistanceScale

(
    float Scale
)

Public function

void

 

SetConstraintProfile

(
    FName JointName,
    FName ProfileName,
    bool bDefaultIfNotFound
)

Sets the constraint profile properties (limits, motors, etc...) to match the constraint profile as defined in the physics asset.

Public function

void

 

SetConstraintProfileForAll

(
    FName ProfileName,
    bool bDefaultIfNotFound
)

Sets the constraint profile properties (limits, motors, etc...) to match the constraint profile as defined in the physics asset for all constraints.

Public function

void

 

SetDisableAnimCurves

(
    bool bInDisableAnimCurves
)

Public function

void

 

SetEnableBodyGravity

(
    bool bEnableGravity,
    FName BoneName
)

Enables or disables gravity for the given bone.

Public function

void

 

SetEnableGravityOnAllBodiesBelow

(
    bool bEnableGravity,
    FName BoneName,
    bool bIncludeSelf
)

Enables or disables gravity to all bodies below the given bone.

Public function

void

 

SetEnablePhysicsBlending

(
    bool bNewBlendPhysics
)

Disable physics blending of bones

Public function

void

 

SetForceRefPose

(
    bool bNewForceRefPose
)

Change whether to force mesh into ref pose (and use cheaper vertex shader)

Public function

void

 

SetMorphTarget

(
    FName MorphTargetName,
    float Value,
    bool bRemoveZeroWeight
)

Set Morph Target with Name and Value(0-1)

Public function

void

 

SetNamedMotorsAngularPositionDrive

(
    bool bEnableSwingDrive,
    bool bEnableTwistDrive,
    const TArray < FName >& BoneNames,
    bool bSetOtherBodiesToComplement
)

Enable or Disable AngularPositionDrive based on a list of bone names

Public function

void

 

SetNamedMotorsAngularVelocityDrive

(
    bool bEnableSwingDrive,
    bool bEnableTwistDrive,
    const TArray < FName >& BoneNames,
    bool bSetOtherBodiesToComplement
)

Enable or Disable AngularVelocityDrive based on a list of bone names

Public function Virtual

void

 

SetNotifyRigidBodyCollisionBelow

(
    bool bNewNotifyRigidBodyCollision,
    FName BoneName,
    bool bIncludeSelf
)

Changes the value of bNotifyRigidBodyCollision on all bodies below a given bone

Public function

void

 

SetPhysicsBlendWeight

(
    float PhysicsBlendWeight
)

This is global set up for setting physics blend weight This does multiple things automatically If PhysicsBlendWeight == 1.f, it will enable Simulation, and if PhysicsBlendWeight == 0.f, it will disable Simulation.

Public function

void

 

SetPlayRate

(
    float Rate
)

Animation play functions

Public function

void

 

SetPosition

(
    float InPos,
    bool bFireNotifies
)

Animation play functions

Public function

void

 

SetRootBodyIndex

(
    int32 InBodyIndex
)

Set Root Body Index

Public function

void

 

SetSkeletalMeshWithoutResettingAnimation

(
    USkeletalMesh * NewMesh
)

Public function

void

 

SetTeleportDistanceThreshold

(
    float Threshold
)

Sets the teleportation distance threshold.

Public function

void

 

SetTeleportRotationThreshold

(
    float Threshold
)

Sets the teleportation rotation threshold.

Public function

void

 

SetUpdateAnimationInEditor

(
    const bool NewUpdateState
)

Sets whether or not to force tick component in order to update animation and refresh transform for this component This is supported only in the editor

Protected function

bool

 

ShouldBlendPhysicsBones()

Protected function Virtual

bool

 

ShouldRunClothTick()

Returns whether we need to run the Cloth Tick or not.

Public function Virtual

void

 

SkelMeshCompOnParticleSystemFinished

(
    UParticleSystemComponent * PSC
)

We detach the Component once we are done playing it.

Public function

void

 

SnapshotPose

(
    FPoseSnapshot & Snapshot
)

Takes a snapshot of this skeletal mesh component's pose and saves it to the specified snapshot.

Public function

void

 

Stop()

Animation play functions

Public function

void

 

SuspendClothingSimulation()

Stops simulating clothing, but does not show clothing ref pose.

Public function

void

 

TermArticulated()

Turn off all physics and remove the instance.

Public function

void

 

TermBodiesBelow

(
    FName ParentBoneName
)

Terminate physics on all bodies below the named bone

Public function

void

 

TickAnimation

(
    float DeltaTime,
    bool bNeedsValidRootMotion
)

WITH_EDITOR.

Public function

void

 

TickClothing

(
    float DeltaTime,
    FTickFunction & ThisTickFunction
)

Tick Clothing Animation , basically this is called inside TickComponent

Public function

void

 

UnbindClothFromMasterPoseComponent

(
    bool bRestoreSimulationSpace
)

If this component has a valid MasterPoseComponent and has previously had its cloth bound to the MCP, this function will unbind the cloth and resume simulation.

Public function

void

 

UnregisterOnPhysicsCreatedDelegate

(
    const FDelegateHandle & DelegateHan...
)

Public function

void

 

UnregisterOnSkeletalMeshPropertyChanged

(
    FDelegateHandle Handle
)

Public function

void

 

UnregisterOnTeleportDelegate

(
    const FDelegateHandle & DelegateHan...
)

Public function

void

 

UpdateBoneBodyMapping()

Update the bone mapping on each body instance.

Public function

void

 

UpdateClothStateAndSimulate

(
    float DeltaTime,
    FTickFunction & ThisTickFunction
)

Update the clothing simulation state and trigger the simulation task

Public function

void

 

UpdateClothTransform

(
    ETeleportType TeleportType
)

Updates cloth collision outside the cloth asset (environment collision, child collision, etc...) Should be called when scene changes or world position changes

Public function

void

 

UpdateHasValidBodies()

Update bHasValidBodies flag

Public function

void

 

UpdateKinematicBonesToAnim

(
    const TArray < FTransform >& InComp...,
    ETeleportType Teleport,
    bool bNeedsSkinning,
    EAllowKinematicDeferral DeferralAll...
)

Iterate over each physics body in the physics for this mesh, and for each 'kinematic' (ie fixed or default if owner isn't simulating) one, update its transform based on the animated transform.

Public function

void

 

UpdateMeshForBrokenConstraints()

Look up all bodies for broken constraints.

Public function

void

 

UpdateRBJointMotors()

Iterate over each joint in the physics for this mesh, setting its AngularPositionTarget based on the animation information.

Public function

void

 

ValidateAnimation()

Validates the animation asset or blueprint, making sure it is compatible with the current skeleton

Overridden from USkinnedMeshComponent

Name Description

Public function Virtual

bool

 

AllocateTransformData()

Allocate Transform Data array including SpaceBases, BoneVisibilityStates

Public function Virtual

void

 

ClearRefPoseOverride()

Clear any applied ref pose override

Public function Virtual

void

 

DeallocateTransformData()

Public function Virtual

void

 

FinalizeBoneTransform()

Finalize bone transform of this current tick After this function, any query to bone transform should be latest of the data

Public function Virtual

FVector

 

GetSkinnedVertexPosition

(
    int32 VertexIndex
)

Simple, CPU evaluation of a vertex's skinned position (returned in component space)

Public function Virtual

void

 

HideBone

(
    int32 BoneIndex,
    EPhysBodyOp PhysBodyOption
)

Hides the specified bone. You can also set option for physics body.

Public function Virtual

bool

 

IsPlayingNetworkedRootMotionMontage()

Public function Virtual

bool

 

IsPlayingRootMotion()

Public function Virtual

bool

 

IsPlayingRootMotionFromEverything()

Public function Virtual

void

 

RefreshBoneTransforms

(
    FActorComponentTickFunction * T...
)

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.)

Public function Virtual

void

 

SetPhysicsAsset

(
    UPhysicsAsset * NewPhysicsAsset,
    bool bForceReInit
)

Override the Physics Asset of the mesh.

Public function Virtual

void

 

SetRefPoseOverride

(
    const TArray < FTransform >& NewRef...
)

Apply an override for the current mesh ref pose

Public function Virtual

void

 

SetSkeletalMesh

(
    USkeletalMesh * NewMesh,
    bool bReinitPose
)

Change the SkeletalMesh that is rendered for this Component.

Public function Virtual

bool

 

ShouldTickPose()

Should tick pose (by calling TickPose) in Tick

: return true if should Tick. false otherwise.

Public function Virtual

bool

 

ShouldUpdateTransform

(
    bool bLODHasChanged
)

Should update transform in Tick

: return true if need transform update. false otherwise.

Public function Virtual

void

 

TickPose

(
    float DeltaTime,
    bool bNeedsValidRootMotion
)

Tick Pose, this function ticks and do whatever it needs to do in this frame, should be called before RefreshBoneTransforms

Public function Virtual

void

 

UnHideBone

(
    int32 BoneIndex
)

Unhides the specified bone.

Public function Virtual

bool

 

UpdateLODStatus()

Update the PredictedLODLevel and MaxDistanceFactor in the component from its MeshObject.

Public function Virtual

void

 

UpdateSlaveComponent()

Update Slave Component. This gets called when MasterPoseComponent!=NULL

Overridden from UPrimitiveComponent

Name Description

Public function Virtual

void

 

AddRadialForce

(
    FVector Origin,
    float Radius,
    float Strength,
    ERadialImpulseFalloff Falloff,
    bool bAccelChange
)

Add a force to all bodies in this component, originating from the supplied world-space location.

Public function Virtual

void

 

AddRadialImpulse

(
    FVector Origin,
    float Radius,
    float Strength,
    ERadialImpulseFalloff Falloff,
    bool bVelChange
)

Add an impulse to all rigid bodies in this component, radiating out from the specified position.

Public function Virtual

float

 

CalculateMass

(
    FName BoneName
)

Returns the calculated mass in kg.

Public function Virtual

bool

 

CanEditSimulatePhysics()

Determines whether or not the simulate physics setting can be edited interactively on this component

Public function Virtual

bool

 

ComponentIsTouchingSelectionBox

(
    const FBox & InSelBBox,
    const FEngineShowFlags & ShowFlags,
    const bool bConsiderOnlyBSP,
    const bool bMustEncompassEntireComp...
)

Determines whether the supplied bounding box intersects with the component.

Public function Virtual

bool

 

ComponentIsTouchingSelectionFrustum

(
    const FConvexVolume & InFrustum,
    const FEngineShowFlags & ShowFlags,
    const bool bConsiderOnlyBSP,
    const bool bMustEncompassEntireComp...
)

Determines whether the supplied frustum intersects with the component.

Protected function Virtual

bool

 

ComponentOverlapComponentImpl

(
    UPrimitiveComponent * PrimComp,
    const FVector Pos,
    const FQuat & Rot,
    const FCollisionQueryParams & Param...
)

Override this method for custom behavior.

Protected function Virtual

bool

 

ComponentOverlapMultiImpl

(
    TArray < struct FOverlapResult >& O...,
    const UWorld * InWorld,
    const FVector & Pos,
    const FQuat & Rot,
    ECollisionChannel TestChannel,
    const FComponentQueryParams & Param...,
    const FCollisionObjectQueryParams &...
)

Test the collision of the supplied component at the supplied location/rotation, and determine the set of components that it overlaps

Public function Virtual

bool

 

DoCustomNavigableGeometryExport

(
    FNavigableGeometryExport & GeomExpo...
)

Collects custom navigable geometry of component.

Public function Virtual

FBodyInstanc ...

 

GetBodyInstance

(
    FName BoneName,
    bool bGetWelded
)

Get a BodyInstance from this component.

Public function Virtual

UBodySetup &...

 

GetBodySetup()

USkeletalMeshComponent

Protected function Virtual

FTransform

 

GetComponentTransformFromBodyInstance

(
    FBodyInstance * UseBI
)

Called to get the Component To World Transform from the Root BodyInstance This needs to be virtual since SkeletalMeshComponent Root has to undo its own transform Without this, the root LocalToAtom is overridden by physics simulation, causing kinematic velocity to accelerate simulation

Public function Virtual

float

 

GetMass()

Returns the mass of this component in kg.

Public function Virtual

bool

 

GetSquaredDistanceToCollision

(
    const FVector & Point,
    float& OutSquaredDistance,
    FVector & OutClosestPointOnCollisio...
)

Returns The square of the distance to closest Body Instance surface.

Public function Virtual

void

 

GetWeldedBodies

(
    TArray < FBodyInstance * >& Out...,
    TArray < FName >& OutLabels,
    bool bIncludingAutoWeld
)

Adds the bodies that are currently welded to the OutWeldedBodies array

Public function Virtual

bool

 

IsAnyRigidBodyAwake()

Returns if any body in this component is currently awake and simulating.

Public function Virtual

bool

 

IsGravityEnabled()

Returns whether this component is affected by gravity.

Public function Virtual

bool

 

LineTraceComponent

(
    FHitResult & OutHit,
    const FVector Start,
    const FVector End,
    const FCollisionQueryParams & Param...
)

Trace a ray against just this component.

true if a hit is found

Public function Virtual

void

 

OnComponentCollisionSettingsChanged()

Called when the BodyInstance ResponseToChannels, CollisionEnabled or bNotifyRigidBodyCollision changes, in case subclasses want to use that information.

Public function Virtual

bool

 

OverlapComponent

(
    const FVector & Pos,
    const FQuat & Rot,
    const FCollisionShape & CollisionSh...
)

Test the collision of the supplied shape at the supplied location, and determine if it overlaps this component.

Public function Virtual

void

 

PutAllRigidBodiesToSleep()

Force all bodies in this component to sleep.

Public function Virtual

void

 

SendRenderDebugPhysics

(
    FPrimitiveSceneProxy * Override...
)

Updates the renderer with the center of mass data

Public function Virtual

void

 

SetAllMassScale

(
    float InMassScale
)

Change the mass scale used fo all bodies in this component

Public function Virtual

void

 

SetAllPhysicsLinearVelocity

(
    FVector NewVel,
    bool bAddToCurrent
)

Set the linear velocity of all bodies in this component.

Public function Virtual

void

 

SetAllPhysicsPosition

(
    FVector NewPos
)

Set the position of all bodies in this component.

Public function Virtual

void

 

SetAllPhysicsRotation

(
    FRotator NewRot
)

Set the rotation of all bodies in this component.

Public function Virtual

void

 

SetAllPhysicsRotation

(
    const FQuat & NewRot
)

Set the rotation of all bodies in this component.

Public function Virtual

void

 

SetCollisionObjectType

(
    ECollisionChannel Channel
)

Set the collision object type on the skeletal mesh

Public function Virtual

void

 

SetEnableGravity

(
    bool bGravityEnabled
)

Enables/disables whether this component is affected by gravity.

Public function Virtual

void

 

SetNotifyRigidBodyCollision

(
    bool bNewNotifyRigidBodyCollision
)

Changes the value of bNotifyRigidBodyCollision

Public function Virtual

void

 

SetPhysMaterialOverride

(
    UPhysicalMaterial * NewPhysMate...
)

Changes the current PhysMaterialOverride for this component.

Public function Virtual

void

 

SetSimulatePhysics

(
    bool bSimulate
)

Sets whether or not a single body should use physics simulation, or should be 'fixed' (kinematic).

Public function Virtual

bool

 

SweepComponent

(
    FHitResult & OutHit,
    const FVector Start,
    const FVector End,
    const FQuat & ShapeWorldRotation,
    const FCollisionShape & CollisionSh...,
    bool bTraceComplex
)

Trace a shape against just this component.

true if a hit is found

Public function Virtual

void

 

UpdateCollisionProfile()

Public function Virtual

void

 

UpdatePhysicsToRBChannels()

WITH_EDITOR.

Public function Virtual

void

 

WakeAllRigidBodies()

Ensure simulation is running for all bodies in this component.

Overridden from USceneComponent

Name Description

Public function Virtual

FBoxSphereBo ...

 

CalcBounds

(
    const FTransform & LocalToWorld
)

Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size.

Public function Virtual

const bool

 

CanHaveStaticMobility()

Skeletal mesh component should not be able to have its mobility set to static

Public function Virtual

bool

 

IsAnySimulatingPhysics()

Returns whether the specified body is currently using physics simulation

Protected function Virtual

bool

 

MoveComponentImpl

(
    const FVector & Delta,
    const FQuat & NewRotation,
    bool bSweep,
    FHitResult * OutHit,
    EMoveComponentFlags MoveFlags,
    ETeleportType Teleport
)

Begin USceneComponent Interface.

Public function Virtual

void

 

OnUpdateTransform

(
    EUpdateTransformFlags UpdateTransfo...,
    ETeleportType Teleport
)

Public function Virtual

void

 

UpdateOverlaps

(
    TArray < FOverlapInfo > const* ...,
    bool bDoNotifies,
    const TArray < FOverlapInfo >* ...
)

Queries world and updates overlap tracking state for this component.

Overridden from UActorComponent

Name Description

Public function Virtual

void

 

BeginPlay()

Used to detach physics objects before simulation begins.

Public function Virtual

void

 

InitializeComponent()

Initializes the component.

Protected function Virtual

void

 

OnCreatePhysicsState()

Physics.

Protected function Virtual

void

 

OnDestroyPhysicsState()

Used to shut down and physics engine structure for this component

Protected function Virtual

void

 

OnRegister()

WITH_EDITOR.

Protected function Virtual

void

 

OnUnregister()

Called when a component is unregistered.

Protected function Virtual

void

 

RegisterComponentTickFunctions

(
    bool bRegister
)

Virtual call chain to register all tick functions

Protected function Virtual

bool

 

ShouldCreatePhysicsState()

Return true if CreatePhysicsState() should be called.

Public function Virtual

void

 

TickComponent

(
    float DeltaTime,
    enum ELevelTick TickType,
    FActorComponentTickFunction * T...
)

Function called every frame on this ActorComponent.

Overridden from UObject

Name Description

Public function Virtual

void

 

GetResourceSizeEx

(
    FResourceSizeEx & CumulativeResourc...
)

WITH_EDITOR.

Public function Virtual

void

 

LoadedFromAnotherClass

(
    const FName & OldClassName
)

Called when the object was loaded from another class via active class redirects.

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent & PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

Serialize

(
    FArchive & Ar
)

UObject interface Override to have counting working better

Classes

Name

Description

Public struct

FPendingRadialForces

Typedefs

See Also

References

Module

Engine

Header

Runtime/Engine/Classes/Components/SkeletalMeshComponent.h