USceneComponent

A SceneComponent has a transform and supports attachment, but has no rendering or collision capabilities.

Windows
MacOS
Linux

Inheritance Hierarchy

UObjectBase

UObjectBaseUtility

UObject

UActorComponent

USceneComponent

TEXT3UText3DCharacterTransform

TEXT3UText3DComponent

UARComponent

UAREnvironmentProbeComponent

UARFaceComponent

UARGeoAnchorComponent

UARImageComponent

UARMeshComponent

UARObjectComponent

UARPlaneComponent

UARPointComponent

UARPoseComponent

UARQRCodeComponent

UARLifeCycleComponent

UAudioComponent

UAudioCurveSourceComponent

UCalibrationPointComponent

UCameraComponent

UCineCameraComponent

UDisplayClusterICVFXCameraComponent

UVirtualCameraCineCameraComponent

UCameraShakeSourceComponent

UChaosDestructionListener

UChildActorComponent

UComposurePostProcessPass

UComposureLensBloomPass

UComposurePostProcessingPassProxy

UComposureTonemapperPass

UDecalComponent

UDEPRECATED_GoogleARCorePlaneRendererComponent

UDEPRECATED_GoogleARCorePointCloudRendererComponent

UDisplayClusterRootComponent

UDisplayClusterSceneComponent

UDisplayClusterCameraComponent

UDisplayClusterMeshComponent

UDisplayClusterOriginComponent

UDisplayClusterScreenComponent

UDisplayClusterXformComponent

UDisplayClusterSceneComponentSync

UDisplayClusterSceneComponentSyncParent

UDisplayClusterSceneComponentSyncThis

UExponentialHeightFogComponent

UForceFeedbackComponent

UGizmoHandleGroup

UAxisGizmoHandleGroup

UGoogleVRControllerTooltipComponent

UGoogleVRGazeReticleComponent

UGoogleVRLaserVisual

UGoogleVRLaserVisualComponent

UGoogleVRMotionControllerComponent

ULightComponentBase

ULightComponent

UDirectionalLightComponent

ULocalLightComponent

UPointLightComponent

USpotLightComponent

URectLightComponent

USkyLightComponent

ULightmassPortalComponent

ULinearTimecodeComponent

UMagicLeapARPinComponent

UMagicLeapImageTrackerComponent

UMagicLeapMeshTrackerComponent

UMagicLeapPlanesComponent

UMagicLeapTabletComponent

UMockDataMeshTrackerComponent

UNavigationGraphNodeComponent

UPhysicsConstraintComponent

UPhysicsFieldComponent

UPhysicsSpringComponent

UPhysicsThrusterComponent

UPostProcessComponent

UPrimitiveComponent

PAPER2UPaperTerrainComponent

UArrowComponent

UBillboardComponent

UBrushComponent

UControlRigComponent

UDrawFrustumComponent

UEQSRenderingComponent

UFieldSystemComponent

UFuncTestRenderingComponent

UFXSystemComponent

UNiagaraComponent

UParticleSystemComponent

UCascadeParticleSystemComponent

UGameplayDebuggerRenderingComponent

UGizmoBaseComponent

UGizmoArrowComponent

UGizmoBoxComponent

UGizmoCircleComponent

UGizmoLineHandleComponent

UGizmoRectangleComponent

UImagePlateComponent

ULakeCollisionComponent

ULandscapeComponent

ULandscapeGizmoRenderComponent

ULandscapeHeightfieldCollisionComponent

ULandscapeMeshCollisionComponent

ULandscapeSplinesComponent

ULineBatchComponent

UMaterialBillboardComponent

UMeshComponent

PAPER2UPaperFlipbookComponent

PAPER2UPaperGroupedSpriteComponent

PAPER2UPaperSpriteComponent

PAPER2UPaperTileMapComponent

UBaseDynamicMeshComponent

UOctreeDynamicMeshComponent

USimpleDynamicMeshComponent

UCableComponent

UCustomMeshComponent

UGeometryCacheComponent

UGeometryCacheAbcFileComponent

UGeometryCacheUsdComponent

UGeometryCollectionComponent

UGroomComponent

ULidarPointCloudComponent

ULineSetComponent

UOverlayComponent

UPointCloudComponent

UPointSetComponent

UProceduralMeshComponent

UAppleARKitFaceMeshComponent

UDEPRECATED_GoogleARCoreFaceMeshComponent

USkinnedMeshComponent

UDestructibleComponent

UPoseableMeshComponent

UOculusHandComponent

USkeletalMeshComponent

UDebugSkelMeshComponent

UInsightsSkeletalMeshComponent

USkeletalMeshComponentBudgeted

UStaticMeshComponent

UControlPointMeshComponent

UGizmoHandleMeshComponent

UInstancedStaticMeshComponent

UHierarchicalInstancedStaticMeshComponent

UFoliageInstancedStaticMeshComponent

ULandscapeMeshProxyComponent

UMaterialEditorMeshComponent

USplineMeshComponent

UTriangleSetComponent

UWaterMeshComponent

UWidgetComponent

UWireframeMeshComponent

UModelComponent

UMotionControllerComponent

UMRMeshComponent

UNavLinkComponent

UNavLinkRenderingComponent

UNavMeshRenderingComponent

