Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/GameFramework > API/Runtime/Engine/GameFramework/AActor
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Classes/GameFramework/Actor.h |
| Include | #include "GameFramework/Actor.h" |
| Source | /Engine/Source/Runtime/Engine/Private/Actor.cpp |
UFUNCTION (BlueprintCallable,
Meta=(DisplayName="Attach Actor To Actor", ScriptName="AttachToActor", bWeldSimulatedBodies=true),
Category="Transformation")
bool K2_AttachToActor
(
AActor * ParentActor,
FName SocketName,
EAttachmentRule LocationRule,
EAttachmentRule RotationRule,
EAttachmentRule ScaleRule,
bool bWeldSimulatedBodies
)
Remarks
Attaches the RootComponent of this Actor to the supplied actor, optionally at a named socket. Whether the attachment was successful or not
Parameters
| Name | Description |
|---|---|
| ParentActor | Actor to attach this actor's RootComponent to |
| SocketName | Socket name to attach to, if any |
| LocationRule | How to handle translation when attaching. |
| RotationRule | How to handle rotation when attaching. |
| ScaleRule | How to handle scale when attaching. |
| bWeldSimulatedBodies | Whether to weld together simulated physics bodies.This transfers the shapes in the welded object into the parent (if simulated), which can result in permanent changes that persist even after subsequently detaching. |