Header <Components/SkeletalMeshComponent.h>

#include "Components/SkeletalMeshComponent.h"
Module: Engine Source: Engine/Source/Runtime/Engine/Classes/Components/SkeletalMeshComponent.h

Includes 20

<CoreMinimal.h>
<UObject/ObjectMacros.h>
<Engine/EngineTypes.h>
<Engine/EngineBaseTypes.h>
<Components/SceneComponent.h>
<EngineDefines.h>
<CollisionQueryParams.h>
<Interfaces/Interface_CollisionDataProvider.h>
<Animation/AnimationAsset.h>
<Animation/AnimCurveTypes.h>
<Components/SkinnedMeshComponent.h>
<ClothSimData.h>
<SingleAnimationPlayData.h>
<Animation/PoseSnapshot.h>
<ClothingSystemRuntimeTypes.h>
<ClothingSimulationInterface.h>
<ClothingSimulationFactory.h>
<Animation/AttributesRuntime.h>
<Chaos/Serialization/SerializedDataBuffer.h>
<Engine/PoseWatchRenderData.h>

Contents

USkeletalMeshComponent
SkeletalMeshComponent is used to create an instance of an animated SkeletalMesh asset.
(uclass class : USkinnedMeshComponent)

class USkeletalMeshComponent

class USkeletalMeshComponent : public USkinnedMeshComponent, public IInterface_CollisionDataProviderUCLASSBlueprintableClassGroup=(Rendering, Common)hidecategories=(Object, Mesh|SkeletalAsset)config=EngineeditinlinenewMinimalAPI
SkeletalMeshComponent is used to create an instance of an animated SkeletalMesh asset.

Member functions 322