UNavTestRenderingComponent

UOceanCollisionComponent

UShapeComponent

UBoxComponent

UOceanBoxCollisionComponent

UCapsuleComponent

USphereComponent

UDrawSphereComponent

USplineComponent

PAPER2UPaperTerrainSplineComponent

UWaterSplineComponent

UTextRenderComponent

UVectorFieldComponent

UVirtualHeightfieldMeshComponent

URadialForceComponent

UReflectionCaptureComponent

UBoxReflectionCaptureComponent

UPlaneReflectionCaptureComponent

USphereReflectionCaptureComponent

URuntimeVirtualTextureComponent

USceneCaptureComponent

UPlanarReflectionComponent

USceneCaptureComponent2D

USceneCaptureComponentCube

USkyAtmosphereComponent

USpringArmComponent

UStereoLayerComponent

USynthComponent

UAudioCaptureComponent

UGranularSynth

UMediaSoundComponent

UModularSynthComponent

USynthComponentMonoWaveTable

USynthComponentMoto

USynthComponentToneGenerator

USynthSamplePlayer

UTimeSynthComponent

UVoipListenerSynthComponent

UTestPhaseComponent

UVCamComponent

UVolumetricCloudComponent

UWidgetInteractionComponent

UGoogleVRWidgetInteractionComponent

UWindDirectionalSourceComponent

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Components/SceneComponent.h

Include

#include "Components/SceneComponent.h"

Syntax

class USceneComponent : public UActorComponent

Remarks

A SceneComponent has a transform and supports attachment, but has no rendering or collision capabilities. Useful as a 'dummy' component in the hierarchy to offset others.

Variables

Name Description

Public variable

uint8: 1

 

bBoundsChangeTriggersStreamingDataRebuild

If true, a change in the bounds of the component will call trigger a streaming data rebuild

Protected variable

uint8: 1

 

bDisableDetachmentUpdateOverlaps

Transient flag that temporarily disables UpdateOverlaps within DetachFromParent().

Public variable

uint8: 1

 

bHiddenInGame

Whether to hide the primitive in game, if the primitive is Visible.

Public variable

FBoxSphereBound...

 

Bounds

Current bounds of the component

Public variable

uint8: 1

 

bUseAttachParentBound

If true, this component uses its parents bounds when attached.

Public variable

uint8: 1

 

bVisualizeComponent

This component should create a sprite component for visualization in the editor

Protected variable

uint8: 1

 

bWantsOnUpdateTransform

If true, OnUpdateTransform virtual will be called each time this component is moved.

Public variable

const FLevelCol...

 

CachedLevelCollection

Cached level collection that contains the level this component is registered in, for fast access in IsVisible().

Public variable

FVector

 

ComponentVelocity

Velocity of the component.

Public variable

TEnumAsByte< en...

 

DetailMode

If detail mode is >= system detail mode, primitive won't be rendered.

Public variable

FIsRootComponen...

 

IsRootComponentChanged

Delegate invoked when this scene component becomes the actor's root component or when it no longer is.

Public variable

TEnumAsByte< EC...

 

Mobility

How often this component is allowed to move, used to make various optimizations.

Public variable

FPhysicsVolumeC...

 

PhysicsVolumeChangedDelegate

Delegate that will be called when PhysicsVolume has been changed

Protected variable

UBillboardCompo...

 

SpriteComponent

Editor only component used to display the sprite so as to be able to see the location of the Component

Public variable

FTransformUpdat...

 

TransformUpdated

Delegate called when this component is moved

Constructors

Name Description

Public function

USceneComponent

(
    const FObjectInitializer& ObjectIn...
)

UObject constructor that takes an optional ObjectInitializer

Functions

Name Description

Public function

void

 

AddLocalOffset

(
    FVector DeltaLocation,
    bool bSweep,
    FHitResult* OutSweepHitResult,
    ETeleportType Teleport
)

Adds a delta to the location of the component in its local reference frame

Public function

void

 

AddLocalRotation

(
    const FQuat& DeltaRotation,
    bool bSweep,
    FHitResult* OutSweepHitResult,
    ETeleportType Teleport
)

Adds a delta to the rotation of the component in its local reference frame

Public function

void

 

AddLocalRotation

(
    FRotator DeltaRotation,
    bool bSweep,
    FHitResult* OutSweepHitResult,
    ETeleportType Teleport
)

Adds a delta to the rotation of the component in its local reference frame

Public function

void

 

AddLocalTransform

(
    const FTransform& DeltaTransform,
    bool bSweep,
    FHitResult* OutSweepHitResult,
    ETeleportType Teleport
)

Adds a delta to the transform of the component in its local reference frame. Scale is unchanged.

Public function Static

void

 

AddReferencedObjects

(
    UObject* InThis,
    FReferenceCollector& Collector
)

Public function

void

 

AddRelativeLocation

(
    FVector DeltaLocation,
    bool bSweep,
    FHitResult* OutSweepHitResult,
    ETeleportType Teleport
)

Adds a delta to the translation of the component relative to its parent

Public function

void

 

AddRelativeRotation

(
    const FQuat& DeltaRotation,
    bool bSweep,
    FHitResult* OutSweepHitResult,
    ETeleportType Teleport
)

Adds a delta the rotation of the component relative to its parent

Public function

