Header <Components/PrimitiveComponent.h>

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

Includes 33

<CoreMinimal.h>
<Algo/Copy.h>
<EngineStats.h>
<HAL/ThreadSafeCounter.h>
<UObject/ObjectMacros.h>
<UObject/UObjectGlobals.h>
<Misc/Guid.h>
<Interfaces/IPhysicsComponent.h>
<Templates/SubclassOf.h>
<Engine/EngineTypes.h>
<Engine/ScopedMovementUpdate.h>
<Engine/OverlapInfo.h>
<Components/SceneComponent.h>
<Components/ActorPrimitiveComponentInterface.h>
<RenderCommandFence.h>
<GameFramework/Actor.h>
<CollisionQueryParams.h>
<SceneTypes.h>
<Engine/EngineTypes.h>
<PhysicsEngine/BodyInstance.h>
<Engine/TextureStreamingTypes.h>
<AI/Navigation/NavRelevantInterface.h>
<VT/RuntimeVirtualTextureEnum.h>
<HitProxies.h>
<Interfaces/Interface_AsyncCompilation.h>
<HLOD/HLODBatchingPolicy.h>
<HLOD/HLODLevelExclusion.h>
<Stats/Stats.h>
<PSOPrecacheFwd.h>
<MeshDrawCommandStatsDefines.h>
<PrimitiveSceneInfoData.h>
<InputCoreTypes.h>
<PSOPrecache.h>

Contents

UPrimitiveComponent
PrimitiveComponents are SceneComponents that contain or generate some sort of geometry, generally to be rendered or used as collision data. There are several subclasses for the various types of geometry, but the most…
(uclass class : USceneComponent)
Functions12 free functions
(namespace scope)

class UPrimitiveComponent

class UPrimitiveComponent : public USceneComponent, public INavRelevantInterface, public IInterface_AsyncCompilation, public IPhysicsComponentUCLASSabstractHideCategories=(Mobility, VirtualTexture)ShowCategories=(PhysicsVolume)MinimalAPI
PrimitiveComponents are SceneComponents that contain or generate some sort of geometry, generally to be rendered or used as collision data. There are several subclasses for the various types of geometry, but the most…

Constructors 2

UPrimitiveComponent
UPrimitiveComponent(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get());
UPrimitiveComponent(FVTableHelper& Helper);
Default UObject constructor.
~UPrimitiveComponent

Member functions 366