SetSkeletalMeshAsset
void SetSkeletalMeshAsset(USkeletalMesh* NewMesh);UFUNCTIONBlueprintCallableCategory=Components|SkeletalMesh
Set the SkeletalMesh rendered for this mesh.
GetSkeletalMeshAsset
USkeletalMesh* GetSkeletalMeshAsset() const;UFUNCTIONBlueprintPureCategory=Components|SkeletalMesh
Get the SkeletalMesh rendered for this mesh.
RefreshSkeletalMeshAsset
void RefreshSkeletalMeshAsset();
Sets the SkeletalMeshAsset to the current SkeletalMesh.
GetSharedRequiredBones
TSharedPtr<struct FBoneContainer> GetSharedRequiredBones();
Gets the shared bone container used between all owned anim instances. Creates it on the first call.
GetPostProcessAnimBPClassToBeUsed
TSubclassOf<UAnimInstance> GetPostProcessAnimBPClassToBeUsed() const;
Get the post-processing AnimBP to be used for this skeletal mesh component. In case an override post-processing AnimBP is set, it will always return the AnimBP class of that. Otherwise the one set in skeletal mesh…
SetOverridePostProcessAnimBP
void SetOverridePostProcessAnimBP(TSubclassOf<UAnimInstance> InPostProcessAnimBlueprint, bool ReinitAnimInstances = true);UFUNCTIONBlueprintCallableCategory=Components|SkeletalMesh
Set the post-processing AnimBP to be used for this skeletal mesh component. In case an override post-processing AnimBP is set, the one set in skeletal mesh asset will be ignored and not used.
ToggleDisablePostProcessBlueprint
void ToggleDisablePostProcessBlueprint();UFUNCTIONBlueprintCallableCategory=Components|SkeletalMesh
Toggles whether the post process blueprint will run for this component
GetDisablePostProcessBlueprint
bool GetDisablePostProcessBlueprint() const;UFUNCTION
Gets whether the post process blueprint is currently disabled for this component
SetDisablePostProcessBlueprint
void SetDisablePostProcessBlueprint(bool bInDisablePostProcess);UFUNCTION
Sets whether the post process blueprint is currently running for this component. If it is not currently running, and is set to run, the instance will be reinitialized
GetBoneSpaceTransforms
TArray<FTransform> GetBoneSpaceTransforms();
this is explicit copy because this buffer is reused during evaluation we want to have reference and emptied during evaluation
GetBoneSpaceTransformsView
TArrayView<const FTransform> GetBoneSpaceTransformsView();
Get the bone space transforms as array view.
GetCachedComponentSpaceTransforms
const TArray<FTransform>& GetCachedComponentSpaceTransforms() const;
Access cached component space transforms
GetFloatAttribute_Ref
bool GetFloatAttribute_Ref(const FName& BoneName, const FName& AttributeName, UPARAM(ref) float& OutValue, ECustomBoneAttributeLookup LookupType = ECustomBoneAttributeLookup::BoneOnly);UFUNCTIONBlueprintCallableCategory=CustomAttributes
Get float type attribute value.
GetTransformAttribute_Ref
bool GetTransformAttribute_Ref(const FName& BoneName, const FName& AttributeName, UPARAM(ref) FTransform& OutValue, ECustomBoneAttributeLookup LookupType = ECustomBoneAttributeLookup::BoneOnly);UFUNCTIONBlueprintCallableCategory=CustomAttributes
Get FTransform type attribute value.
GetIntegerAttribute_Ref
bool GetIntegerAttribute_Ref(const FName& BoneName, const FName& AttributeName, UPARAM(ref) int32& OutValue, ECustomBoneAttributeLookup LookupType = ECustomBoneAttributeLookup::BoneOnly);UFUNCTIONBlueprintCallableCategory=CustomAttributes
Get integer type attribute value.
GetStringAttribute_Ref
bool GetStringAttribute_Ref(const FName& BoneName, const FName& AttributeName, UPARAM(ref) FString& OutValue, ECustomBoneAttributeLookup LookupType = ECustomBoneAttributeLookup::BoneOnly);UFUNCTIONBlueprintCallableCategory=CustomAttributes
Get string type attribute value.
GetFloatAttribute
bool GetFloatAttribute(const FName& BoneName, const FName& AttributeName, float DefaultValue, float& OutValue, ECustomBoneAttributeLookup LookupType = ECustomBoneAttributeLookup::BoneOnly);UFUNCTIONBlueprintCallableCategory=CustomAttributes
Get float type attribute value.
GetTransformAttribute
bool GetTransformAttribute(const FName& BoneName, const FName& AttributeName, FTransform DefaultValue, FTransform& OutValue, ECustomBoneAttributeLookup LookupType = ECustomBoneAttributeLookup::BoneOnly);UFUNCTIONBlueprintCallableCategory=CustomAttributes
Get FTransform type attribute value.
GetIntegerAttribute
bool GetIntegerAttribute(const FName& BoneName, const FName& AttributeName, int32 DefaultValue, int32& OutValue, ECustomBoneAttributeLookup LookupType = ECustomBoneAttributeLookup::BoneOnly);UFUNCTIONBlueprintCallableCategory=CustomAttributes
Get integer type attribute value.
GetStringAttribute
bool GetStringAttribute(const FName& BoneName, const FName& AttributeName, FString DefaultValue, FString& OutValue, ECustomBoneAttributeLookup LookupType = ECustomBoneAttributeLookup::BoneOnly);UFUNCTIONBlueprintCallableCategory=CustomAttributes
Get string type attribute value.
GetCurveValue
bool GetCurveValue(FName CurveName, float DefaultValue, float& Value) const;UFUNCTIONBlueprintCallableCategory=Curve
Get curve value
GetAnimCurves
const FBlendedHeapCurve& GetAnimCurves() const;
Get the current set of curve values
FindAttributeChecked
template<typename DataType, typename CustomAttributeType> bool FindAttributeChecked(const FName& BoneName, const FName& AttributeName, DataType DefaultValue, DataType& OutValue, ECustomBoneAttributeLookup LookupType);protected
Templated version to try and retrieve a typed bone attribute's value
CreateBodySetup
void CreateBodySetup();
SendRenderDebugPhysics
virtual void SendRenderDebugPhysics(FPrimitiveSceneProxy* OverrideSceneProxy = nullptr) override;
GetPendingRadialForces
const TArray<FPendingRadialForces>& GetPendingRadialForces() const;
GetAnimClass
class UClass* GetAnimClass();UFUNCTION
Get the anim instance class via getter callable by sequencer.
SetAnimInstanceClass
virtual void SetAnimInstanceClass(class UClass* NewClass);UFUNCTIONBlueprintCallableCategory=Components|SkeletalMesh
Set the anim instance class. Clears and re-initializes the anim instance with the new class and sets animation mode to 'AnimationBlueprint'
SetEnableAnimation
void SetEnableAnimation(bool bNewEnableAnimation);UFUNCTIONBlueprintCallableCategory=Components|SkeletalMesh
Whether the built-in animation of this component should run when the component ticks. See USkeletalMeshComponent::bEnableAnimation for more details. Note that this call defers setting the flag to the end of the frame…
GetAnimInstance
class UAnimInstance * GetAnimInstance() const;UFUNCTIONBlueprintCallableCategory=Components|SkeletalMesh
Returns the animation instance that is driving the class (if available). This is typically an instance of the class set as AnimBlueprintGeneratedClass (generated by an animation blueprint) Since this instance is…
GetPostProcessInstance
UAnimInstance* GetPostProcessInstance() const;UFUNCTIONBlueprintCallableCategory=Components|SkeletalMesh
Returns the active post process instance is one is available. This is set on the mesh that this component is using, and is evaluated immediately after the main instance.
GetLinkedAnimInstances
const TArray<UAnimInstance*>& GetLinkedAnimInstances() const;
Get the anim instances linked to the main AnimScriptInstance
AllowQueuedAnimEventsNextDispatch
void AllowQueuedAnimEventsNextDispatch();
If true, next time that ConditionallyDispatchQueuedAnimEvents() is called it will trigger any queued anim notifies available.
GetLinkedAnimGraphInstanceByTag
UAnimInstance* GetLinkedAnimGraphInstanceByTag(FName InTag) const;UFUNCTIONBlueprintPureCategory=Components|SkeletalMesh|Animation Blueprint Linking
Returns the a tagged linked instance node. If no linked instances are found or none are tagged with the supplied name, this will return NULL.
LinkAnimGraphByTag
void LinkAnimGraphByTag(FName InTag, TSubclassOf<UAnimInstance> InClass);UFUNCTIONBlueprintCallableCategory=Components|SkeletalMesh|Animation Blueprint Linking
Runs through all nodes, attempting to find linked instance by name/tag, then sets the class of each node if the tag matches
LinkAnimClassLayers
void LinkAnimClassLayers(TSubclassOf<UAnimInstance> InClass);UFUNCTIONBlueprintCallableCategory=Components|SkeletalMesh|Animation Blueprint Linking
Runs through all layer nodes, attempting to find layer nodes that are implemented by the specified class, then sets up a linked instance of the class for each. Allocates one linked instance to run each of the groups…
UnlinkAnimClassLayers
void UnlinkAnimClassLayers(TSubclassOf<UAnimInstance> InClass);UFUNCTIONBlueprintCallableCategory=Components|SkeletalMesh|Animation Blueprint Linking
Runs through all layer nodes, attempting to find layer nodes that are currently running the specified class, then resets each to its default value. State sharing rules are as with SetLayerOverlay. If InClass is null,…
GetLinkedAnimLayerInstanceByGroup
UAnimInstance* GetLinkedAnimLayerInstanceByGroup(FName InGroup) const;UFUNCTIONBlueprintPureCategory=Components|SkeletalMesh|Animation Blueprint Linking
Gets the layer linked instance corresponding to the specified group
GetLinkedAnimLayerInstanceByClass
UAnimInstance* GetLinkedAnimLayerInstanceByClass(TSubclassOf<UAnimInstance> InClass) const;UFUNCTIONBlueprintPureCategory=Components|SkeletalMesh|Animation Blueprint Linking
Gets the first layer linked instance corresponding to the specified class
ForEachAnimInstance
void ForEachAnimInstance(TFunctionRef<void(UAnimInstance*)> InFunction);
Calls a function on each of the anim instances that this mesh component hosts, including linked and post-process instances
HasValidAnimationInstance
bool HasValidAnimationInstance() const;UFUNCTIONBlueprintPureCategory=Components|SkeletalMesh
Returns whether there are any valid instances to run, currently this means whether we have have an animation instance or a post process instance available to process.
ResetAnimInstanceDynamics
void ResetAnimInstanceDynamics(ETeleportType InTeleportType = ETeleportType::ResetPhysics);UFUNCTIONBlueprintCallableCategory=Components|SkeletalMesh
Informs any active anim instances (main instance, linked instances, post instance) that a dynamics reset is required for example if a teleport occurs.
SetAnimationMode
void SetAnimationMode(EAnimationMode::Type InAnimationMode, bool bForceInitAnimScriptInstance = true);UFUNCTIONBlueprintCallableCategory=Components|Animation
Below are the interface to control animation when animation mode, not blueprint mode
GetAnimationMode
EAnimationMode::Type GetAnimationMode() const;UFUNCTIONBlueprintPureCategory=Components|Animation
PlayAnimation
void PlayAnimation(class UAnimationAsset* NewAnimToPlay, bool bLooping);UFUNCTIONBlueprintCallableCategory=Components|Animation
Animation play functions
SetAnimation
void SetAnimation(class UAnimationAsset* NewAnimToPlay);UFUNCTIONBlueprintCallableCategory=Components|Animation
Animation play functions
Play
void Play(bool bLooping);UFUNCTIONBlueprintCallableCategory=Components|Animation
Animation play functions
Stop
void Stop();UFUNCTIONBlueprintCallableCategory=Components|Animation
Animation play functions
IsPlaying
bool IsPlaying() const;UFUNCTIONBlueprintCallableCategory=Components|Animation
Animation play functions
SetPosition
void SetPosition(float InPos, bool bFireNotifies = true);UFUNCTIONBlueprintCallableCategory=Components|Animation
Animation play functions
GetPosition
float GetPosition() const;UFUNCTIONBlueprintCallableCategory=Components|Animation
Animation play functions
SetPlayRate
void SetPlayRate(float Rate);UFUNCTIONBlueprintCallableCategory=Components|Animation
Animation play functions
GetPlayRate
float GetPlayRate() const;UFUNCTIONBlueprintCallableCategory=Components|Animation
Animation play functions
OverrideAnimationData
void OverrideAnimationData(UAnimationAsset* InAnimToPlay, bool bIsLooping = true, bool bIsPlaying = true, float Position = 0.f, float PlayRate = 1.f);UFUNCTIONBlueprintCallableCategory=Components|Animation
This overrides current AnimationData parameter in the SkeletalMeshComponent. This will serialize when the component serialize so it can be used during construction script. However note that this will override current…
SetMorphTarget
void SetMorphTarget(FName MorphTargetName, float Value, bool bRemoveZeroWeight=true);UFUNCTIONBlueprintCallableCategory=Components|SkeletalMesh
Set Morph Target with Name and Value(0-1)
ClearMorphTargets
void ClearMorphTargets();UFUNCTIONBlueprintCallableCategory=Components|SkeletalMesh
Clear all Morph Target that are set to this mesh
GetMorphTarget
float GetMorphTarget(FName MorphTargetName) const;UFUNCTIONBlueprintCallableCategory=Components|SkeletalMesh
Get Morph target with given name
SnapshotPose
void SnapshotPose(UPARAM(ref) FPoseSnapshot& Snapshot);UFUNCTIONBlueprintCallableCategory=Components|SkeletalMesh
Takes a snapshot of this skeletal mesh component's pose and saves it to the specified snapshot. The snapshot is taken at the current LOD, so if for example you took the snapshot at LOD1 and then used it at LOD0 any…
SetAllowClothActors
void SetAllowClothActors(bool bInAllow);UFUNCTIONBlueprintCallableCategory=Components|SkeletalMesh
Sets whether cloth assets should be created/simulated in this component. This will update the conditional flag and you will want to call RecreateClothingActors for it to take effect.
GetAllowClothActors
bool GetAllowClothActors() const;UFUNCTIONBlueprintCallableCategory=Components|SkeletalMesh
GetClothMaxDistanceScale
float GetClothMaxDistanceScale() const;UFUNCTIONBlueprintCallableCategory=Clothing
Get/Set the max distance scale of clothing mesh vertices
SetClothMaxDistanceScale
void SetClothMaxDistanceScale(float Scale);UFUNCTIONBlueprintCallableCategory=Clothing
ForceClothNextUpdateTeleport
void ForceClothNextUpdateTeleport();UFUNCTIONBlueprintCallableCategory=Clothing
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.
ForceClothNextUpdateTeleportAndReset
void ForceClothNextUpdateTeleportAndReset();UFUNCTIONBlueprintCallableCategory=Clothing
Used to indicate we should force 'teleport and reset' during the next call to UpdateClothState. This can be used to reset it from a bad state or by a teleport where the old state is not important anymore.
SuspendClothingSimulation
void SuspendClothingSimulation();UFUNCTIONBlueprintCallableCategory=Clothing
Stops simulating clothing, but does not show clothing ref pose. Keeps the last known simulation state
ResumeClothingSimulation
void ResumeClothingSimulation();UFUNCTIONBlueprintCallableCategory=Clothing
Resumes a previously suspended clothing simulation, teleporting the clothing on the next tick
IsClothingSimulationSuspended
bool IsClothingSimulationSuspended() const;UFUNCTIONBlueprintCallableCategory=Clothing
Gets whether or not the clothing simulation is currently suspended
ResetClothTeleportMode
void ResetClothTeleportMode();UFUNCTIONBlueprintCallableCategory=Clothing
Reset the teleport mode of a next update to 'Continuous'
BindClothToLeaderPoseComponent
void BindClothToLeaderPoseComponent();UFUNCTIONBlueprintCallableCategory=Clothing
If this component has a valid LeaderPoseComponent then this function makes cloth items on the follower component take the transforms of the cloth items on the leader component instead of simulating separately.
UnbindClothFromLeaderPoseComponent
void UnbindClothFromLeaderPoseComponent(bool bRestoreSimulationSpace = true);UFUNCTIONBlueprintCallableCategory=Clothing
If this component has a valid LeaderPoseComponent and has previously had its cloth bound to the MCP, this function will unbind the cloth and resume simulation.
SetAllowRigidBodyAnimNode
void SetAllowRigidBodyAnimNode(bool bInAllow, bool bReinitAnim = true);UFUNCTIONBlueprintCallableCategory=Components|SkeletalMesh
Sets whether or not to allow rigid body animation nodes for this component
GetAllowRigidBodyAnimNode
bool GetAllowRigidBodyAnimNode() const;UFUNCTIONBlueprintCallableCategory=Components|SkeletalMesh
SetUpdateAnimationInEditor
void SetUpdateAnimationInEditor(const bool NewUpdateState);UFUNCTIONBlueprintCallableCategory=Components|SkeletalMesh
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
SetUpdateClothInEditor
void SetUpdateClothInEditor(const bool NewUpdateState);UFUNCTIONBlueprintCallableCategory=Components|SkeletalMesh
Sets whether or not to animate cloth in the editor. Requires Update Animation In Editor to also be true. This is supported only in the editor
SetAllowAnimCurveEvaluation
void SetAllowAnimCurveEvaluation(bool bInAllow);UFUNCTIONBlueprintCallableCategory=Components|SkeletalMesh
GetAllowedAnimCurveEvaluate
bool GetAllowedAnimCurveEvaluate() const;UFUNCTIONBlueprintCallableCategory=Components|SkeletalMesh
AllowAnimCurveEvaluation
void AllowAnimCurveEvaluation(FName NameOfCurve, bool bAllow);UFUNCTIONBlueprintCallableCategory=Components|SkeletalMesh
ResetAllowedAnimCurveEvaluation
void ResetAllowedAnimCurveEvaluation();UFUNCTIONBlueprintCallableCategory=Components|SkeletalMesh
By reset, it will allow all the curves to be evaluated
SetAllowedAnimCurvesEvaluation
void SetAllowedAnimCurvesEvaluation(const TArray<FName>& List, bool bAllow);UFUNCTIONBlueprintCallableCategory=Components|SkeletalMesh
resets, and then only allow the following list to be allowed/disallowed
GetCurveFilterSettings
UE::Anim::FCurveFilterSettings GetCurveFilterSettings(int32 InLODOverride = INDEX_NONE) const;
Get the curve settings that will be used for anim evaluation.
SkelMeshCompOnParticleSystemFinished
virtual void SkelMeshCompOnParticleSystemFinished(class UParticleSystemComponent* PSC);
We detach the Component once we are done playing it.
GetSingleNodeInstance
class UAnimSingleNodeInstance * GetSingleNodeInstance() const;
InitializeAnimScriptInstance
bool InitializeAnimScriptInstance(bool bForceReinit = true, bool bInDeferRootNodeInitialization = false);
IsWindEnabled
virtual bool IsWindEnabled() const;
SetRootBodyIndex
void SetRootBodyIndex(int32 InBodyIndex);
Set Root Body Index
ResetRootBodyIndex
void ResetRootBodyIndex();
Reset Root Body Index
GetTeleportRotationThreshold
float GetTeleportRotationThreshold() const;UFUNCTIONCategory=Clothing
Gets the teleportation rotation threshold.
SetTeleportRotationThreshold
void SetTeleportRotationThreshold(float Threshold);UFUNCTIONCategory=Clothing
Sets the teleportation rotation threshold.
GetTeleportDistanceThreshold
float GetTeleportDistanceThreshold() const;UFUNCTIONCategory=Clothing
Gets the teleportation distance threshold.
SetTeleportDistanceThreshold
void SetTeleportDistanceThreshold(float Threshold);UFUNCTIONCategory=Clothing
Sets the teleportation distance threshold.
PoseTickedThisFrame
bool PoseTickedThisFrame() const;
Checked whether we have already ticked the pose this frame
IsClothBoundToLeaderComponent
bool IsClothBoundToLeaderComponent() const;
GetClothingSimulation
const IClothingSimulation* GetClothingSimulation() const;
IClothingSimulation* GetClothingSimulation();
Get the current clothing simulation (read only)
GetClothingSimulationContext
const IClothingSimulationContext* GetClothingSimulationContext() const;
IClothingSimulationContext* GetClothingSimulationContext();
Get the current clothing simulation context (read only)
GetClothingSimulationInteractor
UClothingSimulationInteractor* GetClothingSimulationInteractor() const;UFUNCTIONBlueprintCallableCategory=Clothing
Get the current interactor for a clothing simulation, if the current simulation supports runtime interaction.
CompleteParallelClothSimulation
void CompleteParallelClothSimulation();
Callback when the parallel clothing task finishes, copies needed data back to component for gamethread
GetCurrentClothingData_GameThread
const TMap<int32, FClothSimulData>& GetCurrentClothingData_GameThread() const;
Get the current simulation data map for the clothing on this component. For use on the game thread and only valid if bWaitForParallelClothTask is true.
GetCurrentClothingData_AnyThread
const TMap<int32, FClothSimulData>& GetCurrentClothingData_AnyThread() const;
Get the current simulation data map for the clothing on this component. This will stall until the cloth simulation is complete.
WaitForExistingParallelClothSimulation_GameThread
void WaitForExistingParallelClothSimulation_GameThread();
Stalls on any currently running clothing simulations.
GetMorphTargetCurves
const TMap<FName, float>& GetMorphTargetCurves() const;
InitAnim
virtual void InitAnim(bool bForceReinit);
Animation
ShouldOnlyTickMontages
bool ShouldOnlyTickMontages(const float DeltaTime) const;
If VisibilityBasedAnimTickOption == EVisibilityBasedAnimTickOption::OnlyTickMontagesWhenNotRendered Should we tick Montages only?
ShouldOnlyTickMontagesAndRefreshBones
bool ShouldOnlyTickMontagesAndRefreshBones(const float DeltaTime) const;
ShouldTickAnimation
bool ShouldTickAnimation() const;
TickAnimation
void TickAnimation(float DeltaTime, bool bNeedsValidRootMotion);
Tick Animation system
TickAnimInstances
void TickAnimInstances(float DeltaTime, bool bNeedsValidRootMotion);
Tick all of our anim instances (linked instances, main instance and post process)
TickClothing
void TickClothing(float DeltaTime, FTickFunction& ThisTickFunction);
Tick Clothing Animation , basically this is called inside TickComponent
GetUpdateClothSimulationData_AnyThread
virtual void GetUpdateClothSimulationData_AnyThread(TMap<int32, FClothSimulData>& OutClothSimulData, FMatrix& OutLocalToWorld, float& OutClothBlendWeight) const override;
Store cloth simulation data into OutClothSimulData. Override USkinnedMeshComponent.
RemoveAllClothingActors
void RemoveAllClothingActors();
Remove clothing actors from their simulation
ReleaseAllClothingResources
void ReleaseAllClothingResources();
Remove all clothing actors from their simulation and clear any other necessary clothing data to leave the simulations in a clean state
DebugDrawClothing
void DebugDrawClothing(FPrimitiveDrawInterface* PDI);
Draw the currently clothing state, using the editor extender interface
DebugDrawClothingTexts
void DebugDrawClothingTexts(FCanvas* Canvas, const FSceneView* SceneView);
Draw the currently clothing state, using the editor extender interface
SetNotifyRigidBodyCollision
virtual void SetNotifyRigidBodyCollision(bool bNewNotifyRigidBodyCollision) override;
Changes the value of bNotifyRigidBodyCollision
SetBodyNotifyRigidBodyCollision
virtual void SetBodyNotifyRigidBodyCollision(bool bNewNotifyRigidBodyCollision, FName BoneName = NAME_None);UFUNCTIONBlueprintCallableCategory=Physics
Changes the value of bNotifyRigidBodyCollision for a given body
SetNotifyRigidBodyCollisionBelow
virtual void SetNotifyRigidBodyCollisionBelow(bool bNewNotifyRigidBodyCollision, FName BoneName = NAME_None, bool bIncludeSelf = true);UFUNCTIONBlueprintCallableCategory=Physics
Changes the value of bNotifyRigidBodyCollision on all bodies below a given bone
RecalcRequiredBones
void RecalcRequiredBones(int32 LODIndex);
Recalculates the RequiredBones array in this SkeletalMeshComponent based on current SkeletalMesh, LOD and PhysicsAsset. Is called when bRequiredBonesUpToDate = false
ComputeRequiredBones
void ComputeRequiredBones(TArray<FBoneIndexType>& OutRequiredBones, TArray<FBoneIndexType>& OutFillComponentSpaceTransformsRequiredBones, int32 LODIndex, bool bIgnorePhysicsAsset) const;
Computes the required bones in this SkeletalMeshComponent based on current SkeletalMesh, LOD and PhysicsAsset
RecalcRequiredCurves
void RecalcRequiredCurves();
Recalculates the AnimCurveUids array in RequiredBone of this SkeletalMeshComponent based on current required bone set Is called when Skeleton->IsRequiredCurvesUpToDate() = false
Serialize
virtual void Serialize(FArchive& Ar) override;
PostLoad
virtual void PostLoad() override;
PostInitProperties
virtual void PostInitProperties() override;
PostMigrate
virtual void PostMigrate(const struct FUObjectMigrationContext& MigrationContext) override;
GetResourceSizeEx
virtual void GetResourceSizeEx(FResourceSizeEx& CumulativeResourceSize) override;
HasValidPhysicsState
virtual bool HasValidPhysicsState() const override;
OnRegister
virtual void OnRegister() override;protected
OnUnregister
virtual void OnUnregister() override;protected
ShouldCreatePhysicsState
virtual bool ShouldCreatePhysicsState() const override;protected
OnCreatePhysicsState
virtual void OnCreatePhysicsState() override;protected
OnDestroyPhysicsState
virtual void OnDestroyPhysicsState() override;protected
SendRenderDynamicData_Concurrent
virtual void SendRenderDynamicData_Concurrent() override;protected
RegisterComponentTickFunctions
virtual void RegisterComponentTickFunctions(bool bRegister) override;protected
InitializeComponent
virtual void InitializeComponent() override;
TickComponent
virtual void TickComponent(float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override;
BeginPlay
virtual void BeginPlay() override;
SetComponentTickEnabled
virtual void SetComponentTickEnabled(bool bEnabled) override;
OnComponentDestroyed
virtual void OnComponentDestroyed(bool bDestroyingHierarchy) override;
RegisterEndPhysicsTick
virtual void RegisterEndPhysicsTick(bool bRegister);
Handle registering our end physics tick function
RequiresPreEndOfFrameSync
virtual bool RequiresPreEndOfFrameSync() const override;
OnPreEndOfFrameSync
virtual void OnPreEndOfFrameSync() override;
RegisterClothTick
void RegisterClothTick(bool bRegister);
Handle registering our pre cloth tick function
CalcBounds
virtual FBoxSphereBounds CalcBounds(const FTransform& LocalToWorld) const override;
IsAnySimulatingPhysics
virtual bool IsAnySimulatingPhysics() const override;
OnUpdateTransform
virtual void OnUpdateTransform(EUpdateTransformFlags UpdateTransformFlags, ETeleportType Teleport = ETeleportType::None) override;
UpdateOverlapsImpl
virtual bool UpdateOverlapsImpl(const TOverlapArrayView* PendingOverlaps=NULL, bool bDoNotifies=true, const TOverlapArrayView* OverlapsAtEndLocation=NULL) override;
ComponentOverlapMultiImpl
virtual bool ComponentOverlapMultiImpl(TArray<struct FOverlapResult>& OutOverlaps, const class UWorld* InWorld, const FVector& Pos, const FQuat& Rot, ECollisionChannel TestChannel, const struct FComponentQueryParams& Params, const struct FCollisionObjectQueryParams& ObjectQueryParams = FCollisionObjectQueryParams::DefaultObjectQueryParam) const override;protected
Test the collision of the supplied component at the supplied location/rotation, and determine the set of components that it overlaps
ComponentOverlapComponentImpl
virtual bool ComponentOverlapComponentImpl(class UPrimitiveComponent* PrimComp, const FVector Pos, const FQuat& Quat, const FCollisionQueryParams& Params) override;protected
MoveComponentImpl
virtual bool MoveComponentImpl(const FVector& Delta, const FQuat& NewRotation, bool bSweep, FHitResult* OutHit = NULL, EMoveComponentFlags MoveFlags = MOVECOMP_NoFlags, ETeleportType Teleport = ETeleportType::None) override;protected
GetBodySetup
virtual class UBodySetup* GetBodySetup() override;
CanEditSimulatePhysics
virtual bool CanEditSimulatePhysics() override;
IsSimulatingPhysics
virtual bool IsSimulatingPhysics(FName BoneName = NAME_None) const override;
GetBodyInstance
virtual FBodyInstance* GetBodyInstance(FName BoneName = NAME_None, bool bGetWelded = true, int32 Index = INDEX_NONE) const override;
UpdatePhysicsToRBChannels
virtual void UpdatePhysicsToRBChannels() override;
SetAllPhysicsAngularVelocityInRadians
virtual void SetAllPhysicsAngularVelocityInRadians(FVector const& NewVel, bool bAddToCurrent = false) override;
SetAllPhysicsPosition
virtual void SetAllPhysicsPosition(FVector NewPos) override;
SetAllPhysicsRotation
virtual void SetAllPhysicsRotation(FRotator NewRot) override;
virtual void SetAllPhysicsRotation(const FQuat& NewRot) override;
WakeAllRigidBodies
virtual void WakeAllRigidBodies() override;
PutAllRigidBodiesToSleep
virtual void PutAllRigidBodiesToSleep() override;
IsAnyRigidBodyAwake
virtual bool IsAnyRigidBodyAwake() override;
SetEnableGravity
virtual void SetEnableGravity(bool bGravityEnabled);
IsGravityEnabled
virtual bool IsGravityEnabled() const override;
OnComponentCollisionSettingsChanged
virtual void OnComponentCollisionSettingsChanged(bool bUpdateOverlaps=true) override;
SetPhysMaterialOverride
virtual void SetPhysMaterialOverride(UPhysicalMaterial* NewPhysMaterial) override;
GetSquaredDistanceToCollision
virtual bool GetSquaredDistanceToCollision(const FVector& Point, float& OutSquaredDistance, FVector& OutClosestPointOnCollision) const override;
SetEnableBodyGravity
void SetEnableBodyGravity(bool bEnableGravity, FName BoneName);UFUNCTIONBlueprintCallableCategory=Physics
Enables or disables gravity for the given bone. NAME_None indicates the root body will be edited. If the bone name given is otherwise invalid, nothing happens.
IsBodyGravityEnabled
bool IsBodyGravityEnabled(FName BoneName);UFUNCTIONBlueprintCallableCategory=Physics
Checks whether or not gravity is enabled on the given bone. NAME_None indicates the root body should be queried. If the bone name given is otherwise invalid, false is returned.
SetEnableGravityOnAllBodiesBelow
void SetEnableGravityOnAllBodiesBelow(bool bEnableGravity, FName BoneName, bool bIncludeSelf=true);UFUNCTIONBlueprintCallableCategory=Physics
Enables or disables gravity to all bodies below the given bone. NAME_None indicates all bodies will be edited. In that case, consider using UPrimitiveComponent::EnableGravity.
GetClosestPointOnPhysicsAsset
bool GetClosestPointOnPhysicsAsset(const FVector& WorldPosition, FClosestPointOnPhysicsAsset& ClosestPointOnPhysicsAsset, bool bApproximate) const;
Given a world position, find the closest point on the physics asset. Note that this is independent of collision and welding. This is based purely on animation position
K2_GetClosestPointOnPhysicsAsset
bool K2_GetClosestPointOnPhysicsAsset(const FVector& WorldPosition, FVector& ClosestWorldPosition, FVector& Normal, FName& BoneName, float& Distance) const;UFUNCTIONBlueprintCallableCategory=Components|SkeletalMesh
Given a world position, find the closest point on the physics asset. Note that this is independent of collision and welding. This is based purely on animation position
LineTraceComponent
virtual bool LineTraceComponent(FHitResult& OutHit, const FVector Start, const FVector End, const FCollisionQueryParams& Params) override;
SweepComponent
virtual bool SweepComponent(FHitResult& OutHit, const FVector Start, const FVector End, const FQuat& ShapRotation, const FCollisionShape& CollisionShape, bool bTraceComplex=false) override;
Trace a shape against just this component. Will trace against each body, returning as soon as any collision is found. Note that this collision may not be the closest.
OverlapComponent
virtual bool OverlapComponent(const FVector& Pos, const FQuat& Rot, const FCollisionShape& CollisionShape) const override;
SetSimulatePhysics
virtual void SetSimulatePhysics(bool bEnabled) override;
AddRadialImpulse
virtual void AddRadialImpulse(FVector Origin, float Radius, float Strength, ERadialImpulseFalloff Falloff, bool bVelChange=false) override;
AddRadialForce
virtual void AddRadialForce(FVector Origin, float Radius, float Strength, ERadialImpulseFalloff Falloff, bool bAccelChange=false) override;
SetAllPhysicsLinearVelocity
virtual void SetAllPhysicsLinearVelocity(FVector NewVel,bool bAddToCurrent = false) override;
SetAllMassScale
virtual void SetAllMassScale(float InMassScale = 1.f) override;
GetMass
virtual float GetMass() const override;
SetAllUseCCD
virtual void SetAllUseCCD(bool InUseCCD) override;
GetBoneMass
float GetBoneMass(FName BoneName = NAME_None, bool bScaleMass = true) const;UFUNCTIONBlueprintCallableCategory=Physics
Returns the mass (in kg) of the given bone
GetSkeletalCenterOfMass
FVector GetSkeletalCenterOfMass() const;UFUNCTIONBlueprintCallableCategory=Physics
Returns the center of mass of the skeletal mesh, instead of the root body's location
CalculateMass
virtual float CalculateMass(FName BoneName = NAME_None) override;
DoCustomNavigableGeometryExport
virtual bool DoCustomNavigableGeometryExport(FNavigableGeometryExport& GeomExport) const override;
AddForceToAllBodiesBelow
virtual void AddForceToAllBodiesBelow(FVector Force, FName BoneName = NAME_None, bool bAccelChange = false, bool bIncludeSelf = true);UFUNCTIONBlueprintCallableCategory=Physics
Add a force to all rigid bodies below. This is like a 'thruster'. Good for adding a burst over some (non zero) time. Should be called every frame for the duration of the force.
AddImpulseToAllBodiesBelow
virtual void AddImpulseToAllBodiesBelow(FVector Impulse, FName BoneName = NAME_None, bool bVelChange = false, bool bIncludeSelf = true);UFUNCTIONBlueprintCallableCategory=Physics
Add impulse to all single rigid bodies below. Good for one time instant burst.
IsShown
virtual bool IsShown(const FEngineShowFlags& ShowFlags) const override;
GetComponentTransformFromBodyInstance
virtual FTransform GetComponentTransformFromBodyInstance(FBodyInstance* UseBI) override;protected
If PhysicsTransformUpdateMode is set to SimulationUpdatesComponentTransform, this returns the world-space transform of the body passed in (assumed to be the root body), after applying the TransformToRoot offset.…
MigratePhysicsState
virtual void MigratePhysicsState(FArchive& Ar) override;protected
ApplyMigratedPhysicsState
virtual void ApplyMigratedPhysicsState(Chaos::FSerializedDataBufferPtr MigratedStateData = nullptr) override;protected
UpdateLODStatus
virtual bool UpdateLODStatus() override;
SetPredictedLODLevel
virtual void SetPredictedLODLevel(int32 InPredictedLODLevel) override;
UpdateVisualizeLODString
virtual void UpdateVisualizeLODString(FString& DebugString) override;
RefreshBoneTransforms
virtual void RefreshBoneTransforms(FActorComponentTickFunction* TickFunction = NULL) override;
DispatchParallelTickPose
virtual void DispatchParallelTickPose(FActorComponentTickFunction* TickFunction) override;protected
TickPose
virtual void TickPose(float DeltaTime, bool bNeedsValidRootMotion) override;
UpdateFollowerComponent
virtual void UpdateFollowerComponent() override;
ShouldUpdateTransform
virtual bool ShouldUpdateTransform(bool bLODHasChanged) const override;
ShouldTickPose
virtual bool ShouldTickPose() const override;
AllocateTransformData
virtual bool AllocateTransformData() override;
DeallocateTransformData
virtual void DeallocateTransformData() override;
HideBone
virtual void HideBone(int32 BoneIndex, EPhysBodyOp PhysBodyOption) override;
UnHideBone
virtual void UnHideBone(int32 BoneIndex) override;
SetPhysicsAsset
virtual void SetPhysicsAsset(class UPhysicsAsset* NewPhysicsAsset,bool bForceReInit = false) override;
SetSkeletalMesh
virtual void SetSkeletalMesh(class USkeletalMesh* NewMesh, bool bReinitPose = true) override;
SetSkeletalMesh may remain and become a UFUNCTION but lose its virtual after it is removed from the SkinnedMeshComponent API
SetSkinnedAssetAndUpdate
virtual void SetSkinnedAssetAndUpdate(class USkinnedAsset* InSkinnedAsset, bool bReinitPose = true) override;
Set the new asset to render and update this component (this function is identical to SetSkeletalMesh). The USkinnedAsset pointer is first cast to a USkeletalMesh, therefore this function will only set assets of type…
IsPlayingRootMotion
virtual bool IsPlayingRootMotion() const override;
IsPlayingNetworkedRootMotionMontage
virtual bool IsPlayingNetworkedRootMotionMontage() const override;
IsPlayingRootMotionFromEverything
virtual bool IsPlayingRootMotionFromEverything() const override;
FinalizeBoneTransform
virtual void FinalizeBoneTransform() override;
SetRefPoseOverride
virtual void SetRefPoseOverride(const TArray<FTransform>& NewRefPoseTransforms) override;
ClearRefPoseOverride
virtual void ClearRefPoseOverride() override;
ShouldEvaluatePostProcessAnimBP
bool ShouldEvaluatePostProcessAnimBP() const;
Conditions used to gate when post process events happen
ShouldUpdatePostProcessInstance
bool ShouldUpdatePostProcessInstance() const;
ShouldPostUpdatePostProcessInstance
bool ShouldPostUpdatePostProcessInstance() const;
ShouldEvaluatePostProcessInstance
bool ShouldEvaluatePostProcessInstance() const;
UpdateRBJointMotors
void UpdateRBJointMotors();
Iterate over each joint in the physics for this mesh, setting its AngularPositionTarget based on the animation information.
PerformAnimationProcessing
void PerformAnimationProcessing(const USkeletalMesh* InSkeletalMesh, UAnimInstance* InAnimInstance, bool bInDoEvaluation, bool bInForceRefPose, TArray<FTransform>& OutSpaceBases, TArray<FTransform>& OutBoneSpaceTransforms, FVector& OutRootBoneTranslation, FBlendedHeapCurve& OutCurve, UE::Anim::FMeshAttributeContainer& OutAttributes);
EvaluatePostProcessMeshInstance
void EvaluatePostProcessMeshInstance(TArray<FTransform>& OutBoneSpaceTransforms, FCompactPose& InOutPose, FBlendedHeapCurve& OutCurve, const USkeletalMesh* InSkeletalMesh, FVector& OutRootBoneTranslation, UE::Anim::FHeapAttributeContainer& OutAttributes, bool bInForceRefPose) const;
Evaluates the post process instance from the skeletal mesh this component is using.
PostAnimEvaluation
void PostAnimEvaluation(FAnimationEvaluationContext& EvaluationContext);
InitCollisionRelationships
void InitCollisionRelationships();
TermCollisionRelationships
void TermCollisionRelationships();
InitArticulated
void InitArticulated(FPhysScene* PhysScene);
Initialize PhysicsAssetInstance for the physicsAsset
InstantiatePhysicsAsset
void InstantiatePhysicsAsset(const UPhysicsAsset& PhysAsset, const FVector& Scale3D, TArray<FBodyInstance*>& OutBodies, TArray<FConstraintInstance*>& OutConstraints, FPhysScene* PhysScene = nullptr, USkeletalMeshComponent* OwningComponent = nullptr, int32 UseRootBodyIndex = INDEX_NONE, const FPhysicsAggregateHandle& UseAggregate = FPhysicsAggregateHandle()) const;
Instantiates bodies given a physics asset. Typically you should call InitArticulated unless you are planning to do something special with the bodies. The Created bodies and constraints are owned by the calling code…
InstantiatePhysicsAssetBodies
void InstantiatePhysicsAssetBodies(const UPhysicsAsset& PhysAsset, TArray<FBodyInstance*>& OutBodies, FPhysScene* PhysScene = nullptr, USkeletalMeshComponent* OwningComponent = nullptr, int32 UseRootBodyIndex = INDEX_NONE, const FPhysicsAggregateHandle& UseAggregate = FPhysicsAggregateHandle()) const;
Instantiates only the bodies given a physics asset, not the constraints. The Created bodies are owned by the calling code and must be freed when necessary.
InstantiatePhysicsAssetRefPose
void InstantiatePhysicsAssetRefPose(const UPhysicsAsset& PhysAsset, const FVector& Scale3D, TArray<FBodyInstance*>& OutBodies, TArray<FConstraintInstance*>& OutConstraints, FPhysScene* PhysScene = nullptr, USkeletalMeshComponent* OwningComponent = nullptr, int32 UseRootBodyIndex = INDEX_NONE, const FPhysicsAggregateHandle& UseAggregate = FPhysicsAggregateHandle(), bool bCreateBodiesInRefPose = false) const;
Instantiates bodies given a physics asset like InstantiatePhysicsAsset but instead of reading the current component state, this reads the ref-pose from the reference skeleton of the mesh. Useful if trying to create…
TermArticulated
void TermArticulated();
Turn off all physics and remove the instance.
FindRootBodyIndex
int32 FindRootBodyIndex() const;
Find the root body index
TermBodiesBelow
void TermBodiesBelow(FName ParentBoneName);UFUNCTIONBlueprintCallableCategory=Physics
Terminate physics on all bodies below the named bone, effectively disabling collision forever. If you terminate, you won't be able to re-init later.
FindConstraintInstance
FConstraintInstance* FindConstraintInstance(FName ConName);
Find instance of the constraint that matches the name supplied.
GetConstraintInstanceByIndex
FConstraintInstance* GetConstraintInstanceByIndex(uint32 Index);
get instance of the constraint that matches the index .
GetTotalMassBelowBone
float GetTotalMassBelowBone(FName InBoneName);
Utility which returns total mass of all bones below the supplied one in the hierarchy (including this one).
SetCollisionObjectType
virtual void SetCollisionObjectType(ECollisionChannel Channel) override;
Set the collision object type on the skeletal mesh
SetAllBodiesCollisionObjectType
void SetAllBodiesCollisionObjectType(ECollisionChannel NewChannel);
Set the movement channel of all bodies
SetAllBodiesNotifyRigidBodyCollision
void SetAllBodiesNotifyRigidBodyCollision(bool bNewNotifyRigidBodyCollision);
Set the rigid body notification state for all bodies.
SetAllBodiesSimulatePhysics
void SetAllBodiesSimulatePhysics(bool bNewSimulate);UFUNCTIONBlueprintCallableCategory=Physics
Set bSimulatePhysics to true for all bone bodies. Does not change the component bSimulatePhysics flag.
SetPhysicsBlendWeight
void SetPhysicsBlendWeight(float PhysicsBlendWeight);UFUNCTIONBlueprintCallableCategory=Physics
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.…
SetEnablePhysicsBlending
void SetEnablePhysicsBlending(bool bNewBlendPhysics);UFUNCTIONBlueprintCallableCategory=Physics
Disable physics blending of bones
SetAllBodiesBelowPhysicsDisabled
void SetAllBodiesBelowPhysicsDisabled(const FName& InBoneName, bool bDisabled, bool bIncludeSelf = true);UFUNCTIONBlueprintCallableCategory=Physics
[WARNING: Chaos Only] Set all of the bones below passed in bone to be disabled or not for the associated physics solver Bodies will not be colliding or be part of the physics simulation. This is different from…
SetAllBodiesBelowLinearVelocity
void SetAllBodiesBelowLinearVelocity(const FName& InBoneName, const FVector& LinearVelocity, bool bIncludeSelf = true);UFUNCTIONBlueprintCallableCategory=Physics
set the linear velocity of the child bodies to match that of the given parent bone
GetBoneLinearVelocity
FVector GetBoneLinearVelocity(const FName& InBoneName);UFUNCTIONBlueprintCallableCategory=Physics
SetAllBodiesBelowSimulatePhysics
void SetAllBodiesBelowSimulatePhysics(const FName& InBoneName, bool bNewSimulate, bool bIncludeSelf = true);UFUNCTIONBlueprintCallableCategory=Physics
Set all of the bones below passed in bone to be simulated
SetBodySimulatePhysics
void SetBodySimulatePhysics(const FName& InBoneName, bool bSimulate);UFUNCTIONBlueprintCallableCategory=Physics
Set a single bone to be simulated (or not)
ResetAllBodiesSimulatePhysics
void ResetAllBodiesSimulatePhysics();UFUNCTIONBlueprintCallableCategory=Physics
Allows you to reset bodies Simulate state based on where bUsePhysics is set to true in the BodySetup.
SetAllBodiesPhysicsBlendWeight
void SetAllBodiesPhysicsBlendWeight(float PhysicsBlendWeight, bool bSkipCustomPhysicsType = false);UFUNCTIONBlueprintCallableCategory=Physics
SetAllBodiesBelowPhysicsBlendWeight
void SetAllBodiesBelowPhysicsBlendWeight(const FName& InBoneName, float PhysicsBlendWeight, bool bSkipCustomPhysicsType = false, bool bIncludeSelf = true);UFUNCTIONBlueprintCallableCategory=Physics
Set all of the bones below passed in bone to be simulated
AccumulateAllBodiesBelowPhysicsBlendWeight
void AccumulateAllBodiesBelowPhysicsBlendWeight(const FName& InBoneName, float AddPhysicsBlendWeight, bool bSkipCustomPhysicsType = false);UFUNCTIONBlueprintCallableCategory=Physics
Accumulate AddPhysicsBlendWeight to physics blendweight for all of the bones below passed in bone to be simulated
SetAllMotorsAngularPositionDrive
void SetAllMotorsAngularPositionDrive(bool bEnableSwingDrive, bool bEnableTwistDrive, bool bSkipCustomPhysicsType = false);UFUNCTIONBlueprintCallableCategory=Physics
Enable or Disable AngularPositionDrive. If motor is in SLERP mode it will be turned on if either EnableSwingDrive OR EnableTwistDrive are enabled. In Twist and Swing mode the twist and the swing can be controlled…
SetAllMotorsAngularVelocityDrive
void SetAllMotorsAngularVelocityDrive(bool bEnableSwingDrive, bool bEnableTwistDrive, bool bSkipCustomPhysicsType = false);UFUNCTIONBlueprintCallableCategory=Physics
Enable or Disable AngularVelocityDrive. If motor is in SLERP mode it will be turned on if either EnableSwingDrive OR EnableTwistDrive are enabled. In Twist and Swing mode the twist and the swing can be controlled…
SetAllMotorsAngularDriveParams
void SetAllMotorsAngularDriveParams(float InSpring, float InDamping, float InForceLimit, bool bSkipCustomPhysicsType = false);UFUNCTIONBlueprintCallableCategory=Physics
Set Angular Drive motors params for all constraint instances
SetConstraintProfile
void SetConstraintProfile(FName JointName, FName ProfileName, bool bDefaultIfNotFound = false);UFUNCTIONBlueprintCallableCategory=Physics
Sets the constraint profile properties (limits, motors, etc...) to match the constraint profile as defined in the physics asset. If profile name is not found the joint is set to use the default constraint profile.
SetConstraintProfileForAll
void SetConstraintProfileForAll(FName ProfileName, bool bDefaultIfNotFound = false);UFUNCTIONBlueprintCallableCategory=Physics
Sets the constraint profile properties (limits, motors, etc...) to match the constraint profile as defined in the physics asset for all constraints. If profile name is not found the joint is set to use the default…
GetConstraintProfilePropertiesOrDefault
bool GetConstraintProfilePropertiesOrDefault(FConstraintProfileProperties& OutProperties, FName JointName, FName ProfileName);
Gets the constraint profile properties that a joint drive would adopt if it were set to the given constraint profile. The default will be returned if an empty or invalid profile name is passed in. Returns true if the…
SetNamedMotorsAngularPositionDrive
void SetNamedMotorsAngularPositionDrive(bool bEnableSwingDrive, bool bEnableTwistDrive, const TArray<FName>& BoneNames, bool bSetOtherBodiesToComplement = false);
Enable or Disable AngularPositionDrive based on a list of bone names
SetNamedMotorsAngularVelocityDrive
void SetNamedMotorsAngularVelocityDrive(bool bEnableSwingDrive, bool bEnableTwistDrive, const TArray<FName>& BoneNames, bool bSetOtherBodiesToComplement = false);
Enable or Disable AngularVelocityDrive based on a list of bone names
GetWeldedBodies
void GetWeldedBodies(TArray<FBodyInstance*> & OutWeldedBodies, TArray<FName> & OutChildrenLabels, bool bIncludingAutoWeld = false) override;
ForEachBodyBelow
int32 ForEachBodyBelow(FName BoneName, bool bIncludeSelf, bool bSkipCustomType, TFunctionRef<void(FBodyInstance*)> Func);
Iterates over all bodies below and executes Func. Returns number of bodies found
SetForceRefPose
void SetForceRefPose(bool bNewForceRefPose);
Change whether to force mesh into ref pose (and use cheaper vertex shader)
UpdateHasValidBodies
void UpdateHasValidBodies();
Update bHasValidBodies flag
UpdateBoneBodyMapping
void UpdateBoneBodyMapping();
Update the bone mapping on each body instance. This is useful when changing skeletal mesh without recreating bodies
InitSkelControls
void InitSkelControls();
Initialize SkelControls
FindConstraintIndex
int32 FindConstraintIndex(FName ConstraintName);
Find Constraint Index from the name
FindConstraintBoneName
FName FindConstraintBoneName(int32 ConstraintIndex);UFUNCTIONBlueprintCallableCategory=Physics
Find Constraint Name from index
UpdateKinematicBonesToAnim
void UpdateKinematicBonesToAnim(const TArray<FTransform>& InComponentSpaceTransforms, ETeleportType Teleport, bool bNeedsSkinning, EAllowKinematicDeferral DeferralAllowed = EAllowKinematicDeferral::AllowDeferral);
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. This update is also…
UpdateMeshForBrokenConstraints
void UpdateMeshForBrokenConstraints();
Look up all bodies for broken constraints. Makes sure child bodies of a broken constraints are not fixed and using bone springs, and child joints not motorized.
NotifySkelControlBeyondLimit
virtual void NotifySkelControlBeyondLimit(class USkelControlLookAt* LookAt);
Notifier when look at control goes beyond of limit - candidate for delegate
BreakConstraint
void BreakConstraint(FVector Impulse, FVector HitLocation, FName InBoneName);UFUNCTIONBlueprintCallableCategory=Physics
Break a constraint off a Gore mesh.
GetConstraintByName
FConstraintInstanceAccessor GetConstraintByName(FName ConstraintName, bool bIncludesTerminated);UFUNCTIONBlueprintCallableCategory=Physics
Gets a constraint by its name
GetConstraints
void GetConstraints(bool bIncludesTerminated, TArray<FConstraintInstanceAccessor>& OutConstraints);UFUNCTIONBlueprintCallableCategory=Physics
Gets all the constraints
GetConstraintsFromBody
void GetConstraintsFromBody(FName BodyName, bool bParentConstraints, bool bChildConstraints, bool bIncludesTerminated, TArray<FConstraintInstanceAccessor>& OutConstraints);UFUNCTIONBlueprintCallableCategory=Physics
Gets all the constraints attached to a body
SetAngularLimits
void SetAngularLimits(FName InBoneName,float Swing1LimitAngle, float TwistLimitAngle, float Swing2LimitAngle);UFUNCTIONBlueprintCallableCategory=Physics
Sets the Angular Motion Ranges for a named constraint
GetCurrentJointAngles
void GetCurrentJointAngles(FName InBoneName,float& Swing1Angle, float& TwistAngle, float& Swing2Angle);UFUNCTIONBlueprintCallableCategory=Physics
Gets the current Angular state for a named bone constraint
GetClosestCollidingRigidBodyLocation
FVector GetClosestCollidingRigidBodyLocation(const FVector& TestLocation) const;
iterates through all bodies in our PhysicsAsset and returns the location of the closest bone associated with a body that has collision enabled.
ApplyDeltaToAllPhysicsTransforms
void ApplyDeltaToAllPhysicsTransforms(const FVector& DeltaLocation, const FQuat& DeltaRotation);
Set physics transforms for all bodies
RecreateClothingActors
void RecreateClothingActors();UFUNCTIONBlueprintCallableCategory=Clothing
Destroys and recreates the clothing actors in the current simulation
AddClothingBounds
void AddClothingBounds(FBoxSphereBounds& InOutBounds, const FTransform& LocalToWorld) const;
Given bounds InOutBounds, expand them to also enclose the clothing simulation mesh
CheckClothTeleport
virtual void CheckClothTeleport();
Check linear and angular thresholds for clothing teleport
UpdateClothStateAndSimulate
void UpdateClothStateAndSimulate(float DeltaTime, FTickFunction& ThisTickFunction);
Update the clothing simulation state and trigger the simulation task
UpdateClothTransform
void UpdateClothTransform(ETeleportType TeleportType);
void UpdateClothTransform();
Updates cloth collision outside the cloth asset (environment collision, child collision, etc...) Should be called when scene changes or world position changes
UpdateRigidBodyScaling
void UpdateRigidBodyScaling(ETeleportType TeleportType);
Update rigid body scaling when the actor is set with a new uniform scale.
UpdateClothCollision
void UpdateClothCollision();
Updates cloth collision inside the cloth asset (from a physics asset). Should be called when the physics asset changes and the effects are needed straight away.
GetClothSimulatedPosition_GameThread
bool GetClothSimulatedPosition_GameThread(const FGuid& AssetGuid, int32 VertexIndex, FVector& OutSimulPos) const;
if the vertex index is valid for simulated vertices, returns the position in world space
GetClothCollisionSources
const TArray<FClothCollisionSource>& GetClothCollisionSources() const;
AddClothCollisionSource
void AddClothCollisionSource(USkeletalMeshComponent* InSourceComponent, UPhysicsAsset* InSourcePhysicsAsset);UFUNCTIONBlueprintCallableCategory=Clothing
Add a collision source for the cloth on this component. Each cloth tick, the collision defined by the physics asset, transformed by the bones in the source component, will be applied to cloth.
RemoveClothCollisionSources
void RemoveClothCollisionSources(USkeletalMeshComponent* InSourceComponent);UFUNCTIONBlueprintCallableCategory=Clothing
Remove a cloth collision source defined by a component
RemoveClothCollisionSource
void RemoveClothCollisionSource(USkeletalMeshComponent* InSourceComponent, UPhysicsAsset* InSourcePhysicsAsset);UFUNCTIONBlueprintCallableCategory=Clothing
Remove a cloth collision source defined by both a component and a physics asset
ResetClothCollisionSources
void ResetClothCollisionSources();UFUNCTIONBlueprintCallableCategory=Clothing
Remove all cloth collision sources
CopyClothCollisionSources
void CopyClothCollisionSources();protected
copy cloth collision sources to this, where parent means components above it in the hierarchy
ProcessClothCollisionWithEnvironment
void ProcessClothCollisionWithEnvironment();protected
CopyClothCollisionsToChildren
void CopyClothCollisionsToChildren();protected
copy parent's cloth collisions to attached children, where parent means this component
CopyChildrenClothCollisionsToParent
void CopyChildrenClothCollisionsToParent();protected
copy children's cloth collisions to parent, where parent means this component
FindClothCollisions
void FindClothCollisions(FClothCollisionData& OutCollisions);protected
find if this component has collisions for clothing and return the results calculated by bone transforms
IsAnimBlueprintInstanced
bool IsAnimBlueprintInstanced() const;
ClearAnimScriptInstance
void ClearAnimScriptInstance();
ClearCachedAnimProperties
void ClearCachedAnimProperties();
Clear cached animation data generated for URO during evaluation
NeedToSpawnAnimScriptInstance
bool NeedToSpawnAnimScriptInstance() const;protected
NeedToSpawnPostPhysicsInstance
bool NeedToSpawnPostPhysicsInstance(bool bForceReinit) const;protected
ShouldBlendPhysicsBones
virtual bool ShouldBlendPhysicsBones() const;protected
OnSyncComponentToRBPhysics
virtual void OnSyncComponentToRBPhysics();protected
Notify called just before syncing physics update, called only if bNotifySyncComponentToRBPhysics flag is set
ParallelAnimationEvaluation
void ParallelAnimationEvaluation();
Parallel evaluation wrappers
CompleteParallelAnimationEvaluation
virtual void CompleteParallelAnimationEvaluation(bool bDoPostAnimEvaluation);
IsRunningParallelEvaluation
bool IsRunningParallelEvaluation() const;
Returns whether we are currently trying to run a parallel animation evaluation task
HandleExistingParallelEvaluationTask
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…
ApplyAnimationCurvesToComponent
void ApplyAnimationCurvesToComponent(const TMap<FName, float>* InMaterialParameterCurves, const TMap<FName, float>* InAnimationMorphCurves);
Apply animation curves to this component
CanSimulateClothing
bool CanSimulateClothing() const;
Returns whether we're able to run a simulation (ignoring the suspend flag)
DoInstancePreEvaluation
void DoInstancePreEvaluation();protected
Prep anim instances for evaluation
DoInstancePostEvaluation
void DoInstancePostEvaluation();protected
Handle post evaluation on all anim instances
ShouldRunClothTick
virtual bool ShouldRunClothTick() const;protected
Returns whether we need to run the Cloth Tick or not
ConvertLocalRootMotionToWorld
FTransform ConvertLocalRootMotionToWorld(const FTransform& InTransform);
Take extracted RootMotion and convert it from local space to world space.
ConsumeRootMotion
FRootMotionMovementParams ConsumeRootMotion();
Consume and return pending root motion from our internal anim instances (main, sub and post)
ConsumeRootMotion_Internal
FRootMotionMovementParams ConsumeRootMotion_Internal(float InAlpha);protected
Consume and return pending root motion from our internal anim instances (main, sub and post)
GetCustomAttributes
const UE::Anim::FMeshAttributeContainer& GetCustomAttributes() const;
CanHaveStaticMobility
virtual const bool CanHaveStaticMobility() const override;
Skeletal mesh component should not be able to have its mobility set to static
RegisterOnPhysicsCreatedDelegate
FDelegateHandle RegisterOnPhysicsCreatedDelegate(const FOnSkelMeshPhysicsCreated& Delegate);
Register/Unregister for physics state creation callback
UnregisterOnPhysicsCreatedDelegate
void UnregisterOnPhysicsCreatedDelegate(const FDelegateHandle& DelegateHandle);
RegisterOnTeleportDelegate
FDelegateHandle RegisterOnTeleportDelegate(const FOnSkelMeshTeleported& Delegate);
Register/Unregister for teleport callback
UnregisterOnTeleportDelegate
void UnregisterOnTeleportDelegate(const FDelegateHandle& DelegateHandle);
RegisterOnBoneTransformsFinalizedDelegate
virtual FDelegateHandle RegisterOnBoneTransformsFinalizedDelegate(const FOnBoneTransformsFinalizedMultiCast::FDelegate& Delegate) override;
Register/Unregister for OnBoneTransformsFinalized callback
UnregisterOnBoneTransformsFinalizedDelegate
virtual void UnregisterOnBoneTransformsFinalizedDelegate(const FDelegateHandle& DelegateHandle) override;
ConditionallyDispatchQueuedAnimEvents
void ConditionallyDispatchQueuedAnimEvents();
IsPostEvaluatingAnimation
bool IsPostEvaluatingAnimation() const;
Are we currently within PostAnimEvaluation
GetPhysicsObjectById
virtual Chaos::FPhysicsObject* GetPhysicsObjectById(Chaos::FPhysicsObjectId Id) const override;
GetPhysicsObjectByName
virtual Chaos::FPhysicsObject* GetPhysicsObjectByName(const FName& Name) const override;
GetAllPhysicsObjects
virtual TArray<Chaos::FPhysicsObject*> GetAllPhysicsObjects() const override;

Static functions 9

GetAnimationModePropertyNameChecked
static const FName& GetAnimationModePropertyNameChecked();
helper function to get the member name and verify it exists, without making it public
GetRequiredVirtualBones
static void GetRequiredVirtualBones(const USkeletalMesh* SkeletalMesh, TArray<FBoneIndexType>& OutRequiredBones);
Get the required virtual bones from the SkeletalMesh Reference Skeleton
ExcludeHiddenBones
static void ExcludeHiddenBones(const USkeletalMeshComponent* SkeletalMeshComponent, const USkeletalMesh* SkeletalMesh, TArray<FBoneIndexType>& OutRequiredBones);
Removes the bones expicitly hidden or hiden by parent
GetShadowShapeRequiredBones
static void GetShadowShapeRequiredBones(const USkeletalMeshComponent* SkeletalMeshComponent, TArray<FBoneIndexType>& OutRequiredBones);
Get the bones required for shadow shapes
GetSkinnedVertexPosition
static FVector3f GetSkinnedVertexPosition(USkeletalMeshComponent* Component, int32 VertexIndex, const FSkeletalMeshLODRenderData& Model, const FSkinWeightVertexBuffer& SkinWeightBuffer);
static FVector3f GetSkinnedVertexPosition(USkeletalMeshComponent* Component, int32 VertexIndex, const FSkeletalMeshLODRenderData& Model, const FSkinWeightVertexBuffer& SkinWeightBuffer, TArray<FMatrix44f>& CachedRefToLocals);
ComputeSkinnedPositions
static void ComputeSkinnedPositions(USkeletalMeshComponent* Component, TArray<FVector3f> & OutPositions, TArray<FMatrix44f>& CachedRefToLocals, const FSkeletalMeshLODRenderData& Model, const FSkinWeightVertexBuffer& SkinWeightBuffer);
GetSkinnedTangentBasis
static void GetSkinnedTangentBasis(USkeletalMeshComponent* Component, int32 VertexIndex, const FSkeletalMeshLODRenderData& Model, const FSkinWeightVertexBuffer& SkinWeightBuffer, TArray<FMatrix44f>& CachedRefToLocals, FVector3f& OutTangentX, FVector3f& OutTangentY, FVector3f& OutTangentZ);
ComputeSkinnedTangentBasis
static void ComputeSkinnedTangentBasis(USkeletalMeshComponent* Component, TArray<FVector3f>& OutTangenXYZ, TArray<FMatrix44f>& CachedRefToLocals, const FSkeletalMeshLODRenderData& Model, const FSkinWeightVertexBuffer& SkinWeightBuffer);
ExtractCollisionsForCloth
static void ExtractCollisionsForCloth(USkeletalMeshComponent* SourceComponent, UPhysicsAsset* PhysicsAsset, USkeletalMeshComponent* DestClothComponent, FClothCollisionData& OutCollisions, FClothCollisionSource& ClothCollisionSource);protected
Extract collisions for cloth from this component (given a component we want to apply the data to)