void

 

AddRelativeRotation

(
    FRotator DeltaRotation,
    bool bSweep,
    FHitResult* OutSweepHitResult,
    ETeleportType Teleport
)

Adds a delta the rotation of the component relative to its parent

Public function

void

 

AddWorldOffset

(
    FVector DeltaLocation,
    bool bSweep,
    FHitResult* OutSweepHitResult,
    ETeleportType Teleport
)

Adds a delta to the location of the component in world space.

Public function

void

 

AddWorldRotation

(
    FRotator DeltaRotation,
    bool bSweep,
    FHitResult* OutSweepHitResult,
    ETeleportType Teleport
)

Adds a delta to the rotation of the component in world space.

Public function

void

 

AddWorldRotation

(
    const FQuat& DeltaRotation,
    bool bSweep,
    FHitResult* OutSweepHitResult,
    ETeleportType Teleport
)

Adds a delta to the rotation of the component in world space.

Public function

void

 

AddWorldTransform

(
    const FTransform& DeltaTransform,
    bool bSweep,
    FHitResult* OutSweepHitResult,
    ETeleportType Teleport
)

Adds a delta to the transform of the component in world space.

Public function

void

 

AddWorldTransformKeepScale

(
    const FTransform& DeltaTransform,
    bool bSweep,
    FHitResult* OutSweepHitResult,
    ETeleportType Teleport
)

Adds a delta to the transform of the component in world space. Scale is unchanged.

Protected function Const

bool

 

AreDynamicDataChangesAllowed

(
    bool bIgnoreStationary
)

Determine if dynamic data is allowed to be changed.

Public function

bool

 

AttachToComponent

(
    USceneComponent* InParent,
    const FAttachmentTransformRules& A...,
    FName InSocketName
)

Attach this component to another scene component, optionally at a named socket.

Public function Virtual Const

void

 

CalcBoundingCylinder

(
    float& CylinderRadius,
    float& CylinderHalfHeight
)

Calculate the axis-aligned bounding cylinder of the component (radius in X-Y, half-height along Z axis).

Public function Virtual Const

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

FBoxSphereBo...

 

CalcLocalBounds()

Calculate the local bounds of the component.

Protected function Const

FTransform

 

CalcNewComponentToWorld

(
    const FTransform& NewRelativeTrans...,
    const USceneComponent* Parent,
    FName SocketName
)

Calculate the new ComponentToWorld transform for this component.

Protected function Const

FTransform

 

CalcNewComponentToWorld_GeneralCase

(
    const FTransform& NewRelativeTrans...,
    const USceneComponent* Parent,
    FName SocketName
)

Utility function to handle calculating transform with a parent

Public function Virtual Const

bool

 

CanAttachAsChild

(
    USceneComponent* ChildComponen...,
    FName SocketName
)

Called to see if it's possible to attach another scene component as a child.

Public function Const

bool

 

CanEverRender()

Return true if it can ever render

Public function Virtual Const

const bool

 

CanHaveStaticMobility()

Determines whether or not the component can have its mobility set to static

Protected function Const

bool

 

CheckStaticMobilityAndWarn

(
    const FText& ActionText
)

Check if mobility is set to non-static. If it's static we trigger a PIE warning and return true

Public function

void

 

ClearSkipUpdateOverlaps()

Clears the skip update overlaps flag.

Public function

void

 

ConditionalUpdateComponentToWorld()

Call UpdateComponentToWorld if bComponentToWorldUpdated is false.

Public function Static

void

 

ConvertAttachLocation

(
    EAttachLocation::Type InAttachLocat...,
    EAttachmentRule& InOutLocationRule,
    EAttachmentRule& InOutRotationRule,
    EAttachmentRule& InOutScaleRule
)

Backwards compatibility: Used to convert old-style EAttachLocation to new-style EAttachmentRules

Public function Virtual

void

 

DetachFromComponent

(
    const FDetachmentTransformRules& D...
)

Detach this component from whatever it is attached to.

Public function Virtual Const

bool

 

DoesSocketExist

(
    FName InSocketName
)

Return true if socket with the given name exists

Public function Static

const FName

 

GetAbsoluteLocationPropertyName()

Gets the property name for bAbsoluteLocation.

Public function Static

const FName

 

GetAbsoluteRotationPropertyName()

Gets the property name for bAbsoluteRotation.

Public function Static

const FName

 

GetAbsoluteScalePropertyName()

Gets the property name for bAbsoluteScale.

Public function Const

TArray< FNam...

 

GetAllSocketNames()

Gets the names of all the sockets on the component.

Public function Const

const TArray...

 

GetAttachChildren()

Get the SceneComponents that are attached to this component.

Public function Const

USceneCompon...

 

GetAttachmentRoot()

Walks up the attachment chain from this SceneComponent and returns the SceneComponent at the top.

Public function Const

AActor *

 

GetAttachmentRootActor()

Walks up the attachment chain from this SceneComponent and returns the top-level actor it's attached to.

Public function Const

USceneCompon...

 

GetAttachParent()

Get the SceneComponent we are attached to.

Public function Const

FName

 

GetAttachSocketName()

Get the socket we are attached to.

Public function Const

USceneCompon...

 

GetChildComponent

(
    int32 ChildIndex
)