GetLightmapType
ELightmapType GetLightmapType() const;
SetLightmapType
void SetLightmapType(ELightmapType InLightmapType);
IsAttachedToStreamingManager
bool IsAttachedToStreamingManager() const;
Whether this primitive is referenced by the streaming manager and should sent callbacks when detached or destroyed
GetGenerateOverlapEvents
bool GetGenerateOverlapEvents() const;UFUNCTION
If true, this component will generate overlap events when it is overlapping other components (eg Begin Overlap). Both components (this and the other) must have this enabled for overlap events to occur.
SetGenerateOverlapEvents
void SetGenerateOverlapEvents(bool bInGenerateOverlapEvents);UFUNCTION
Modifies value returned by GetGenerateOverlapEvents()
SetLightingChannels
void SetLightingChannels(bool bChannel0, bool bChannel1, bool bChannel2);UFUNCTIONBlueprintCallableCategory=Rendering|Components
InvalidateLumenSurfaceCache
void InvalidateLumenSurfaceCache();UFUNCTIONBlueprintCallableCategory=Rendering|Lighting
Invalidates Lumen surface cache and forces it to be refreshed. Useful to make material updates more responsive.
IsExcludedFromHLODLevel
bool IsExcludedFromHLODLevel(EHLODLevelExclusion HLODLevel) const;UFUNCTIONBlueprintCallableCategory=HLOD
Whether this primitive is excluded from the specified HLOD level
SetExcludedFromHLODLevel
void SetExcludedFromHLODLevel(EHLODLevelExclusion HLODLevel, bool bExcluded);UFUNCTIONBlueprintCallableCategory=HLOD
Exclude this primitive from the specified HLOD level
GetRuntimeVirtualTextures
virtual TArray<URuntimeVirtualTexture*> const& GetRuntimeVirtualTextures() const;
Get the array of runtime virtual textures into which we render the mesh for this actor.
GetVirtualTextureRenderPassType
virtual ERuntimeVirtualTextureMainPassType GetVirtualTextureRenderPassType() const;
Get the runtime virtual texture pass settings.
GetVirtualTextureMainPassMaxDrawDistance
virtual float GetVirtualTextureMainPassMaxDrawDistance() const;
Get the max draw distance to use in the main pass when also rendering to a runtime virtual texture. This is combined with the other max draw distance settings.
GetPrimitiveSceneId
FPrimitiveComponentId GetPrimitiveSceneId() const;
Used by the renderer, to identify a component across re-registers.
BeginPlay
virtual void BeginPlay() override;
Used to detach physics objects before simulation begins. This is needed because at runtime we can't have simulated objects inside the attachment hierarchy
AreAllCollideableDescendantsRelative
virtual bool AreAllCollideableDescendantsRelative(bool bAllowCachedValue = true) const;protected
Returns true if all descendant components that we can possibly overlap with use relative location and rotation.
GetSceneData
FPrimitiveSceneInfoData& GetSceneData();
GetAttachmentCounter
FThreadSafeCounter* GetAttachmentCounter();
GetRayTracingGroupId
int32 GetRayTracingGroupId() const;
WasRecentlyRendered
bool WasRecentlyRendered(float Tolerance = 0.2f) const;UFUNCTIONCategory=RenderingBlueprintCallable
Returns true if this component has been rendered "recently", with a tolerance in seconds to define what "recent" means. e.g.: If a tolerance of 0.1 is used, this function will return true only if the actor was…
SetLastRenderTime
void SetLastRenderTime(float InLastRenderTime);
GetLastRenderTime
float GetLastRenderTime() const;
GetLastRenderTimeOnScreen
float GetLastRenderTimeOnScreen() const;
SetMeshDrawCommandStatsCategory
void SetMeshDrawCommandStatsCategory(FName StatsCategory);
void SetMeshDrawCommandStatsCategory(FName StatsCategory);
GetMeshDrawCommandStatsCategory
FName GetMeshDrawCommandStatsCategory() const;
SetupPrecachePSOParams
virtual void SetupPrecachePSOParams(FPSOPrecacheParams& Params);
Setup the parameter struct used to precache the PSOs used by this component. Precaching uses certain component attributes to derive the shader or state used to render the component such as static lighting, cast…
CollectPSOPrecacheData
virtual void CollectPSOPrecacheData(const FPSOPrecacheParams& BasePrecachePSOParams, FMaterialInterfacePSOPrecacheParamsList& OutParams);
Collect all the data required for PSO precaching
PrecachePSOs
virtual void PrecachePSOs() override;
Precache all PSOs which can be used by the primitive component
RequestRecreateRenderStateWhenPSOPrecacheFinished
void RequestRecreateRenderStateWhenPSOPrecacheFinished(const FGraphEventArray& PSOPrecacheCompileEvents);
Schedule task to mark render state dirty when the PSO precaching tasks are done
IsPSOPrecaching
bool IsPSOPrecaching() const;
Check if PSOs are still precaching
ShouldRenderProxyFallbackToDefaultMaterial
bool ShouldRenderProxyFallbackToDefaultMaterial() const;
Whether the render proxy should fallback to the default material because the PSOs are still precaching
CheckPSOPrecachingAndBoostPriority
bool CheckPSOPrecachingAndBoostPriority(EPSOPrecachePriority PSOPrecachePriority = EPSOPrecachePriority::High);
Check if PSOs are still precaching and boost priority if not done yet. PSOPrecachePriority specifies the new priority to boost to. calls that would reduce the current priority are ignored, highest pri is used for…
GetUsedMaterialPropertyDesc
FPrimitiveMaterialPropertyDescriptor GetUsedMaterialPropertyDesc(ERHIFeatureLevel::Type FeatureLevel) const;protected
Examines the used materials (GetUsedMaterials) and returns a descriptor. This may be called when there is no proxy created which can be useful. But will use the information in the proxy if it is present.
UsePSOPrecacheRenderProxyDelay
virtual bool UsePSOPrecacheRenderProxyDelay() const;protected
Returns true if this component opts in to participate in the render proxy delay mechanism that kicks in if PSO precaching hasn't finished. Otherwise, PSO precaching will still be active but the render proxy will be…
IgnoreActorWhenMoving
void IgnoreActorWhenMoving(AActor* Actor, bool bShouldIgnore);UFUNCTIONBlueprintCallableCategory=Collision
Tells this component whether to ignore collision with all components of a specific Actor when this component is moved. Components on the other Actor may also need to be told to do the same when they move. Does not…
CopyArrayOfMoveIgnoreActors
TArray<AActor*> CopyArrayOfMoveIgnoreActors();UFUNCTIONBlueprintCallableCategory=Collision
Returns the list of actors we currently ignore when moving.
GetMoveIgnoreActors
const TArray<AActor*>& GetMoveIgnoreActors() const;
Returns the list of actors (as WeakObjectPtr) we currently ignore when moving.
ClearMoveIgnoreActors
void ClearMoveIgnoreActors();UFUNCTIONBlueprintCallableCategory=Collision
Clear the list of actors we ignore when moving.
IgnoreComponentWhenMoving
void IgnoreComponentWhenMoving(UPrimitiveComponent* Component, bool bShouldIgnore);UFUNCTIONBlueprintCallableCategory=Collision
Tells this component whether to ignore collision with another component when this component is moved. The other components may also need to be told to do the same when they move. Does not affect movement of this…
CopyArrayOfMoveIgnoreComponents
TArray<UPrimitiveComponent*> CopyArrayOfMoveIgnoreComponents();UFUNCTIONBlueprintCallableCategory=Collision
Returns the list of actors we currently ignore when moving.
GetMoveIgnoreComponents
const TArray<UPrimitiveComponent*>& GetMoveIgnoreComponents() const;
Returns the list of components we currently ignore when moving.
ClearMoveIgnoreComponents
void ClearMoveIgnoreComponents();UFUNCTIONBlueprintCallableCategory=Collision
Clear the list of components we ignore when moving.
SetMoveIgnoreMask
void SetMoveIgnoreMask(FMaskFilter InMoveIgnoreMask);
Set the mask filter we use when moving.
GetMoveIgnoreMask
FMaskFilter GetMoveIgnoreMask() const;
Get the mask filter we use when moving.
ShouldComponentIgnoreHitResult
virtual bool ShouldComponentIgnoreHitResult(FHitResult const& TestHit, EMoveComponentFlags MoveFlags);
Should the hit result be ignored based on this component
SetMaskFilterOnBodyInstance
void SetMaskFilterOnBodyInstance(FMaskFilter InMaskFilter);
Set the mask filter checked when others move into us.
GetMaskFilterOnBodyInstance
FMaskFilter GetMaskFilterOnBodyInstance(FMaskFilter InMaskFilter) const;
Get the mask filter checked when others move into us.
GetCustomPrimitiveDataIndexForScalarParameter
int32 GetCustomPrimitiveDataIndexForScalarParameter(FName ParameterName) const;UFUNCTIONBlueprintCallableCategory=Rendering|Material
Gets the index of the scalar parameter for the custom primitive data array
GetCustomPrimitiveDataIndexForVectorParameter
int32 GetCustomPrimitiveDataIndexForVectorParameter(FName ParameterName) const;UFUNCTIONBlueprintCallableCategory=Rendering|Material
Gets the index of the vector parameter for the custom primitive data array
SetScalarParameterForCustomPrimitiveData
void SetScalarParameterForCustomPrimitiveData(FName ParameterName, float Value);UFUNCTIONBlueprintCallableCategory=Rendering|Material
Set a scalar parameter for custom primitive data. This sets the run-time data only, so it doesn't serialize.
SetVectorParameterForCustomPrimitiveData
void SetVectorParameterForCustomPrimitiveData(FName ParameterName, FVector4 Value);UFUNCTIONBlueprintCallableCategory=Rendering|Material
Set a vector parameter for custom primitive data. This sets the run-time data only, so it doesn't serialize.
SetCustomPrimitiveDataFloat
void SetCustomPrimitiveDataFloat(int32 DataIndex, float Value);UFUNCTIONBlueprintCallableCategory=Rendering|Material
Set custom primitive data at index DataIndex. This sets the run-time data only, so it doesn't serialize.
SetCustomPrimitiveDataVector2
void SetCustomPrimitiveDataVector2(int32 DataIndex, FVector2D Value);UFUNCTIONBlueprintCallableCategory=Rendering|Material
Set custom primitive data, two floats at once, from index DataIndex to index DataIndex + 1. This sets the run-time data only, so it doesn't serialize.
SetCustomPrimitiveDataVector2f
void SetCustomPrimitiveDataVector2f(int32 DataIndex, FVector2f Value);
Set custom primitive data, two floats at once, from index DataIndex to index DataIndex + 1. This sets the run-time data only, so it doesn't serialize.
SetCustomPrimitiveDataVector3
void SetCustomPrimitiveDataVector3(int32 DataIndex, FVector Value);UFUNCTIONBlueprintCallableCategory=Rendering|Material
Set custom primitive data, three floats at once, from index DataIndex to index DataIndex + 2. This sets the run-time data only, so it doesn't serialize.
SetCustomPrimitiveDataVector3f
void SetCustomPrimitiveDataVector3f(int32 DataIndex, FVector3f Value);
Set custom primitive data, three floats at once, from index DataIndex to index DataIndex + 2. This sets the run-time data only, so it doesn't serialize.
SetCustomPrimitiveDataVector4
void SetCustomPrimitiveDataVector4(int32 DataIndex, FVector4 Value);UFUNCTIONBlueprintCallableCategory=Rendering|Material
Set custom primitive data, four floats at once, from index DataIndex to index DataIndex + 3. This sets the run-time data only, so it doesn't serialize.
SetCustomPrimitiveDataVector4f
void SetCustomPrimitiveDataVector4f(int32 DataIndex, FVector4f Value);
Set custom primitive data, four floats at once, from index DataIndex to index DataIndex + 3. This sets the run-time data only, so it doesn't serialize.
SetCustomPrimitiveDataFloatArray
void SetCustomPrimitiveDataFloatArray(int32 DataIndex, const TArray<float>& Values);UFUNCTIONBlueprintCallableCategory=Rendering|Material
void SetCustomPrimitiveDataFloatArray(int32 DataIndex, TConstArrayView<float> Values);
Set custom primitive data, an array of floats at once, from index DataIndex to index DataIndex + Values.Num(). This sets the run-time data only, so it doesn't serialize.
GetCustomPrimitiveData
const FCustomPrimitiveData& GetCustomPrimitiveData() const;
Get the custom primitive data for this primitive component.
ResetCustomPrimitiveData
void ResetCustomPrimitiveData();
Reset the custom primitive data of this primitive to the optional user defined default
SetScalarParameterForDefaultCustomPrimitiveData
void SetScalarParameterForDefaultCustomPrimitiveData(FName ParameterName, float Value);UFUNCTIONBlueprintCallableCategory=Rendering|Material
Set a scalar parameter for default custom primitive data. This will be serialized and is useful in construction scripts.
SetVectorParameterForDefaultCustomPrimitiveData
void SetVectorParameterForDefaultCustomPrimitiveData(FName ParameterName, FVector4 Value);UFUNCTIONBlueprintCallableCategory=Rendering|Material
Set a vector parameter for default custom primitive data. This will be serialized and is useful in construction scripts.
SetDefaultCustomPrimitiveDataFloat
void SetDefaultCustomPrimitiveDataFloat(int32 DataIndex, float Value);UFUNCTIONBlueprintCallableCategory=Rendering|Material
Set default custom primitive data at index DataIndex, and marks the render state dirty
SetDefaultCustomPrimitiveDataVector2
void SetDefaultCustomPrimitiveDataVector2(int32 DataIndex, FVector2D Value);UFUNCTIONBlueprintCallableCategory=Rendering|Material
Set default custom primitive data, two floats at once, from index DataIndex to index DataIndex + 1, and marks the render state dirty
SetDefaultCustomPrimitiveDataVector2f
void SetDefaultCustomPrimitiveDataVector2f(int32 DataIndex, FVector2f Value);
Set default custom primitive data, two floats at once, from index DataIndex to index DataIndex + 1, and marks the render state dirty
SetDefaultCustomPrimitiveDataVector3
void SetDefaultCustomPrimitiveDataVector3(int32 DataIndex, FVector Value);UFUNCTIONBlueprintCallableCategory=Rendering|Material
Set default custom primitive data, three floats at once, from index DataIndex to index DataIndex + 2, and marks the render state dirty
SetDefaultCustomPrimitiveDataVector3f
void SetDefaultCustomPrimitiveDataVector3f(int32 DataIndex, FVector3f Value);
Set default custom primitive data, three floats at once, from index DataIndex to index DataIndex + 2, and marks the render state dirty
SetDefaultCustomPrimitiveDataVector4
void SetDefaultCustomPrimitiveDataVector4(int32 DataIndex, FVector4 Value);UFUNCTIONBlueprintCallableCategory=Rendering|Material
Set default custom primitive data, four floats at once, from index DataIndex to index DataIndex + 3, and marks the render state dirty
SetDefaultCustomPrimitiveDataVector4f
void SetDefaultCustomPrimitiveDataVector4f(int32 DataIndex, FVector4f Value);
Set default custom primitive data, four floats at once, from index DataIndex to index DataIndex + 3, and marks the render state dirty
SetDefaultCustomPrimitiveDataFloatArray
void SetDefaultCustomPrimitiveDataFloatArray(int32 DataIndex, const TArray<float>& Values);UFUNCTIONBlueprintCallableCategory=Rendering|Material
void SetDefaultCustomPrimitiveDataFloatArray(int32 DataIndex, TConstArrayView<float> Values);
Set default custom primitive data, an array floats at once, from index DataIndex to index DataIndex + Values.Num(), and marks the render state dirty
GetDefaultCustomPrimitiveData
const FCustomPrimitiveData& GetDefaultCustomPrimitiveData() const;
Get the default custom primitive data for this primitive component.
SetCustomPrimitiveDataInternal
void SetCustomPrimitiveDataInternal(int32 DataIndex, TConstArrayView<float> Values);protected
Insert an array of floats into the CustomPrimitiveData, starting at the given index
SetDefaultCustomPrimitiveData
void SetDefaultCustomPrimitiveData(int32 DataIndex, TConstArrayView<float> Values);protected
Insert an array of floats into the CustomPrimitiveData defaults, starting at the given index
ConvertSweptOverlapsToCurrentOverlaps
template<typename AllocatorType> bool ConvertSweptOverlapsToCurrentOverlaps(TArray<FOverlapInfo, AllocatorType>& OutOverlapsAtEndLocation, const TOverlapArrayView& SweptOverlaps, int32 SweptOverlapsIndex, const FVector& EndLocation, const FQuat& EndRotationQuat);
Convert a set of overlaps from a sweep to a subset that includes only those at the end location (filling in OverlapsAtEndLocation).
ConvertRotationOverlapsToCurrentOverlaps
template<typename AllocatorType> bool ConvertRotationOverlapsToCurrentOverlaps(TArray<FOverlapInfo, AllocatorType>& OutOverlapsAtEndLocation, const TOverlapArrayView& CurrentOverlaps);
Convert a set of overlaps from a symmetric change in rotation to a subset that includes only those at the end location (filling in OverlapsAtEndLocation).
BeginComponentOverlap
void BeginComponentOverlap(const FOverlapInfo& OtherOverlap, bool bDoNotifies);
Begin tracking an overlap interaction with the component specified.
EndComponentOverlap
void EndComponentOverlap(const FOverlapInfo& OtherOverlap, bool bDoNotifies=true, bool bSkipNotifySelf=false);
Finish tracking an overlap interaction that is no longer occurring between this component and the component specified.
IsOverlappingComponent
bool IsOverlappingComponent(const UPrimitiveComponent* OtherComp) const;UFUNCTIONBlueprintPureCategory=Collision
bool IsOverlappingComponent(const FOverlapInfo& Overlap) const;
Check whether this component is overlapping another component.
IsOverlappingActor
bool IsOverlappingActor(const AActor* Other) const;UFUNCTIONBlueprintPureCategory=Collision
Check whether this component is overlapping any component of the given Actor.
GetOverlapsWithActor
bool GetOverlapsWithActor(const AActor* Actor, TArray<FOverlapInfo>& OutOverlaps) const;
Appends list of overlaps with components owned by the given actor to the 'OutOverlaps' array. Returns true if any overlaps were added.
GetOverlappingActors
void GetOverlappingActors(TArray<AActor*>& OverlappingActors, TSubclassOf<AActor> ClassFilter=nullptr) const;UFUNCTIONBlueprintPureCategory=Collision
void GetOverlappingActors(TSet<AActor*>& OverlappingActors, TSubclassOf<AActor> ClassFilter=nullptr) const;
Returns a list of actors that this component is overlapping.
GetOverlappingComponents
void GetOverlappingComponents(TArray<UPrimitiveComponent*>& OutOverlappingComponents) const;UFUNCTIONBlueprintPureCategory=Collision
void GetOverlappingComponents(TSet<UPrimitiveComponent*>& OutOverlappingComponents) const;
Returns unique list of components this component is overlapping.
GetOverlapInfos
const TArray<FOverlapInfo>& GetOverlapInfos() const;
Returns list of components this component is overlapping.
UpdateOverlapsImpl
virtual bool UpdateOverlapsImpl(const TOverlapArrayView* NewPendingOverlaps=nullptr, bool bDoNotifies=true, const TOverlapArrayView* OverlapsAtEndLocation=nullptr) override;
Queries world and updates overlap tracking state for this component.
GetIgnoreBoundsForEditorFocus
virtual bool GetIgnoreBoundsForEditorFocus() const;UFUNCTIONBlueprintCallableCategory=Editor
Whether or not the bounds of this component should be considered when focusing the editor camera to an actor with this component in it. Useful for debug components which need a bounds for rendering but don't…
SetIgnoreBoundsForEditorFocus
void SetIgnoreBoundsForEditorFocus(bool bIgnore);UFUNCTIONBlueprintCallableCategory=Editor
Set if we should ignore bounds when focusing the editor camera.
UpdatePhysicsVolume
virtual void UpdatePhysicsVolume(bool bTriggerNotifiers) override;
Update current physics volume for this component, if bShouldUpdatePhysicsVolume is true. Overridden to use the overlaps to find the physics volume.
ComponentOverlapMulti
bool ComponentOverlapMulti(TArray<struct FOverlapResult>& OutOverlaps, const class UWorld* InWorld, const FVector& Pos, const FQuat& Rot, ECollisionChannel TestChannel, const struct FComponentQueryParams& Params = FComponentQueryParams::DefaultComponentQueryParams, const struct FCollisionObjectQueryParams& ObjectQueryParams = FCollisionObjectQueryParams::DefaultObjectQueryParam) const;
bool ComponentOverlapMulti(TArray<struct FOverlapResult>& OutOverlaps, const class UWorld* InWorld, const FVector& Pos, const FRotator& Rot, ECollisionChannel TestChannel, const struct FComponentQueryParams& Params = FComponentQueryParams::DefaultComponentQueryParams, const struct FCollisionObjectQueryParams& ObjectQueryParams = FCollisionObjectQueryParams::DefaultObjectQueryParam) const;
Test the collision of the supplied component at the supplied location/rotation, and determine the set of components that it overlaps.
GetLightingAttachmentRoot
const UPrimitiveComponent* GetLightingAttachmentRoot() const;
Walks up the attachment tree until a primitive component with LightAttachmentsAsGroup enabled is found. This component will effectively act as the root of the attachment group. Return nullptr if none is found.
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;protected
Override this method for custom behavior for ComponentOverlapMulti()
SetBoundsScale
void SetBoundsScale(float NewBoundsScale=1.f);UFUNCTIONBlueprintCallableCategory=Rendering
Scale the bounds of this object, used for frustum culling. Useful for features like WorldPositionOffset.
GetMaterial
virtual class UMaterialInterface* GetMaterial(int32 ElementIndex) const;UFUNCTIONBlueprintPureCategory=Rendering|Material
Returns the material used by the element at the specified index
GetMaterialIndex
virtual int32 GetMaterialIndex(FName MaterialSlotName) const;UFUNCTIONBlueprintCallableCategory=Rendering|Material
GetMaterialSlotNames
virtual TArray<FName> GetMaterialSlotNames() const;UFUNCTIONBlueprintCallableCategory=Rendering|Material
IsMaterialSlotNameValid
virtual bool IsMaterialSlotNameValid(FName MaterialSlotName) const;UFUNCTIONBlueprintCallableCategory=Rendering|Material
GetMaterialByName
virtual class UMaterialInterface* GetMaterialByName(FName MaterialSlotName) const;UFUNCTIONBlueprintCallableCategory=Rendering|Material
Returns the material used by the element in the slot with the specified name.
SetMaterial
virtual void SetMaterial(int32 ElementIndex, class UMaterialInterface* Material);UFUNCTIONBlueprintCallableCategory=Rendering|Material
Changes the material applied to an element of the mesh.
SetMaterialByName
virtual void SetMaterialByName(FName MaterialSlotName, class UMaterialInterface* Material);UFUNCTIONBlueprintCallableCategory=Rendering|Material
Changes the material applied to an element of the mesh.
CreateDynamicMaterialInstance
virtual class UMaterialInstanceDynamic* CreateDynamicMaterialInstance(int32 ElementIndex, class UMaterialInterface* SourceMaterial = NULL, FName OptionalName = NAME_None);UFUNCTIONBlueprintCallableCategory=Rendering|Material
Creates a Dynamic Material Instance for the specified element index, optionally from the supplied material.
GetMaterialFromCollisionFaceIndex
virtual UMaterialInterface* GetMaterialFromCollisionFaceIndex(int32 FaceIndex, int32& SectionIndex) const;UFUNCTIONBlueprintPureCategory=Rendering|Material
Try and retrieve the material applied to a particular collision face of mesh. Used with face index returned from collision trace.
GetWalkableSlopeOverride
const struct FWalkableSlopeOverride& GetWalkableSlopeOverride() const;UFUNCTIONBlueprintPureCategory=Physics
Returns the slope override struct for this component.
SetWalkableSlopeOverride
virtual void SetWalkableSlopeOverride(const FWalkableSlopeOverride& NewOverride);UFUNCTIONBlueprintCallableCategory=Physics
Sets a new slope override for this component instance.
SetSimulatePhysics
virtual void SetSimulatePhysics(bool bSimulate);UFUNCTIONBlueprintCallableCategory=Physics
When this component is a simple/single body, this will enable or disable simulation on that body. In addition, if this component is currently attached to something, beginning simulation will detach it. Note that…
SetStaticWhenNotMoveable
void SetStaticWhenNotMoveable(bool bInStaticWhenNotMoveable);UFUNCTIONBlueprintCallableCategory=Physics
GetStaticWhenNotMoveable
bool GetStaticWhenNotMoveable() const;UFUNCTIONBlueprintCallableCategory=Physics
CanEditSimulatePhysics
virtual bool CanEditSimulatePhysics();
Determines whether or not the simulate physics setting can be edited interactively on this component
SetConstraintMode
virtual void SetConstraintMode(EDOFMode::Type ConstraintMode);UFUNCTIONBlueprintCallableCategory=Physics
Sets the constraint mode of the component.
AddImpulse
virtual void AddImpulse(FVector Impulse, FName BoneName = NAME_None, bool bVelChange = false);UFUNCTIONBlueprintCallableCategory=Physics
Add an impulse to a single rigid body. Good for one time instant burst.
AddAngularImpulseInRadians
virtual void AddAngularImpulseInRadians(FVector Impulse, FName BoneName = NAME_None, bool bVelChange = false);UFUNCTIONBlueprintCallableCategory=Physics
Add an angular impulse to a single rigid body. Good for one time instant burst.
AddAngularImpulseInDegrees
void AddAngularImpulseInDegrees(FVector Impulse, FName BoneName = NAME_None, bool bVelChange = false);UFUNCTIONBlueprintCallableCategory=Physics
Add an angular impulse to a single rigid body. Good for one time instant burst.
AddImpulseAtLocation
virtual void AddImpulseAtLocation(FVector Impulse, FVector Location, FName BoneName = NAME_None);UFUNCTIONBlueprintCallableCategory=Physics
Add an impulse to a single rigid body at a specific location.
AddVelocityChangeImpulseAtLocation
virtual void AddVelocityChangeImpulseAtLocation(FVector Impulse, FVector Location, FName BoneName = NAME_None);UFUNCTIONBlueprintCallableCategory=Physics
Add an impulse to a single rigid body at a specific location. The Strength is taken as a change in angular velocity instead of an impulse (ie. mass will have no effect).
AddRadialImpulse
virtual void AddRadialImpulse(FVector Origin, float Radius, float Strength, enum ERadialImpulseFalloff Falloff, bool bVelChange = false);UFUNCTIONBlueprintCallableCategory=Physics
Add an impulse to all rigid bodies in this component, radiating out from the specified position.
AddForce
virtual void AddForce(FVector Force, FName BoneName = NAME_None, bool bAccelChange = false);UFUNCTIONBlueprintCallableCategory=Physics
Add a force to a single rigid body. 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.
AddForceAtLocation
virtual void AddForceAtLocation(FVector Force, FVector Location, FName BoneName = NAME_None);UFUNCTIONBlueprintCallableCategory=Physics
Add a force to a single rigid body at a particular location in world space. 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.
AddForceAtLocationLocal
virtual void AddForceAtLocationLocal(FVector Force, FVector Location, FName BoneName = NAME_None);UFUNCTIONBlueprintCallableCategory=Physics
Add a force to a single rigid body at a particular location. Both Force and Location should be in body space. This is like a 'thruster'. Good for adding a burst over some (non zero) time. Should be called every frame…
AddRadialForce
virtual void AddRadialForce(FVector Origin, float Radius, float Strength, enum ERadialImpulseFalloff Falloff, bool bAccelChange = false);UFUNCTIONBlueprintCallableCategory=Physics
Add a force to all bodies in this component, originating from the supplied world-space location.
AddTorqueInRadians
virtual void AddTorqueInRadians(FVector Torque, FName BoneName = NAME_None, bool bAccelChange = false);UFUNCTIONBlueprintCallableCategory=Physics
Add a torque to a single rigid body.
AddTorqueInDegrees
void AddTorqueInDegrees(FVector Torque, FName BoneName = NAME_None, bool bAccelChange = false);UFUNCTIONBlueprintCallableCategory=Physics
Add a torque to a single rigid body.
SetPhysicsLinearVelocity
virtual void SetPhysicsLinearVelocity(FVector NewVel, bool bAddToCurrent = false, FName BoneName = NAME_None);UFUNCTIONBlueprintCallableCategory=Physics
Set the linear velocity of a single body. This should be used cautiously - it may be better to use AddForce or AddImpulse.
GetPhysicsLinearVelocity
FVector GetPhysicsLinearVelocity(FName BoneName = NAME_None);UFUNCTIONBlueprintCallableCategory=Physics
Get the linear velocity of a single body.
GetPhysicsLinearVelocityAtPoint
FVector GetPhysicsLinearVelocityAtPoint(FVector Point, FName BoneName = NAME_None);UFUNCTIONBlueprintCallableCategory=Physics
Get the linear velocity of a point on a single body.
SetAllPhysicsLinearVelocity
virtual void SetAllPhysicsLinearVelocity(FVector NewVel, bool bAddToCurrent = false);UFUNCTIONBlueprintCallableCategory=Physics
Set the linear velocity of all bodies in this component.
SetPhysicsAngularVelocityInRadians
virtual void SetPhysicsAngularVelocityInRadians(FVector NewAngVel, bool bAddToCurrent = false, FName BoneName = NAME_None);UFUNCTIONBlueprintCallableCategory=Physics
Set the angular velocity of a single body. This should be used cautiously - it may be better to use AddTorque or AddImpulse.
SetPhysicsAngularVelocityInDegrees
void SetPhysicsAngularVelocityInDegrees(FVector NewAngVel, bool bAddToCurrent = false, FName BoneName = NAME_None);UFUNCTIONBlueprintCallableCategory=Physics
Set the angular velocity of a single body. This should be used cautiously - it may be better to use AddTorque or AddImpulse.
SetPhysicsMaxAngularVelocityInDegrees
void SetPhysicsMaxAngularVelocityInDegrees(float NewMaxAngVel, bool bAddToCurrent = false, FName BoneName = NAME_None);UFUNCTIONBlueprintCallableCategory=Physics
Set the maximum angular velocity of a single body.
SetPhysicsMaxAngularVelocityInRadians
void SetPhysicsMaxAngularVelocityInRadians(float NewMaxAngVel, bool bAddToCurrent = false, FName BoneName = NAME_None);UFUNCTIONBlueprintCallableCategory=Physics
Set the maximum angular velocity of a single body.
GetPhysicsAngularVelocityInDegrees
FVector GetPhysicsAngularVelocityInDegrees(FName BoneName = NAME_None) const;UFUNCTIONBlueprintCallableCategory=Physics
Get the angular velocity of a single body, in degrees per second.
GetPhysicsAngularVelocityInRadians
FVector GetPhysicsAngularVelocityInRadians(FName BoneName = NAME_None) const;UFUNCTIONBlueprintCallableCategory=Physics
Get the angular velocity of a single body, in radians per second.
GetCenterOfMass
FVector GetCenterOfMass(FName BoneName = NAME_None) const;UFUNCTIONBlueprintPureCategory=Physics
Get the center of mass of a single body. In the case of a welded body this will return the center of mass of the entire welded body (including its parent and children) Objects that are not simulated return (0,0,0) as…
SetCenterOfMass
void SetCenterOfMass(FVector CenterOfMassOffset, FName BoneName = NAME_None);UFUNCTIONBlueprintCallableCategory=Physics
Set the center of mass of a single body. This will offset the physx-calculated center of mass. Note that in the case where multiple bodies are attached together, the center of mass will be set for the entire group.
WakeRigidBody
virtual void WakeRigidBody(FName BoneName = NAME_None);UFUNCTIONBlueprintCallableCategory=Physics
'Wake' physics simulation for a single body.
PutRigidBodyToSleep
void PutRigidBodyToSleep(FName BoneName = NAME_None);UFUNCTIONBlueprintCallableCategory=Physics
Force a single body back to sleep.
SetNotifyRigidBodyCollision
virtual void SetNotifyRigidBodyCollision(bool bNewNotifyRigidBodyCollision);UFUNCTIONBlueprintCallableCategory=Physics
Changes the value of bNotifyRigidBodyCollision
SetOwnerNoSee
void SetOwnerNoSee(bool bNewOwnerNoSee);UFUNCTIONBlueprintCallableCategory=Rendering
Changes the value of bOwnerNoSee.
SetOnlyOwnerSee
void SetOnlyOwnerSee(bool bNewOnlyOwnerSee);UFUNCTIONBlueprintCallableCategory=Rendering
Changes the value of bOnlyOwnerSee.
SetVisibleInRayTracing
void SetVisibleInRayTracing(bool bNewVisibleInRayTracing);UFUNCTIONBlueprintCallableCategory=Rendering
Changes the value of bIsVisibleInRayTracing.
SetCastShadow
void SetCastShadow(bool NewCastShadow);UFUNCTIONBlueprintCallableCategory=Rendering
Changes the value of CastShadow.
SetEmissiveLightSource
void SetEmissiveLightSource(bool NewEmissiveLightSource);UFUNCTIONBlueprintCallableCategory=Rendering
Changes the value of EmissiveLightSource.
SetCastHiddenShadow
void SetCastHiddenShadow(bool NewCastHiddenShadow);UFUNCTIONBlueprintCallableCategory=Rendering
Changes the value of CastHiddenShadow.
SetCastInsetShadow
void SetCastInsetShadow(UPARAM(DisplayName="CastInsetShadow") bool bInCastInsetShadow);UFUNCTIONBlueprintCallableCategory=Rendering
Changes the value of CastInsetShadow.
SetCastContactShadow
void SetCastContactShadow(UPARAM(DisplayName = "CastContactShadow") bool bInCastContactShadow);UFUNCTIONBlueprintCallableCategory=Rendering
Changes the value of bCastContactShadow.
SetLightAttachmentsAsGroup
void SetLightAttachmentsAsGroup(UPARAM(DisplayName="LightAttachmentsAsGroup") bool bInLightAttachmentsAsGroup);UFUNCTIONBlueprintCallableCategory=Rendering
Changes the value of LightAttachmentsAsGroup.
SetExcludeFromLightAttachmentGroup
void SetExcludeFromLightAttachmentGroup(UPARAM(DisplayName = "ExcludeFromLightAttachmentGroup") bool bInExcludeFromLightAttachmentGroup);UFUNCTIONBlueprintCallableCategory=Rendering
Changes the value of ExcludeFromLightAttachmentGroup.
SetSingleSampleShadowFromStationaryLights
void SetSingleSampleShadowFromStationaryLights(bool bNewSingleSampleShadowFromStationaryLights);UFUNCTIONBlueprintCallableCategory=Rendering
Changes the value of bSingleSampleShadowFromStationaryLights.
SetTranslucentSortPriority
void SetTranslucentSortPriority(int32 NewTranslucentSortPriority);UFUNCTIONBlueprintCallableCategory=Rendering
Changes the value of TranslucentSortPriority.
SetTranslucencySortDistanceOffset
void SetTranslucencySortDistanceOffset(float NewTranslucencySortDistanceOffset);UFUNCTIONBlueprintCallableCategory=Rendering
Changes the value of TranslucencySortDistanceOffset.
SetAffectDistanceFieldLighting
void SetAffectDistanceFieldLighting(bool NewAffectDistanceFieldLighting);UFUNCTIONBlueprintCallableCategory=Rendering
Changes the value of Affect Distance Field Lighting
SetReceivesDecals
void SetReceivesDecals(bool bNewReceivesDecals);UFUNCTIONBlueprintCallableCategory=Rendering
Changes the value of bReceivesDecals.
SetHoldout
void SetHoldout(bool bNewHoldout);UFUNCTIONBlueprintCallableCategory=Rendering
Changes the value of bHoldout
SetAffectDynamicIndirectLighting
void SetAffectDynamicIndirectLighting(bool bNewAffectDynamicIndirectLighting);UFUNCTIONBlueprintCallableCategory=Rendering
Changes the value of bAffectDynamicIndirectLighting
SetAffectIndirectLightingWhileHidden
void SetAffectIndirectLightingWhileHidden(bool bNewAffectIndirectLightingWhileHidden);UFUNCTIONBlueprintCallableCategory=Rendering
Changes the value of bAffectIndirectLightingWhileHidden
SetCollisionEnabled
virtual void SetCollisionEnabled(ECollisionEnabled::Type NewType);UFUNCTIONBlueprintCallableCategory=Collision
Controls what kind of collision is enabled for this body
SetCollisionProfileName
virtual void SetCollisionProfileName(FName InCollisionProfileName, bool bUpdateOverlaps=true);UFUNCTIONBlueprintCallableCategory=Collision
Set Collision Profile Name This function is called by constructors when they set ProfileName This will change current CollisionProfileName to be this, and overwrite Collision Setting
GetCollisionProfileName
FName GetCollisionProfileName() const;UFUNCTIONBlueprintPureCategory=Collision
Get the collision profile name
SetCollisionObjectType
virtual void SetCollisionObjectType(ECollisionChannel Channel);UFUNCTIONBlueprintCallableCategory=Collision
Changes the collision channel that this object uses when it moves
K2_LineTraceComponent
bool K2_LineTraceComponent(FVector TraceStart, FVector TraceEnd, bool bTraceComplex, bool bShowTrace, bool bPersistentShowTrace, FVector& HitLocation, FVector& HitNormal, FName& BoneName, FHitResult& OutHit);UFUNCTIONBlueprintCallableCategory=Collision
Perform a line trace against a single component
K2_SphereTraceComponent
bool K2_SphereTraceComponent(FVector TraceStart, FVector TraceEnd, float SphereRadius, bool bTraceComplex, bool bShowTrace, bool bPersistentShowTrace, FVector& HitLocation, FVector& HitNormal, FName& BoneName, FHitResult& OutHit);UFUNCTIONBlueprintCallableCategory=Collision
Perform a sphere trace against a single component
K2_BoxOverlapComponent
bool K2_BoxOverlapComponent(FVector InBoxCentre, const FBox InBox, bool bTraceComplex, bool bShowTrace, bool bPersistentShowTrace, FVector& HitLocation, FVector& HitNormal, FName& BoneName, FHitResult& OutHit);UFUNCTIONBlueprintCallableCategory=Collision
Perform a box overlap against a single component as an AABB (No rotation)
K2_SphereOverlapComponent
bool K2_SphereOverlapComponent(FVector InSphereCentre, float InSphereRadius, bool bTraceComplex, bool bShowTrace, bool bPersistentShowTrace, FVector& HitLocation, FVector& HitNormal, FName& BoneName, FHitResult& OutHit);UFUNCTIONBlueprintCallableCategory=Collision
Perform a sphere overlap against a single component
SetRenderCustomDepth
void SetRenderCustomDepth(bool bValue);UFUNCTIONBlueprintCallableCategory=Rendering
Sets the bRenderCustomDepth property and marks the render state dirty.
SetCustomDepthStencilValue
void SetCustomDepthStencilValue(int32 Value);UFUNCTIONBlueprintCallableCategory=Rendering
Sets the CustomDepth stencil value (0 - 255) and marks the render state dirty.
SetCustomDepthStencilWriteMask
void SetCustomDepthStencilWriteMask(ERendererStencilMask WriteMaskBit);UFUNCTIONBlueprintCallableCategory=Rendering
Sets the CustomDepth stencil write mask and marks the render state dirty.
SetRenderInMainPass
void SetRenderInMainPass(bool bValue);UFUNCTIONBlueprintCallableCategory=Rendering
Sets bRenderInMainPass property and marks the render state dirty.
SetRenderInDepthPass
void SetRenderInDepthPass(bool bValue);UFUNCTIONBlueprintCallableCategory=Rendering
Sets bRenderInDepthPass property and marks the render state dirty.
SetVisibleInSceneCaptureOnly
void SetVisibleInSceneCaptureOnly(bool bValue);UFUNCTIONBlueprintCallableCategory=Rendering
Sets bVisibleInSceneCaptureOnly property and marks the render state dirty.
SetHiddenInSceneCapture
void SetHiddenInSceneCapture(bool bValue);UFUNCTIONBlueprintCallableCategory=Rendering
Sets bHideInSceneCapture property and marks the render state dirty.
SetFirstPersonPrimitiveType
void SetFirstPersonPrimitiveType(EFirstPersonPrimitiveType Value);UFUNCTIONBlueprintCallableCategory=Rendering
Sets FirstPersonPrimitiveType property and marks the render state dirty.
GetSceneProxy
FPrimitiveSceneProxy* GetSceneProxy() const;
AssignSceneProxy
void AssignSceneProxy(FPrimitiveSceneProxy* SceneProxy);
ReleaseSceneProxy
void ReleaseSceneProxy();
IsAlwaysVisible
bool IsAlwaysVisible() const;
Returns whether the primitive component's scene proxy is always visible.
SetLODParentPrimitive
void SetLODParentPrimitive(UPrimitiveComponent* InLODParentPrimitive);
Set the LOD parent component
GetLODParentPrimitive
UPrimitiveComponent* GetLODParentPrimitive() const;
Gets the LOD Parent, which is used to compute visibility when hierarchical LOD is enabled
ShouldRenderSelected
virtual bool ShouldRenderSelected() const;
Return true if the owner is selected and this component is selectable
GetLevelInstanceEditingState
bool GetLevelInstanceEditingState() const;
Returns true if the owning actor is part of a level instance which is being edited.
IsComponentIndividuallySelected
bool IsComponentIndividuallySelected() const;
Component is directly selected in the editor separate from its parent actor
HasStaticLighting
bool HasStaticLighting() const;
Return True if a primitive's parameters as well as its position is static during gameplay, and can thus use static lighting.
CanSkipGetTextureStreamingRenderAssetInfo
bool CanSkipGetTextureStreamingRenderAssetInfo() const;
Return true if primitive can skip getting texture streaming render asset info.
GetStreamingScale
virtual float GetStreamingScale() const;
HasValidSettingsForStaticLighting
virtual bool HasValidSettingsForStaticLighting(bool bOverlookInvalidComponents) const;
Returns true if the component is static and has the right static mesh setup to support lightmaps.
UsesOnlyUnlitMaterials
virtual bool UsesOnlyUnlitMaterials() const;
Returns true if only unlit materials are used for rendering, false otherwise.
GetLightMapResolution
virtual bool GetLightMapResolution(int32& Width, int32& Height) const;
Returns the lightmap resolution used for this primitive instance in the case of it supporting texture light/ shadow maps. 0 if not supported or no static shadowing.
GetStaticLightMapResolution
virtual int32 GetStaticLightMapResolution() const;
Returns the static lightmap resolution used for this primitive. 0 if not supported or no static shadowing.
GetLightAndShadowMapMemoryUsage
virtual void GetLightAndShadowMapMemoryUsage(int32& LightMapMemoryUsage, int32& ShadowMapMemoryUsage) const;
Returns the light and shadow map memory for this primitive in its out variables.
GetStaticLightingType
virtual ELightMapInteractionType GetStaticLightingType() const;
Requests whether the component will use texture, vertex or no lightmaps.
GetStreamingRenderAssetInfo
virtual void GetStreamingRenderAssetInfo(FStreamingTextureLevelContext& LevelContext, TArray<FStreamingRenderAssetPrimitiveInfo>& OutStreamingRenderAssets) const;
Enumerates the streaming textures/meshes used by the primitive.
GetStreamingRenderAssetInfoWithNULLRemoval
void GetStreamingRenderAssetInfoWithNULLRemoval(FStreamingTextureLevelContext& LevelContext, TArray<FStreamingRenderAssetPrimitiveInfo>& OutStreamingRenderAssets) const;
Call GetStreamingRenderAssetInfo and remove the elements with a NULL texture
BuildTextureStreamingData
bool BuildTextureStreamingData(ETextureStreamingBuildType BuildType, EMaterialQualityLevel::Type QualityLevel, ERHIFeatureLevel::Type FeatureLevel, TSet<FGuid>& DependentResources);
Update the streaming data of this component.
BuildTextureStreamingDataImpl
virtual bool BuildTextureStreamingDataImpl(ETextureStreamingBuildType BuildType, EMaterialQualityLevel::Type QualityLevel, ERHIFeatureLevel::Type FeatureLevel, TSet<FGuid>& DependentResources, bool& bOutSupportsBuildTextureStreamingData);
Component type implementation of updating the streaming data of this component.
GetStaticDepthPriorityGroup
virtual ESceneDepthPriorityGroup GetStaticDepthPriorityGroup() const;
Determines the DPG the primitive's primary elements are drawn in. Even if the primitive's elements are drawn in multiple DPGs, a primary DPG is needed for occlusion culling and shadow projection.
GetUsedMaterials
virtual void GetUsedMaterials(TArray<UMaterialInterface*>& OutMaterials, bool bGetDebugMaterials = false) const;
Retrieves the materials used in this component
GetUsedTextures
virtual void GetUsedTextures(TArray<UTexture*>& OutTextures, EMaterialQualityLevel::Type QualityLevel);
Returns the material textures used to render this primitive for the given platform. Internally calls GetUsedMaterials() and GetUsedTextures() for each material.
GetBodySetup
virtual class UBodySetup* GetBodySetup();
Return the BodySetup to use for this PrimitiveComponent (single body case)
SyncComponentToRBPhysics
void SyncComponentToRBPhysics();
Move this component to match the physics rigid body pose. Note, a warning will be generated if you call this function on a component that is attached to something
GetRenderMatrix
virtual FMatrix GetRenderMatrix() const;
Returns the matrix that should be used to render this component. Allows component class to perform graphical distortion to the component not supported by an FTransform NOTE: When overriding this method to alter the…
GetNumMaterials
virtual int32 GetNumMaterials() const;UFUNCTIONBlueprintPureCategory=Rendering|Material
Return number of material elements in this primitive
GetBodyInstance
virtual FBodyInstance* GetBodyInstance(FName BoneName = NAME_None, bool bGetWelded = true, int32 Index = INDEX_NONE) const;
Returns BodyInstance of the component.
GetBodyInstanceAsyncPhysicsTickHandle
FBodyInstanceAsyncPhysicsTickHandle GetBodyInstanceAsyncPhysicsTickHandle(FName BoneName = NAME_None, bool bGetWelded = true, int32 Index = -1) const;UFUNCTIONBlueprintPureCategory=Physics
Returns BodyInstanceAsyncPhysicsTickHandle of the component. For use in the Async Physics Tick event
GetSquaredDistanceToCollision
virtual bool GetSquaredDistanceToCollision(const FVector& Point, float& OutSquaredDistance, FVector& OutClosestPointOnCollision) const;
Returns The square of the distance to closest Body Instance surface.
GetDistanceToCollision
float GetDistanceToCollision(const FVector& Point, FVector& ClosestPointOnCollision) const;
Returns Distance to closest Body Instance surface.
GetClosestPointOnCollision
float GetClosestPointOnCollision(const FVector& Point, FVector& OutPointOnBody, FName BoneName = NAME_None) const;UFUNCTIONBlueprintCallableCategory=Collision
Returns the distance and closest point to the collision surface. Component must have simple collision to be queried for closest point.
CreateSceneProxy
virtual FPrimitiveSceneProxy* CreateSceneProxy();
Creates a proxy to represent the primitive to the scene manager in the rendering thread.
ShouldRecreateProxyOnUpdateTransform
virtual bool ShouldRecreateProxyOnUpdateTransform() const;
Determines whether the proxy for this primitive type needs to be recreated whenever the primitive moves.
IsZeroExtent
virtual bool IsZeroExtent() const;
This isn't bound extent, but for shape component to utilize extent is 0. For normal primitive, this is 0, for ShapeComponent, this will have valid information
ReceiveComponentDamage
virtual void ReceiveComponentDamage(float DamageAmount, FDamageEvent const& DamageEvent, AController* EventInstigator, AActor* DamageCauser);
Event called when a component is 'damaged', allowing for component class specific behaviour
WeldTo
virtual void WeldTo(class USceneComponent* InParent, FName InSocketName = NAME_None, bool bWeldToKinematicParent = false);
Welds this component to another scene component, optionally at a named socket. Component is automatically attached if not already Welding allows the child physics object to become physically connected to its parent.…
WeldToImplementation
virtual bool WeldToImplementation(USceneComponent * InParent, FName ParentSocketName = NAME_None, bool bWeldSimulatedChild = true, bool bWeldToKinematicParent = false);
Does the actual work for welding.
UnWeldFromParent
virtual void UnWeldFromParent();
UnWelds this component from its parent component. Attachment is maintained (DetachFromParent automatically unwelds)
UnWeldChildren
virtual void UnWeldChildren();
Unwelds the children of this component. Attachment is maintained
GetWeldedBodies
virtual void GetWeldedBodies(TArray<FBodyInstance*> & OutWeldedBodies, TArray<FName> & OutLabels, bool bIncludingAutoWeld = false);
Adds the bodies that are currently welded to the OutWeldedBodies array
IsWelded
bool IsWelded() const;
Whether the component has been welded to another simulating component
GetComponentTransformFromBodyInstance
virtual FTransform GetComponentTransformFromBodyInstance(FBodyInstance* UseBI);
Called to get the Component To World Transform from the Root BodyInstance This needs to be virtual since SkeletalMeshComponent Root has to undo its own transform Without this, the root LocalToAtom is overridden by…
IsShown
virtual bool IsShown(const FEngineShowFlags& ShowFlags) const;
Would this primitive be shown with these rendering flags.
SupportsWorldPositionOffsetVelocity
virtual bool SupportsWorldPositionOffsetVelocity() const;
Returns false if this primitive should never output velocity based on its WPO state.
SupportsStaticLighting
virtual bool SupportsStaticLighting() const;protected
Whether the component type supports static lighting.
SendRenderDebugPhysics
virtual void SendRenderDebugPhysics(FPrimitiveSceneProxy* OverrideSceneProxy = nullptr);
Updates the renderer with the center of mass data
CreateRenderState_Concurrent
virtual void CreateRenderState_Concurrent(FRegisterComponentContext* Context) override;
SendRenderTransform_Concurrent
virtual void SendRenderTransform_Concurrent() override;
OnRegister
virtual void OnRegister() override;
OnUnregister
virtual void OnUnregister() override;
DestroyRenderState_Concurrent
virtual void DestroyRenderState_Concurrent() override;
OnCreatePhysicsState
virtual void OnCreatePhysicsState() override;
OnDestroyPhysicsState
virtual void OnDestroyPhysicsState() override;
OnActorEnableCollisionChanged
virtual void OnActorEnableCollisionChanged() override;
InvalidateLightingCacheDetailed
virtual void InvalidateLightingCacheDetailed(bool bInvalidateBuildEnqueuedLighting, bool bTranslationOnly) override;
IsEditorOnly
virtual bool IsEditorOnly() const override;
ShouldCreatePhysicsState
virtual bool ShouldCreatePhysicsState() const override;
HasValidPhysicsState
virtual bool HasValidPhysicsState() const override;
GetComponentInstanceData
virtual TStructOnScope<FActorComponentInstanceData> GetComponentInstanceData() const override;
OnComponentDestroyed
virtual void OnComponentDestroyed(bool bDestroyingHierarchy) override;
OnAsyncCreatePhysicsStateEnd_GameThread
virtual void OnAsyncCreatePhysicsStateEnd_GameThread() override;
OnAsyncDestroyPhysicsState
virtual bool OnAsyncDestroyPhysicsState(const UE::FTimeout& Timeout) override;
OnAsyncDestroyPhysicsStateBegin_GameThread
virtual void OnAsyncDestroyPhysicsStateBegin_GameThread() override;
OnAsyncDestroyPhysicsStateEnd_GameThread
virtual void OnAsyncDestroyPhysicsStateEnd_GameThread() override;
CollectBodySetupsWithPhysicsMeshesToCreate
virtual void CollectBodySetupsWithPhysicsMeshesToCreate(TSet<UBodySetup*>& OutBodySetups) const override;
UpdatePhysicsToRBChannels
virtual void UpdatePhysicsToRBChannels();protected
Internal function that updates physics objects to match the component collision settings.
SendPhysicsTransform
void SendPhysicsTransform(ETeleportType Teleport);protected
Called to send a transform update for this component to the physics engine
EnsurePhysicsStateCreated
void EnsurePhysicsStateCreated();protected
Ensure physics state created
MarkChildPrimitiveComponentRenderStateDirty
void MarkChildPrimitiveComponentRenderStateDirty();protected
Go through attached primitive components and call MarkRenderStateDirty
ConditionalNotifyStreamingPrimitiveUpdated_Concurrent
void ConditionalNotifyStreamingPrimitiveUpdated_Concurrent() const;protected
Conditionally notify streamers that this primitive has updated its render state
Serialize
virtual void Serialize(FArchive& Ar) override;
PostInitProperties
virtual void PostInitProperties() override;
PostLoad
virtual void PostLoad() override;
PostDuplicate
virtual void PostDuplicate(bool bDuplicateForPIE) override;
GetResourceSizeEx
virtual void GetResourceSizeEx(FResourceSizeEx& CumulativeResourceSize) override;
BeginDestroy
virtual void BeginDestroy() override;
FinishDestroy
virtual void FinishDestroy() override;
IsReadyForFinishDestroy
virtual bool IsReadyForFinishDestroy() override;
NeedsLoadForClient
virtual bool NeedsLoadForClient() const override;
NeedsLoadForServer
virtual bool NeedsLoadForServer() const override;
GetCollisionEnabled
virtual ECollisionEnabled::Type GetCollisionEnabled() const override;UFUNCTIONBlueprintPureCategory=Collision
Returns the form of collision for this component
K2_IsCollisionEnabled
bool K2_IsCollisionEnabled() const;UFUNCTIONBlueprintPureCategory=Collision
Utility to see if there is any form of collision (query or physics) enabled on this component.
K2_IsQueryCollisionEnabled
bool K2_IsQueryCollisionEnabled() const;UFUNCTIONBlueprintPureCategory=Collision
Utility to see if there is any query collision enabled on this component.
K2_IsPhysicsCollisionEnabled
bool K2_IsPhysicsCollisionEnabled() const;UFUNCTIONBlueprintPureCategory=Collision
Utility to see if there is any physics collision enabled on this component.
GetCollisionResponseToChannel
virtual ECollisionResponse GetCollisionResponseToChannel(ECollisionChannel Channel) const override;UFUNCTIONBlueprintPureCategory=Collision
Gets the response type given a specific channel
GetCollisionObjectType
virtual ECollisionChannel GetCollisionObjectType() const override;UFUNCTIONBlueprintPureCategory=Collision
Gets the collision object type
OnUpdateTransform
virtual void OnUpdateTransform(EUpdateTransformFlags UpdateTransformFlags, ETeleportType Teleport = ETeleportType::None) override;
OnAttachmentChanged
virtual void OnAttachmentChanged() override;
IsSimulatingPhysics
virtual bool IsSimulatingPhysics(FName BoneName = NAME_None) const override;
MoveComponentImpl
virtual bool MoveComponentImpl(const FVector& Delta, const FQuat& NewRotation, bool bSweep, FHitResult* OutHit = NULL, EMoveComponentFlags MoveFlags = MOVECOMP_NoFlags, ETeleportType Teleport = ETeleportType::None) override;
IsWorldGeometry
virtual bool IsWorldGeometry() const override;
GetCollisionResponseToChannels
virtual const FCollisionResponseContainer& GetCollisionResponseToChannels() const override;
GetComponentVelocity
virtual FVector GetComponentVelocity() const override;
UpdateOcclusionBoundsSlack
void UpdateOcclusionBoundsSlack(float NewSlack);
DispatchBlockingHit
void DispatchBlockingHit(AActor& OutOwner, FHitResult const& BlockingHit);
Dispatch notifications for the given HitResult.
DispatchWakeEvents
void DispatchWakeEvents(ESleepEvent WakeEvent, FName BoneName);
Dispatch notification for wake events and propagate to any welded bodies
ShouldDispatchWakeEvents
virtual bool ShouldDispatchWakeEvents(FName BoneName) const;
Whether or not the primitive component should dispatch sleep/wake events.
InitSweepCollisionParams
virtual void InitSweepCollisionParams(FCollisionQueryParams &OutParams, FCollisionResponseParams& OutResponseParam) const;
Set collision params on OutParams (such as CollisionResponse) to match the settings on this PrimitiveComponent.
GetCollisionShape
virtual struct FCollisionShape GetCollisionShape(float Inflation = 0.0f) const;
Return a CollisionShape that most closely matches this primitive.
AreSymmetricRotations
virtual bool AreSymmetricRotations(const FQuat& A, const FQuat& B, const FVector& Scale3D) const;
Returns true if the given transforms result in the same bounds, due to rotational symmetry. For example, this is true for a sphere with uniform scale undergoing any rotation. This is NOT intended to detect every case…
PushSelectionToProxy
virtual void PushSelectionToProxy();
Pushes new selection state to the render thread primitive proxy
PushLevelInstanceEditingStateToProxy
void PushLevelInstanceEditingStateToProxy(bool bInEditingState);
Pushes new LevelInstance editing state to the render thread primitive proxy.
PushHoveredToProxy
void PushHoveredToProxy(const bool bInHovered);
Pushes new hover state to the render thread primitive proxy
PushEditorVisibilityToProxy
void PushEditorVisibilityToProxy(uint64 InVisibility);
Sends editor visibility updates to the render thread
GetEmissiveBoost
virtual float GetEmissiveBoost(int32 ElementIndex) const;
Gets the emissive boost for the primitive component.
GetDiffuseBoost
virtual float GetDiffuseBoost(int32 ElementIndex) const;
Gets the diffuse boost for the primitive component.
GetShadowIndirectOnly
virtual bool GetShadowIndirectOnly() const;
Disable dynamic shadow casting if the primitive only casts indirect shadows, since dynamic shadows are always shadowing direct lighting
IsCompiling
virtual bool IsCompiling() const;
Returns whether this component is still being compiled or dependent on other objects being compiled.
GetPrimitiveStats
virtual void GetPrimitiveStats(FPrimitiveStats& PrimitiveStats) const;
PushPrimitiveColorToProxy
void PushPrimitiveColorToProxy(const FLinearColor& InPrimitiveColor);
Sends primitive color updates to the render thread
ResetSceneVelocity
void ResetSceneVelocity();
Resets the cached scene velocity. Useful to prevent motion blur when teleporting components. See also SetIsBeingMovedByEditor().
SetAllPhysicsAngularVelocityInDegrees
void SetAllPhysicsAngularVelocityInDegrees(const FVector& NewAngVel, bool bAddToCurrent = false);UFUNCTIONBlueprintCallableCategory=Physics
Set the angular velocity of all bodies in this component.
SetAllPhysicsAngularVelocityInRadians
virtual void SetAllPhysicsAngularVelocityInRadians(const FVector& NewAngVel, bool bAddToCurrent = false);UFUNCTIONBlueprintCallableCategory=Physics
Set the angular velocity of all bodies in this component.
SetAllPhysicsPosition
virtual void SetAllPhysicsPosition(FVector NewPos);
Set the position of all bodies in this component. If a SkeletalMeshComponent, the root body will be placed at the desired position, and the same delta is applied to all other bodies.
SetAllPhysicsRotation
virtual void SetAllPhysicsRotation(FRotator NewRot);
virtual void SetAllPhysicsRotation(const FQuat& NewRot);
Set the rotation of all bodies in this component. If a SkeletalMeshComponent, the root body will be changed to the desired orientation, and the same delta is applied to all other bodies.
WakeAllRigidBodies
virtual void WakeAllRigidBodies();UFUNCTIONBlueprintCallableCategory=Physics
Ensure simulation is running for all bodies in this component.
SetEnableGravity
virtual void SetEnableGravity(bool bGravityEnabled);UFUNCTIONBlueprintCallableCategory=Physics
Enables/disables whether this component is affected by gravity. This applies only to components with bSimulatePhysics set to true.
IsGravityEnabled
virtual bool IsGravityEnabled() const;UFUNCTIONBlueprintPureCategory=Physics
Returns whether this component is affected by gravity. Returns always false if the component is not simulated.
SetUpdateKinematicFromSimulation
virtual void SetUpdateKinematicFromSimulation(bool bUpdateKinematicFromSimulation);UFUNCTIONBlueprintCallableCategory=Physics
Enables/disables whether this component should be updated by simulation when it is kinematic. This is needed if (for example) its velocity needs to be accessed.
GetUpdateKinematicFromSimulation
virtual bool GetUpdateKinematicFromSimulation() const;UFUNCTIONBlueprintPureCategory=Physics
Returns whether this component should be updated by simulation when it is kinematic.
SetGyroscopicTorqueEnabled
void SetGyroscopicTorqueEnabled(bool bInGyroscopicTorqueEnabled);UFUNCTIONBlueprintCallableCategory=Physics
Enabled/disables whether this body is affected by gyroscopic torque, mainly useful for long/thin objects that spin
GetGyroscopicTorqueEnabled
virtual bool GetGyroscopicTorqueEnabled() const;UFUNCTIONBlueprintPureCategory=Physics
Returns whether this component is affected by gyroscopic torque.
SetLinearDamping
virtual void SetLinearDamping(float InDamping);UFUNCTIONBlueprintCallableCategory=Physics
Sets the linear damping of this component.
GetLinearDamping
virtual float GetLinearDamping() const;UFUNCTIONBlueprintPureCategory=Physics
Returns the linear damping of this component.
SetAngularDamping
virtual void SetAngularDamping(float InDamping);UFUNCTIONBlueprintCallableCategory=Physics
Sets the angular damping of this component.
GetAngularDamping
virtual float GetAngularDamping() const;UFUNCTIONBlueprintPureCategory=Physics
Returns the angular damping of this component.
SetMassScale
virtual void SetMassScale(FName BoneName = NAME_None, float InMassScale = 1.f);UFUNCTIONBlueprintCallableCategory=Physics
Change the mass scale used to calculate the mass of a single physics body
GetMassScale
virtual float GetMassScale(FName BoneName = NAME_None) const;UFUNCTIONBlueprintPureCategory=Physics
Returns the mass scale used to calculate the mass of a single physics body
SetAllMassScale
virtual void SetAllMassScale(float InMassScale = 1.f);UFUNCTIONBlueprintCallableCategory=Physics
Change the mass scale used fo all bodies in this component
SetMassOverrideInKg
virtual void SetMassOverrideInKg(FName BoneName = NAME_None, float MassInKg = 1.f, bool bOverrideMass = true);UFUNCTIONBlueprintCallableCategory=Physics
Override the mass (in Kg) of a single physics body. Note that in the case where multiple bodies are attached together, the override mass will be set for the entire group. Set the Override Mass to false if you want to…
GetMass
virtual float GetMass() const;UFUNCTIONBlueprintPureCategory=Physics
Returns the mass of this component in kg.
GetInertiaTensor
virtual FVector GetInertiaTensor(FName BoneName = NAME_None) const;UFUNCTIONBlueprintPureCategory=Physics
Returns the inertia tensor of this component in kg cm^2. The inertia tensor is in local component space.
ScaleByMomentOfInertia
virtual FVector ScaleByMomentOfInertia(FVector InputVector, FName BoneName = NAME_None) const;UFUNCTIONBlueprintPureCategory=Physics
Scales the given vector by the world space moment of inertia. Useful for computing the torque needed to rotate an object.
CalculateMass
virtual float CalculateMass(FName BoneName = NAME_None);
Returns the calculated mass in kg. This is not 100% exactly the mass physx will calculate, but it is very close ( difference < 0.1kg ).
GetMaxDepenetrationVelocity
virtual float GetMaxDepenetrationVelocity(FName BoneName = NAME_None);UFUNCTIONBlueprintCallableCategory=Physics
The maximum velocity used to depenetrate this object from others when spawned or teleported with initial overlaps (does not affect overlaps as a result of normal movement). A value of zero will allow objects that are…
SetMaxDepenetrationVelocity
virtual void SetMaxDepenetrationVelocity(FName BoneName = NAME_None, float InMaxDepenetrationVelocity = -1.0f);UFUNCTIONBlueprintCallableCategory=Physics
The maximum velocity used to depenetrate this object from others when spawned or teleported with initial overlaps (does not affect overlaps as a result of normal movement). A value of zero will allow objects that are…
SetUseCCD
virtual void SetUseCCD(bool InUseCCD, FName BoneName = NAME_None);UFUNCTIONBlueprintCallableCategory=Physics
Set whether this component should use Continuous Collision Detection
SetAllUseCCD
virtual void SetAllUseCCD(bool InUseCCD);UFUNCTIONBlueprintCallableCategory=Physics
Set whether all bodies in this component should use Continuous Collision Detection
SetUseMACD
virtual void SetUseMACD(bool InUseMACD, FName BoneName = NAME_None);UFUNCTIONBlueprintCallableCategory=Physics
[EXPERIMENTAL] Set whether this component should use Motion-Aware Collision Detection
SetAllUseMACD
virtual void SetAllUseMACD(bool InUseMACD);UFUNCTIONBlueprintCallableCategory=Physics
[EXPERIMENTAL] Set whether all bodies in this component should use Motion-Aware Collision Detection
PutAllRigidBodiesToSleep
virtual void PutAllRigidBodiesToSleep();
Force all bodies in this component to sleep.
RigidBodyIsAwake
bool RigidBodyIsAwake(FName BoneName = NAME_None) const;
Returns if a single body is currently awake and simulating.
IsAnyRigidBodyAwake
virtual bool IsAnyRigidBodyAwake();UFUNCTIONBlueprintPureCategory=Physics
Returns if any body in this component is currently awake and simulating.
SetCollisionResponseToChannel
virtual void SetCollisionResponseToChannel(ECollisionChannel Channel, ECollisionResponse NewResponse);UFUNCTIONBlueprintCallableCategory=Collision
Changes a member of the ResponseToChannels container for this PrimitiveComponent.
SetCollisionResponseToAllChannels
virtual void SetCollisionResponseToAllChannels(ECollisionResponse NewResponse);UFUNCTIONBlueprintCallableCategory=Collision
Changes all ResponseToChannels container for this PrimitiveComponent. to be NewResponse
SetCollisionResponseToChannels
virtual void SetCollisionResponseToChannels(const FCollisionResponseContainer& NewReponses);
Changes the whole ResponseToChannels container for this PrimitiveComponent.
OnComponentCollisionSettingsChanged
virtual void OnComponentCollisionSettingsChanged(bool bUpdateOverlaps=true);protected
Called when the BodyInstance ResponseToChannels, CollisionEnabled or bNotifyRigidBodyCollision changes, in case subclasses want to use that information.
OnGenerateOverlapEventsChanged
virtual void OnGenerateOverlapEventsChanged();protected
Called when bGenerateOverlapEvents changes, in case subclasses want to use that information.
ClearComponentOverlaps
void ClearComponentOverlaps(bool bDoNotifies, bool bSkipNotifySelf);protected
Ends all current component overlaps. Generally used when destroying this component or when it can no longer generate overlaps.
SetRigidBodyReplicatedTarget
void SetRigidBodyReplicatedTarget(FRigidBodyState& UpdatedState, const FName BoneName = NAME_None, int32 ServerFrame = 0, int32 ServerHandle = 0);
Applies RigidBodyState only if it needs to be updated NeedsUpdate flag will be removed from UpdatedState after all velocity corrections are finished
RegisterAsFocalPointInPhysicsReplicationLOD
void RegisterAsFocalPointInPhysicsReplicationLOD() const;UFUNCTIONBlueprintCallableCategory=Replication
Register this components physics object as a focal particle in Physics Replication LOD
UnregisterAsFocalPointInPhysicsReplicationLOD
void UnregisterAsFocalPointInPhysicsReplicationLOD() const;UFUNCTIONBlueprintCallableCategory=Replication
Unregister this components physics object from being a focal particle in Physics Replication LOD
CanBeUsedInPhysicsReplication
virtual bool CanBeUsedInPhysicsReplication(const FName BoneName = NAME_None) const;protected
GetRigidBodyState
bool GetRigidBodyState(FRigidBodyState& OutState, FName BoneName = NAME_None);
Get the state of the rigid body responsible for this Actor's physics, and fill in the supplied FRigidBodyState struct based on it.
SetPhysMaterialOverride
virtual void SetPhysMaterialOverride(class UPhysicalMaterial* NewPhysMaterial);UFUNCTIONBlueprintCallableCategory=Physics
Changes the current PhysMaterialOverride for this component. Note that if physics is already running on this component, this will _not_ alter its mass/inertia etc, it will only change its surface properties like…
ShouldComponentAddToScene
bool ShouldComponentAddToScene() const;
Looking at various values of the component, determines if this component should be added to the scene
SetCullDistance
void SetCullDistance(float NewCullDistance);UFUNCTIONBlueprintCallableCategory=LOD
Changes the value of CullDistance.
SetCachedMaxDrawDistance
void SetCachedMaxDrawDistance(const float NewCachedMaxDrawDistance);
Utility to cache the max draw distance based on cull distance volumes or the desired max draw distance
SetDepthPriorityGroup
void SetDepthPriorityGroup(ESceneDepthPriorityGroup NewDepthPriorityGroup);
Changes the value of DepthPriorityGroup.
SetViewOwnerDepthPriorityGroup
void SetViewOwnerDepthPriorityGroup(bool bNewUseViewOwnerDepthPriorityGroup, ESceneDepthPriorityGroup NewViewOwnerDepthPriorityGroup);
Changes the value of bUseViewOwnerDepthPriorityGroup and ViewOwnerDepthPriorityGroup.
LineTraceComponent
virtual bool LineTraceComponent(FHitResult& OutHit, const FVector Start, const FVector End, const FCollisionQueryParams& Params);
virtual bool LineTraceComponent(FHitResult& OutHit, const FVector Start, const FVector End, ECollisionChannel TraceChannel, const struct FCollisionQueryParams& Params, const struct FCollisionResponseParams& ResponseParams, const struct FCollisionObjectQueryParams& ObjectParams);
Trace a ray against just this component.
SweepComponent
virtual bool SweepComponent(FHitResult& OutHit, const FVector Start, const FVector End, const FQuat& ShapeWorldRotation, const FCollisionShape &CollisionShape, bool bTraceComplex=false);
virtual bool SweepComponent(FHitResult& OutHit, const FVector Start, const FVector End, const FQuat& ShapeWorldRotation, const FPhysicsGeometry& Geometry, ECollisionChannel TraceChannel, const struct FCollisionQueryParams& Params, const struct FCollisionResponseParams& ResponseParams, const struct FCollisionObjectQueryParams& ObjectParams);
Trace a shape against just this component.
ComponentOverlapComponent
bool ComponentOverlapComponent(class UPrimitiveComponent* PrimComp, const FVector Pos, const FQuat& Rot, const FCollisionQueryParams& Params);
bool ComponentOverlapComponent(class UPrimitiveComponent* PrimComp, const FVector Pos, const FRotator Rot, const FCollisionQueryParams& Params);
Test the collision of the supplied component at the supplied location/rotation, and determine if it overlaps this component.
ComponentOverlapComponentWithResult
bool ComponentOverlapComponentWithResult(const class UPrimitiveComponent* const PrimComp, const FVector& Pos, const FQuat& Rot, const FCollisionQueryParams& Params, TArray<FOverlapResult>& OutOverlap) const;
bool ComponentOverlapComponentWithResult(const class UPrimitiveComponent* const PrimComp, const FVector& Pos, const FRotator& Rot, const FCollisionQueryParams& Params, TArray<FOverlapResult>& OutOverlap) const;
Test the collision of the supplied component at the supplied location/rotation, and determine if it overlaps this component.
ComponentOverlapComponentImpl
virtual bool ComponentOverlapComponentImpl(class UPrimitiveComponent* PrimComp, const FVector Pos, const FQuat& Rot, const FCollisionQueryParams& Params);protected
Override this method for custom behavior for ComponentOverlapComponent()
ComponentOverlapComponentWithResultImpl
virtual bool ComponentOverlapComponentWithResultImpl(const class UPrimitiveComponent* const PrimComp, const FVector& Pos, const FQuat& Rot, const FCollisionQueryParams& Params, TArray<FOverlapResult>& OutOverlap) const;protected
OverlapComponent
virtual bool OverlapComponent(const FVector& Pos, const FQuat& Rot, const FCollisionShape& CollisionShape) final;
virtual bool OverlapComponent(const FVector& Pos, const FQuat& Rot, const FCollisionShape& CollisionShape) const;
Test the collision of the supplied shape at the supplied location, and determine if it overlaps this component.
OverlapComponentWithResult
virtual bool OverlapComponentWithResult(const FVector& Pos, const FQuat& Rot, const FCollisionShape& CollisionShape, TArray<FOverlapResult>& OutOverlap) const;
virtual bool OverlapComponentWithResult(const FVector& Pos, const FQuat& Rot, const FPhysicsGeometry& Geometry, ECollisionChannel TraceChannel, const struct FCollisionQueryParams& Params, const struct FCollisionResponseParams& ResponseParams, const struct FCollisionObjectQueryParams& ObjectParams, TArray<FOverlapResult>& OutOverlap) const;
Test the collision of the supplied shape at the supplied location, and determine if it overlaps this component. Also will return information about the overlap.
ComputePenetration
virtual bool ComputePenetration(FMTDResult & OutMTD, const FCollisionShape& CollisionShape, const FVector& Pos, const FQuat& Rot);
Computes the minimum translation direction (MTD) when an overlap exists between the component and the given shape.
CanCharacterStepUp
virtual bool CanCharacterStepUp(class APawn* Pawn) const;UFUNCTIONBlueprintCallableCategory=Collision
Return true if the given Pawn can step up onto this component. This controls whether they can try to step up on it when they bump in to it, not whether they can walk on it after landing on it.
GetNavigationData
virtual void GetNavigationData(FNavigationRelevantData& OutData) const override;
GetNavigationBounds
virtual FBox GetNavigationBounds() const override;
IsNavigationRelevant
virtual bool IsNavigationRelevant() const override;
GetNavigableGeometryBodySetup
virtual UBodySetup* GetNavigableGeometryBodySetup() override final;
marked as final since PrimitiveComponent derived classes relies on GetBodySetup()
GetNavigableGeometryTransform
virtual FTransform GetNavigableGeometryTransform() const override final;
marked as final since PrimitiveComponent derived classes relies on GetComponentTransform()
HasCustomNavigableGeometry
virtual EHasCustomNavigableGeometry::Type HasCustomNavigableGeometry() const override;
If true then DoCustomNavigableGeometryExport will be called to collect navigable geometry of this component.
DoCustomNavigableGeometryExport
virtual bool DoCustomNavigableGeometryExport(FNavigableGeometryExport& GeomExport) const override;
Collects custom navigable geometry of component.
ShouldCheckOverlapFlagToQueueOverlaps
bool ShouldCheckOverlapFlagToQueueOverlaps(const UPrimitiveComponent& ThisComponent) const;
Returns true if we should check the GetGenerateOverlapEvents() flag when gathering overlaps, otherwise we'll always just do it.
SetCustomNavigableGeometry
void SetCustomNavigableGeometry(const EHasCustomNavigableGeometry::Type InType);
Set value of HasCustomNavigableGeometry
DispatchOnClicked
void DispatchOnClicked(FKey ButtonClicked = EKeys::LeftMouseButton);
DispatchOnReleased
void DispatchOnReleased(FKey ButtonReleased = EKeys::LeftMouseButton);
DispatchOnInputTouchBegin
void DispatchOnInputTouchBegin(const ETouchIndex::Type Key);
DispatchOnInputTouchEnd
void DispatchOnInputTouchEnd(const ETouchIndex::Type Key);
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;
GetIdFromGTParticle
virtual Chaos::FPhysicsObjectId GetIdFromGTParticle(Chaos::FGeometryParticle* Particle) const override;
IsStaticPhysics
bool IsStaticPhysics() const;
Whether the physics is static for this component.
IsFirstPersonRelevant
bool IsFirstPersonRelevant() const;
Wheter the component is relevant for first person
HandlePostMigrationPhysicsStateChanged
virtual void HandlePostMigrationPhysicsStateChanged(UPrimitiveComponent* ChangedComponent, EComponentPhysicsStateChange StateChange);protectedUFUNCTION
CanSendMigratedPhysicsState
bool CanSendMigratedPhysicsState(const FUObjectMigrationContext* MigrationContext, EObjectMigrationSendType ObjMigrationSendType) const;protected
MigratePhysicsState
virtual void MigratePhysicsState(FArchive& Ar) override;protected
ApplyMigratedPhysicsState
virtual void ApplyMigratedPhysicsState(Chaos::FSerializedDataBufferPtr MigratedStateData = nullptr) override;protected
PostMigrate
virtual void PostMigrate(const struct FUObjectMigrationContext& MigrationContext) override;protected
AddNavigationModifier
void AddNavigationModifier(FNavigationRelevantData& OutData) const;protected

