USceneComponent
#include "Components/SceneComponent.h" Description
The base class for all components that have a position, rotation, and scale in the world. Everything that can be placed or moved inherits from this.
Caveats & Gotchas
- • USceneComponent itself has no visual representation — it is a pure transform node. Use it as an attachment point or to group other components.
- • Use SetupAttachment() in the constructor to attach to a parent component. Use AttachToComponent() at runtime.
- • Changing the transform of a parent component moves all attached children automatically.
Example
Use a scene component as a socket attachment point C++
USceneComponent* WeaponPivot = CreateDefaultSubobject<USceneComponent>(TEXT("WeaponPivot"));
WeaponPivot->SetupAttachment(GetMesh(), FName("hand_r")); Functions (4)
Transform 4 ▼
| Access | Type | Name |
|---|---|---|
| public | function | USceneComponent::GetComponentLocation |
| public | function | USceneComponent::GetComponentRotation |
| public | function | USceneComponent::AttachToComponent |
| public | function | USceneComponent::DetachFromComponent |
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?