Gets the attached child component at the specified location

Public function Const

void

 

GetChildrenComponents

(
    bool bIncludeAllDescendants,
    TArray< USceneComponent* >& C...
)

Gets all components that are attached to this component, possibly recursively

Public function Virtual Const

ECollisionEn...

 

GetCollisionEnabled()

Returns the form of collision for this component

Public function Virtual Const

ECollisionCh...

 

GetCollisionObjectType()

Returns the channel that this component belongs to when it moves.

Public function Virtual Const

ECollisionRe...

 

GetCollisionResponseToChannel

(
    ECollisionChannel Channel
)

Returns the response that this component has to a specific collision channel.

Public function Virtual Const

const FColli...

 

GetCollisionResponseToChannels()

Return const reference to CollsionResponseContainer

Public function Const

ECollisionRe...

 

GetCollisionResponseToComponent

(
    USceneComponent* OtherComponen...
)

Compares the CollisionObjectType of each component against the Response of the other, to see what kind of response we should generate

Public function Const

FVector

 

GetComponentLocation()

Return location of the component, in world space

Public function Const

FQuat

 

GetComponentQuat()

Return rotation quaternion of the component, in world space

Public function Const

FRotator

 

GetComponentRotation()

Return rotation of the component, in world space

Public function Const

FVector

 

GetComponentScale()

Return scale of the component, in world space

Public function Const

const FTrans...

 

GetComponentToWorld()

Get the current component-to-world transform for this component TODO: probably deprecate this in favor of GetComponentTransform

Public function Const

const FTrans...

 

GetComponentTransform()

Get the current component-to-world transform for this component

Public function Virtual Const

FVector

 

GetComponentVelocity()

Get velocity of the component: either ComponentVelocity, or the velocity of the physics body if simulating physics.

Public function Const

FScopedMovem...

 

GetCurrentScopedMovement()

Returns the current scoped movement update, or NULL if there is none.

Public function Static

FName

 

GetDefaultSceneRootVariableName()

The name to use for the default scene root variable

Public function Const

FVector

 

GetForwardVector()

Get the forward (X) unit direction vector from this component, in world space.

Public function Const

int32

 

GetNumChildrenComponents()

Gets the number of attached children components

Public function Virtual Const

const int32

 

GetNumUncachedStaticLightingInteractions()

Returns number of lighting interactions that need to be recalculated

Public function Const

void

 

GetParentComponents

(
    TArray< USceneComponent* >& P...
)

Gets all attachment parent components up to and including the root component

Public function Const

APhysicsVolu...

 

GetPhysicsVolume()

Get the PhysicsVolume overlapping this component.

Public function Virtual Const

FBoxSphereBo...

 

GetPlacementExtent()

Get the extent used when placing this component in the editor, used for 'pulling back' hit.

Public function Const

FVector

 

GetRelativeLocation()

Gets the literal value of RelativeLocation.

Public function

FVector &

 

GetRelativeLocation_DirectMutable()

Gets a refence to RelativeLocation with the expectation that it will be modified.

Public function Static

const FName

 

GetRelativeLocationPropertyName()

Gets the property name for RelativeLocation.

Public function Const

FRotator

 

GetRelativeRotation()

Gets the literal value of RelativeRotation.

Public function

FRotator &

 

GetRelativeRotation_DirectMutable()

Gets a refence to RelativeRotation with the expectation that it will be modified.

Public function Const

const FRotat...

 

GetRelativeRotationCache()

Get the RelativeRotationCache.

Public function

FQuat

 

GetRelativeRotationFromWorld

(
    const FQuat& WorldRotation
)

Convenience function to get the relative rotation from the passed in world rotation

Public function Static

const FName

 

GetRelativeRotationPropertyName()

Gets the property name for RelativeRotation.

Public function Const

FVector

 

GetRelativeScale3D()

Gets the literal value of RelativeScale3D.

Public function

FVector &

 

GetRelativeScale3D_DirectMutable()

Gets a refence to RelativeRotation with the expectation that it will be modified.

Public function Static

const FName

 

GetRelativeScale3DPropertyName()

Gets the property name for RelativeScale3D.

Public function Const

FTransform

 

GetRelativeTransform()

Returns the transform of the component relative to its parent

Public function Const

FVector

 

GetRightVector()

Get the right (Y) unit direction vector from this component, in world space.

Public function Const

bool

 

GetShouldUpdatePhysicsVolume()

Gets whether or not the cached PhysicsVolume this component overlaps should be updated when the component is moved.

Public function Virtual Const

FVector

 

GetSocketLocation

(
    FName InSocketName
)

Get world-space socket or bone location.

Public function Virtual Const

FQuat

 

GetSocketQuaternion

(
    FName InSocketName
)

Get world-space socket or bone FQuat rotation.

Public function Virtual Const

FRotator

 

GetSocketRotation

(
    FName InSocketName
)

Get world-space socket or bone FRotator rotation.

Public function Virtual Const

FTransform

 

GetSocketTransform

(
    FName InSocketName,
    ERelativeTransformSpace TransformSp...
)

Get world-space socket transform.

Public function Const

void

 

GetSocketWorldLocationAndRotation

(
    FName InSocketName,
    FVector& OutLocation,
    FQuat& OutRotation
)