Static functions 2

DispatchMouseOverEvents
static void DispatchMouseOverEvents(UPrimitiveComponent* CurrentComponent, UPrimitiveComponent* NewComponent);
DispatchTouchOverEvents
static void DispatchTouchOverEvents(ETouchIndex::Type FingerIndex, UPrimitiveComponent* CurrentComponent, UPrimitiveComponent* NewComponent);

Functions

Free functions 12

ComponentOverlapMulti
bool UPrimitiveComponent::ComponentOverlapMulti(TArray<struct FOverlapResult>& OutOverlaps, const class UWorld* InWorld, const FVector& Pos, const FQuat& Rot, ECollisionChannel TestChannel, const struct FComponentQueryParams& Params, const struct FCollisionObjectQueryParams& ObjectQueryParams) const;
bool UPrimitiveComponent::ComponentOverlapMulti(TArray<struct FOverlapResult>& OutOverlaps, const class UWorld* InWorld, const FVector& Pos, const FRotator& Rot, ECollisionChannel TestChannel, const struct FComponentQueryParams& Params, const struct FCollisionObjectQueryParams& ObjectQueryParams) const;
PrimitiveComponent inlines
ComponentOverlapComponent
bool UPrimitiveComponent::ComponentOverlapComponent(class UPrimitiveComponent* PrimComp, const FVector Pos, const FQuat& Rot, const FCollisionQueryParams& Params);
bool UPrimitiveComponent::ComponentOverlapComponent(class UPrimitiveComponent* PrimComp, const FVector Pos, const FRotator Rot, const FCollisionQueryParams& Params);
ComponentOverlapComponentWithResult
bool UPrimitiveComponent::ComponentOverlapComponentWithResult(const class UPrimitiveComponent* const PrimComp, const FVector& Pos, const FQuat& Rot, const FCollisionQueryParams& Params, TArray<FOverlapResult>& OutOverlap) const;
bool UPrimitiveComponent::ComponentOverlapComponentWithResult(const class UPrimitiveComponent* const PrimComp, const FVector& Pos, const FRotator& Rot, const FCollisionQueryParams& Params, TArray<FOverlapResult>& OutOverlap) const;
GetOverlapInfos
const TArray<FOverlapInfo>& UPrimitiveComponent::GetOverlapInfos() const;
K2_IsCollisionEnabled
bool UPrimitiveComponent::K2_IsCollisionEnabled() const;
K2_IsQueryCollisionEnabled
bool UPrimitiveComponent::K2_IsQueryCollisionEnabled() const;
K2_IsPhysicsCollisionEnabled
bool UPrimitiveComponent::K2_IsPhysicsCollisionEnabled() const;
GetGenerateOverlapEvents
bool UPrimitiveComponent::GetGenerateOverlapEvents() const;
ShouldCheckOverlapFlagToQueueOverlaps
bool UPrimitiveComponent::ShouldCheckOverlapFlagToQueueOverlaps(const UPrimitiveComponent& ThisComponent) const;
ConvertSweptOverlapsToCurrentOverlaps
template<typename AllocatorType> bool UPrimitiveComponent::ConvertSweptOverlapsToCurrentOverlaps(TArray<FOverlapInfo, AllocatorType>& OverlapsAtEndLocation, const TOverlapArrayView& SweptOverlaps, int32 SweptOverlapsIndex, const FVector& EndLocation, const FQuat& EndRotationQuat);
PrimitiveComponent templates
ConvertRotationOverlapsToCurrentOverlaps
template<typename AllocatorType> bool UPrimitiveComponent::ConvertRotationOverlapsToCurrentOverlaps(TArray<FOverlapInfo, AllocatorType>& OutOverlapsAtEndLocation, const TOverlapArrayView& CurrentOverlaps);
GetOverlapsWithActor_Template
template<typename AllocatorType> bool UPrimitiveComponent::GetOverlapsWithActor_Template(const AActor* Actor, TArray<FOverlapInfo, AllocatorType>& OutOverlaps) const;