Language:
Discover
By Skill Level
By Category

USceneComponent::K2_AttachTo

Choose your OS:

Syntax

bool K2_AttachTo
(
    USceneComponent * InParent,
    FName InSocketName,
    EAttachLocation::Type AttachType,
    bool bWeldSimulatedBodies
)

Remarks

Attach this component to another scene component, optionally at a named socket. It is valid to call this on components whether or not they have been Registered.

True if attachment is successful (or already attached to requested parent/socket), false if attachment is rejected and there is no change in AttachParent.

Returns

True if attachment is successful (or already attached to requested parent/socket), false if attachment is rejected and there is no change in AttachParent.

Parameters

Parameter

Description

InParent

Parent to attach to.

InSocketName

Optional socket to attach to on the parent.

AttachType

How to handle transform when attaching (Keep relative offset, keep world position, etc).

bWeldSimulatedBodies

Whether to weld together simulated physics bodies.

References

Module

Engine

Header

Runtime/Engine/Classes/Components/SceneComponent.h

Source

Runtime/Engine/Private/Components/SceneComponent.cpp