Find the world-space location and rotation of the given named socket.

Public function Const

void

 

GetSocketWorldLocationAndRotation

(
    FName InSocketName,
    FVector& OutLocation,
    FRotator& OutRotation
)

Find the world-space location and rotation of the given named socket.

Public function Const

FVector

 

GetUpVector()

Get the up (Z) unit direction vector from this component, in world space.

Public function Const

bool

 

GetVisibleFlag()

Gets the literal value of bVisible.

Public function Static

const FName

 

GetVisiblePropertyName()

Gets the property name for bVisible.

Public function Virtual Const

bool

 

HasAnySockets()

Returns true if this component has any sockets

Protected function

bool

 

InternalSetWorldLocationAndRotation

(
    FVector NewLocation,
    const FQuat& NewQuat,
    bool bNoPhysics,
    ETeleportType Teleport
)

Internal helper, for use from MoveComponent().

Public function Virtual Const

bool

 

IsAnySimulatingPhysics()

Returns whether the specified body is currently using physics simulation

Public function Const

bool

 

IsAttachedTo

(
    const USceneComponent* TestCom...
)

Walks up the attachment chain to see if this component is attached to the supplied component.

Public function Const

bool

 

IsCollisionEnabled()

Utility to see if there is any form of collision (query or physics) enabled on this component.

Public function Const

bool

 

IsDeferringMovementUpdates()

Returns true if movement is currently within the scope of an FScopedMovementUpdate.

Public function Const

bool

 

IsPhysicsCollisionEnabled()

Utility to see if there is any physics collision enabled on this component.

Public function Virtual Const

bool

 

IsPrecomputedLightingValid()

True if our precomputed lighting is up to date

Public function Const

bool

 

IsQueryCollisionEnabled()

Utility to see if there is any query collision enabled on this component.

Public function Virtual Const

bool

 

IsSimulatingPhysics

(
    FName BoneName
)

Returns whether the specified body is currently using physics simulation

Public function Const

bool

 

IsUsingAbsoluteLocation()

Gets the literal value of bAbsoluteLocation.

Public function Const

bool

 

IsUsingAbsoluteRotation()

Gets the literal value of bAbsoluteRotation.

Public function Const

bool

 

IsUsingAbsoluteScale()

Gets the literal value of bAbsoluteScale.

Public function Virtual Const

bool

 

IsVisible()

Returns true if this component is visible in the current context

Public function Virtual Const

bool

 

IsVisibleInEditor()

Return true if visible in editor

Public function Virtual Const

bool

 

IsWorldGeometry()

Is this component considered 'world' geometry, by default checks if this uses the WorldStatic collision channel

Public function

void

 

K2_AddLocalOffset

(
    FVector DeltaLocation,
    bool bSweep,
    FHitResult& SweepHitResult,
    bool bTeleport
)

Adds a delta to the location of the component in its local reference frame

Public function

void

 

K2_AddLocalRotation

(
    FRotator DeltaRotation,
    bool bSweep,
    FHitResult& SweepHitResult,
    bool bTeleport
)

Adds a delta to the rotation of the component in its local reference frame

Public function

void

 

K2_AddLocalTransform

(
    const FTransform& DeltaTransform,
    bool bSweep,
    FHitResult& SweepHitResult,
    bool bTeleport
)

Adds a delta to the transform of the component in its local reference frame. Scale is unchanged.

Public function

void

 

K2_AddRelativeLocation

(
    FVector DeltaLocation,
    bool bSweep,
    FHitResult& SweepHitResult,
    bool bTeleport
)

Adds a delta to the translation of the component relative to its parent

Public function

void

 

K2_AddRelativeRotation

(
    FRotator DeltaRotation,
    bool bSweep,
    FHitResult& SweepHitResult,
    bool bTeleport
)

Adds a delta the rotation of the component relative to its parent

Public function

void

 

K2_AddWorldOffset

(
    FVector DeltaLocation,
    bool bSweep,
    FHitResult& SweepHitResult,
    bool bTeleport
)

Adds a delta to the location of the component in world space.

Public function

void

 

K2_AddWorldRotation

(
    FRotator DeltaRotation,
    bool bSweep,
    FHitResult& SweepHitResult,
    bool bTeleport
)

Adds a delta to the rotation of the component in world space.

Public function

void

 

K2_AddWorldTransform

(
    const FTransform& DeltaTransform,
    bool bSweep,
    FHitResult& SweepHitResult,
    bool bTeleport
)

Adds a delta to the transform of the component in world space.

Public function

void

 

K2_AddWorldTransformKeepScale

(
    const FTransform& DeltaTransform,
    bool bSweep,
    FHitResult& SweepHitResult,
    bool bTeleport
)

Adds a delta to the transform of the component in world space. Scale is unchanged.

Public function

bool

 

K2_AttachToComponent

(
    USceneComponent* Parent,
    FName SocketName,
    EAttachmentRule LocationRule,
    EAttachmentRule RotationRule,
    EAttachmentRule ScaleRule,
    bool bWeldSimulatedBodies
)

Attach this component to another scene component, optionally at a named socket.

Public function

void

 

K2_DetachFromComponent

(
    EDetachmentRule LocationRule,
    EDetachmentRule RotationRule,
    EDetachmentRule ScaleRule,
    bool bCallModify
)

Detach this component from whatever it is attached to.

Public function Const

FVector

 

K2_GetComponentLocation()

Return location of the component, in world space

Public function Const

FRotator

 

K2_GetComponentRotation()

Returns rotation of the component, in world space.

Public function Const

FVector

 

K2_GetComponentScale()

Returns scale of the component, in world space.

Public function Const

FTransform

 

K2_GetComponentToWorld()

Get the current component-to-world transform for this component

Public function

void

 

K2_SetRelativeLocation

(
    FVector NewLocation,
    bool bSweep,
    FHitResult& SweepHitResult,
    bool bTeleport
)

Set the location of the component relative to its parent

Public function

void

 

K2_SetRelativeLocationAndRotation

(
    FVector NewLocation,
    FRotator NewRotation,
    bool bSweep,
    FHitResult& SweepHitResult,
    bool bTeleport
)

Set the location and rotation of the component relative to its parent

Public function

void

 

K2_SetRelativeRotation

(
    FRotator NewRotation,
    bool bSweep,
    FHitResult& SweepHitResult,
    bool bTeleport
)

Set the rotation of the component relative to its parent

Public function

void

 

K2_SetRelativeTransform

(
    const FTransform& NewTransform,
    bool bSweep,
    FHitResult& SweepHitResult,
    bool bTeleport
)

Set the transform of the component relative to its parent

Public function

void

 

K2_SetWorldLocation

(
    FVector NewLocation,
    bool bSweep,
    FHitResult& SweepHitResult,
    bool bTeleport
)

Put this component at the specified location in world space.

Public function

void

 

K2_SetWorldLocationAndRotation

(
    FVector NewLocation,
    FRotator NewRotation,
    bool bSweep,
    FHitResult& SweepHitResult,
    bool bTeleport
)

Set the relative location and rotation of the component to put it at the supplied pose in world space.

Public function

void

 

K2_SetWorldRotation

(
    FRotator NewRotation,
    bool bSweep,
    FHitResult& SweepHitResult,
    bool bTeleport
)

Put this component at the specified rotation in world space.

Public function

void

 

K2_SetWorldTransform

(
    const FTransform& NewTransform,
    bool bSweep,
    FHitResult& SweepHitResult,
    bool bTeleport
)

Set the transform of the component in world space.

Public function

bool

 

MoveComponent

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

Tries to move the component by a movement vector (Delta) and sets rotation to NewRotation.

Public function

bool

 

MoveComponent

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

Tries to move the component by a movement vector (Delta) and sets rotation to NewRotation.

Protected function Virtual

bool

 

MoveComponentImpl

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

Override this method for custom behavior for MoveComponent

Public function Virtual Const

bool

 

NeedsLoadForTargetPlatform

(
    const ITargetPlatform* TargetP...
)

Public function Virtual

void

 

OnAttachmentChanged()

Called when AttachParent changes, to allow the scene to update its attachment state.

Protected function Virtual

void

 

OnChildAttached

(
    USceneComponent* ChildComponen...
)

Called after a child scene component is attached to this component.

Protected function Virtual

void

 

OnChildDetached

(
    USceneComponent* ChildComponen...
)

Called after a child scene component is detached from this component.

Protected function Virtual

void

 

OnHiddenInGameChanged()

Overridable internal function to respond to changes in the hidden in game value of the component.

Protected function Virtual

void

 

OnUpdateTransform

(
    EUpdateTransformFlags UpdateTransfo...,
    ETeleportType Teleport
)

Native callback when this component is moved

Protected function Virtual

void

 

OnVisibilityChanged()

Overridable internal function to respond to changes in the visibility of the component.

Public function Virtual

void

 

PostEditComponentMove

(
    bool bFinished
)

Called when this component is moved in the editor

Protected function

void

 

PostUpdateNavigationData()

Called after changing transform, tries to update navigation octree for owner

Public function Virtual

void

 

PreFeatureLevelChange

(
    ERHIFeatureLevel::Type PendingFeatu...
)

Called to update any visuals needed for a feature level change

Public function Virtual

void

 

PropagateLightingScenarioChange()

Updates any visuals after the lighting has changed

Public function Virtual Const

void

 

QuerySupportedSockets

Get a list of sockets this component contains

Public function

void

 

ResetRelativeTransform()

Reset the transform of the component relative to its parent.

Public function

void

 

SetAbsolute

(
    bool bNewAbsoluteLocation,
    bool bNewAbsoluteRotation,
    bool bNewAbsoluteScale
)

Set which parts of the relative transform should be relative to parent, and which should be relative to world

Public function

void

 

SetComponentToWorld

(
    const FTransform& NewComponentToWo...
)

Sets the cached component to world directly. This should be used very rarely.

Public function

void

 

SetHiddenInGame

(
    bool NewHidden,
    bool bPropagateToChildren
)

Changes the value of bHiddenInGame, if false this will disable Visibility during gameplay

Public function Virtual

void

 

SetMobility

(
    EComponentMobility::Type NewMobilit...
)

Set how often this component is allowed to move during runtime.

Public function

void

 

SetPhysicsVolume

(
    APhysicsVolume* NewVolume,
    bool bTriggerNotifiers
)

Replace current PhysicsVolume to input NewVolume

Public function

void

 

SetRelativeLocation

(
    FVector NewLocation,
    bool bSweep,
    FHitResult* OutSweepHitResult,
    ETeleportType Teleport
)

Set the location of the component relative to its parent

Public function

void

 

SetRelativeLocation_Direct

(
    const FVector NewRelativeLocation
)

Sets the value of RelativeLocation without causing other side effects to this instance.

Public function

void

 

SetRelativeLocationAndRotation

(
    FVector NewLocation,
    const FQuat& NewRotation,
    bool bSweep,
    FHitResult* OutSweepHitResult,
    ETeleportType Teleport
)

Set the location and rotation of the component relative to its parent

Public function

void

 

SetRelativeLocationAndRotation

(
    FVector NewLocation,
    FRotator NewRotation,
    bool bSweep,
    FHitResult* OutSweepHitResult,
    ETeleportType Teleport
)

Set the location and rotation of the component relative to its parent

Public function

void

 

SetRelativeRotation

(
    FRotator NewRotation,
    bool bSweep,
    FHitResult* OutSweepHitResult,
    ETeleportType Teleport
)

Set the rotation of the component relative to its parent

Public function

void

 

SetRelativeRotation

(
    const FQuat& NewRotation,
    bool bSweep,
    FHitResult* OutSweepHitResult,
    ETeleportType Teleport
)

Set the rotation of the component relative to its parent

Public function

void

 

SetRelativeRotation_Direct

(
    const FRotator NewRelativeRotation
)

Sets the value of RelativeRotation without causing other side effects to this instance.

Public function

void

 

SetRelativeRotationCache

(
    const FRotationConversionCache& In...
)

Sets the RelativeRotationCache.

Public function

void

 

SetRelativeRotationExact

(
    FRotator NewRotation,
    bool bSweep,
    FHitResult* OutSweepHitResult,
    ETeleportType Teleport
)

Set the rotation of the component relative to its parent and force RelativeRotation to be equal to new rotation.

Public function

void

 

SetRelativeScale3D

(
    FVector NewScale3D
)

Set the non-uniform scale of the component relative to its parent

Public function

void

 

SetRelativeScale3D_Direct

(
    const FVector NewRelativeScale3D
)

Sets the value of RelativeScale3D without causing other side effects to this instance.

Public function

void

 

SetRelativeTransform

(
    const FTransform& NewTransform,
    bool bSweep,
    FHitResult* OutSweepHitResult,
    ETeleportType Teleport
)

Set the transform of the component relative to its parent

Public function

void

 

SetRelativeTransform_Direct

(
    const FTransform& NewRelativeTrans...
)

Helper function to set the location, rotation, and scale without causing other side effects to this instance.

Public function

void

 

SetShouldUpdatePhysicsVolume

(
    bool bInShouldUpdatePhysicsVolume
)

Sets whether or not the cached PhysicsVolume this component overlaps should be updated when the component is moved.

Public function

void

 

SetupAttachment

(
    USceneComponent* InParent,
    FName InSocketName
)

Initializes desired Attach Parent and SocketName to be attached to when the component is registered.

Public function

void

 

SetUsingAbsoluteLocation

(
    const bool bInAbsoluteLocation
)

Sets the value of bAbsoluteLocation without causing other side effects to this instance.

Public function

void

 

SetUsingAbsoluteRotation

(
    const bool bInAbsoluteRotation
)

Sets the value of bAbsoluteRotation without causing other side effects to this instance.

Public function

void

 

SetUsingAbsoluteScale

(
    const bool bInAbsoluteRotation
)

Sets the value of bAbsoluteScale without causing other side effects to this instance.

Public function

void

 

SetVisibility

(
    bool bNewVisibility,
    bool bPropagateToChildren
)

Set visibility of the component, if during game use this to turn on/off

Public function

void

 

SetVisibleFlag

(
    const bool bInVisible
)

Sets the value of bVisible without causing other side effects to this instance.

Public function

void

 

SetWorldLocation

(
    FVector NewLocation,
    bool bSweep,
    FHitResult* OutSweepHitResult,
    ETeleportType Teleport
)

Put this component at the specified location in world space.

Public function

void

 

SetWorldLocationAndRotation

(
    FVector NewLocation,
    const FQuat& NewRotation,
    bool bSweep,
    FHitResult* OutSweepHitResult,
    ETeleportType Teleport
)

Set the relative location and FQuat rotation of the component to put it at the supplied pose in world space.

Public function

void

 

SetWorldLocationAndRotation

(
    FVector NewLocation,
    FRotator NewRotation,
    bool bSweep,
    FHitResult* OutSweepHitResult,
    ETeleportType Teleport
)

Set the relative location and rotation of the component to put it at the supplied pose in world space.

Public function

void

 

SetWorldLocationAndRotationNoPhysics

(
    const FVector& NewLocation,
    const FRotator& NewRotation
)

Special version of SetWorldLocationAndRotation that does not affect physics.

Public function

void

 

SetWorldRotation

(
    const FQuat& NewRotation,
    bool bSweep,
    FHitResult* OutSweepHitResult,
    ETeleportType Teleport
)

Put this component at the specified rotation in world space.

Public function

void

 

SetWorldRotation

(
    FRotator NewRotation,
    bool bSweep,
    FHitResult* OutSweepHitResult,
    ETeleportType Teleport
)

Put this component at the specified rotation in world space.

Public function

void

 

SetWorldScale3D

(
    FVector NewScale
)

Set the relative scale of the component to put it at the supplied scale in world space.

Public function

void

 

SetWorldTransform

(
    const FTransform& NewTransform,
    bool bSweep,
    FHitResult* OutSweepHitResult,
    ETeleportType Teleport
)

Set the transform of the component in world space.

Public function Virtual Const

bool

 

ShouldCollideWhenPlacing()

If true, bounds should be used when placing component/actor in level. Does not affect spawning.

Public function Const

bool

 

ShouldComponentAddToScene()

Looking at various values of the component, determines if this component should be added to the scene

Public function Const

bool

 

ShouldRender()

Return true if it should render

Public function Const

bool

 

ShouldSkipUpdateOverlaps()

If true, we can use the old computed overlaps

Public function

void

 

ToggleVisibility

(
    bool bPropagateToChildren
)

Toggle visibility of the component

Public function Virtual

void

 

UpdateBounds()

Update the Bounds of the component.

Public function

void

 

UpdateChildTransforms

(
    EUpdateTransformFlags UpdateTransfo...,
    ETeleportType Teleport
)

Update transforms of any components attached to this one.

Protected function

void

 

UpdateNavigationData()

Called after changing transform, tries to update navigation octree for this component

Public function

bool

 

UpdateOverlaps

(
    const TOverlapArrayView* Pendi...,
    bool bDoNotifies,
    const TOverlapArrayView* Overl...
)

Queries world and updates overlap tracking state for this component

Protected function Virtual

bool

 

UpdateOverlapsImpl

(
    const TOverlapArrayView* Pendi...,
    bool bDoNotifies,
    const TOverlapArrayView* Overl...
)

Internal helper for UpdateOverlaps

Public function Virtual

void

 

UpdatePhysicsVolume

(
    bool bTriggerNotifiers
)

Updates the PhysicsVolume of this SceneComponent, if bShouldUpdatePhysicsVolume is true.

Overridden from UActorComponent

Name Description

Public function Virtual

void

 

ApplyWorldOffset

(
    const FVector& InOffset,
    bool bWorldShift
)

Called by owner actor on position shifting Component should update all relevant data structures to reflect new actor location

Public function Virtual

void

 

DestroyComponent

(
    bool bPromoteChildren
)

Unregister the component, remove it from its outer Actor's Components array and mark for pending kill.

Public function Virtual Const

TStructOnSco...

 

GetComponentInstanceData()

Called before we throw away components during RerunConstructionScripts, to cache any data we wish to persist across that operation

Public function Virtual

void

 

OnComponentDestroyed

(
    bool bDestroyingHierarchy
)

Called when a component is destroyed

Public function Virtual

void

 

OnRegister()

Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called.

Public function Virtual

void

 

OnUnregister()

Called when a component is unregistered.

Public function Virtual Const

bool

 

ShouldCreateRenderState()

Return true if CreateRenderState() should be called

Public function Virtual

void

 

UpdateComponentToWorld

(
    EUpdateTransformFlags UpdateTransfo...,
    ETeleportType Teleport
)

Recalculate the value of our component to world transform

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Public function Virtual Const

bool

 

CanEditChange

(
    const FProperty* InProperty
)

Called by the editor to query whether a property of this object is allowed to be modified.

Public function Virtual Const

void

 

GetLifetimeReplicatedProps

(
    TArray< FLifetimeProperty >& OutLi...
)

Returns properties that are replicated for the lifetime of the actor channel

Public function Virtual Const

bool

 

IsPostLoadThreadSafe()

Called during async load to determine if PostLoad can be called on the loading thread.

Public function Virtual

void

 

PostEditChangeChainProperty

(
    FPropertyChangedChainEvent& Proper...
)

This alternate version of PostEditChange is called when properties inside structs are modified.

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

PostInterpChange

(
    FProperty* PropertyThatChanged
)

This is called when property is modified by InterpPropertyTracks

Public function Virtual

void

 

PostNetReceive()

Called right after receiving a bunch

Public function Virtual

void

 

PostRepNotifies()

Called right after calling all OnRep notifies (called even when there are no notifies)

Public function Virtual

void

 

PreNetReceive()

Called right before receiving a bunch

Enums

Name

Description

Private enum

EVisibilityPropagation

Enum that dictates what propagation policy to follow when calling SetVisibility or SetHiddenInGame recursively

Constants

Name

Description

SkipUpdateOverlapsOptimEnabled

Global flag to enable/disable overlap optimizations, settable with p.SkipUpdateOverlapsOptimEnabled cvar

Deprecated Functions

Name Description

Public function

bool

 

AttachTo

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

This function is deprecated, please use AttachToComponent instead.

Public function Virtual

void

 

DetachFromParent

(
    bool bMaintainWorldPosition,
    bool bCallModify
)

This function is deprecated, please use DetachFromComponent() instead.

Public function

bool

 

K2_AttachTo

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

This function is deprecated, please use AttachToComponent() instead.

Public function

bool

 

SnapTo

(
    USceneComponent* InParent,
    FName InSocketName
)

Use AttachToComponent() instead.

See Also

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss