UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
PrimitiveComponent.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Algo/Copy.h"
7#include "EngineStats.h"
11#include "Misc/Guid.h"
14#include "Engine/EngineTypes.h"
16#include "Engine/OverlapInfo.h"
19#include "RenderCommandFence.h"
20#include "GameFramework/Actor.h"
22#include "SceneTypes.h"
23#include "Engine/EngineTypes.h"
28#include "HitProxies.h"
32#include "Stats/Stats.h"
33#include "PSOPrecacheFwd.h"
34#include "PipelineStateCache.h"
37#include "PrimitiveComponent.generated.h"
38
41
42class AController;
45class UPrimitiveComponent;
46class UTexture;
48struct FCollisionShape;
49struct FConvexVolume;
50struct FEngineShowFlags;
53struct FOverlapResult;
54
56
64
66UENUM()
68{
70 ECB_No UMETA(DisplayName="No"),
72 ECB_Yes UMETA(DisplayName="Yes"),
77 ECB_Owner UMETA(DisplayName="(Owner)"),
79};
80
82USTRUCT()
84{
86
87
88 UPROPERTY()
89 FName Category;
90
92 UPROPERTY()
93 FText DisplayName;
94
96 UPROPERTY()
97 FText Description;
98};
99
101UENUM()
103{
104 ERSM_Default UMETA(DisplayName = "Default"),
105 ERSM_255 UMETA(DisplayName = "All bits (255), ignore depth"),
106 ERSM_1 UMETA(DisplayName = "First bit (1), ignore depth"),
107 ERSM_2 UMETA(DisplayName = "Second bit (2), ignore depth"),
108 ERSM_4 UMETA(DisplayName = "Third bit (4), ignore depth"),
109 ERSM_8 UMETA(DisplayName = "Fourth bit (8), ignore depth"),
110 ERSM_16 UMETA(DisplayName = "Fifth bit (16), ignore depth"),
111 ERSM_32 UMETA(DisplayName = "Sixth bit (32), ignore depth"),
112 ERSM_64 UMETA(DisplayName = "Seventh bit (64), ignore depth"),
113 ERSM_128 UMETA(DisplayName = "Eighth bit (128), ignore depth")
114};
115
117UENUM()
119{
120 CP_0_NEVER_CULL UMETA(DisplayName = "0 - Never cull"),
121 CP_1 UMETA(DisplayName = "1"),
122 CP_2 UMETA(DisplayName = "2"),
123 CP_3 UMETA(DisplayName = "3"),
124 CP_4_DEFAULT UMETA(DisplayName = "4 - Default"),
125 CP_5 UMETA(DisplayName = "5"),
126 CP_6 UMETA(DisplayName = "6"),
127 CP_7 UMETA(DisplayName = "7"),
128 CP_8_QUICKLY_CULL UMETA(DisplayName = "8 - Quickly cull")
129};
130
132UENUM()
134{
136 None UMETA(DisplayName = "None"),
138 FirstPerson UMETA(DisplayName = "First Person"),
141 WorldSpaceRepresentation UMETA(DisplayName = "World Space Representation"),
142};
143
146{
148 {
149 switch (InEnum)
150 {
151 case ERendererStencilMask::ERSM_Default:
153 case ERendererStencilMask::ERSM_255:
155 case ERendererStencilMask::ERSM_1:
156 return EStencilMask::SM_1;
157 case ERendererStencilMask::ERSM_2:
158 return EStencilMask::SM_2;
159 case ERendererStencilMask::ERSM_4:
160 return EStencilMask::SM_4;
161 case ERendererStencilMask::ERSM_8:
162 return EStencilMask::SM_8;
163 case ERendererStencilMask::ERSM_16:
164 return EStencilMask::SM_16;
165 case ERendererStencilMask::ERSM_32:
166 return EStencilMask::SM_32;
167 case ERendererStencilMask::ERSM_64:
168 return EStencilMask::SM_64;
169 case ERendererStencilMask::ERSM_128:
171 default:
172 // Unsupported EStencilMask - return a safe default.
173 check(false);
175 }
176 }
177};
178
179// Predicate to determine if an overlap is with a certain AActor.
181{
183 : MyOwnerPtr(&Owner)
184 {
185 }
186
188 {
189 // MyOwnerPtr is always valid, so we don't need the IsValid() checks in the WeakObjectPtr comparison operator.
190 return MyOwnerPtr.HasSameIndexAndSerialNumber(Info.OverlapInfo.HitObjectHandle.FetchActor());
191 }
192
193private:
194 const TWeakObjectPtr<const AActor> MyOwnerPtr;
195};
196
197// Predicate to determine if an overlap is *NOT* with a certain AActor.
199{
201 : MyOwnerPtr(&Owner)
202 {
203 }
204
206 {
207 // MyOwnerPtr is always valid, so we don't need the IsValid() checks in the WeakObjectPtr comparison operator.
208 return !MyOwnerPtr.HasSameIndexAndSerialNumber(Info.OverlapInfo.HitObjectHandle.FetchActor());
209 }
210
211private:
212 const TWeakObjectPtr<const AActor> MyOwnerPtr;
213};
214
215// TODO: Add sleep and wake state change types to this enum, so that the
216// OnComponentWake and OnComponentSleep delegates may be deprecated.
217// Doing so would save a couple bytes per primitive component.
218UENUM(BlueprintType)
224
229DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_FiveParams( FComponentHitSignature, UPrimitiveComponent, OnComponentHit, UPrimitiveComponent*, HitComponent, AActor*, OtherActor, UPrimitiveComponent*, OtherComp, FVector, NormalImpulse, const FHitResult&, Hit );
231DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_SixParams( FComponentBeginOverlapSignature, UPrimitiveComponent, OnComponentBeginOverlap, UPrimitiveComponent*, OverlappedComponent, AActor*, OtherActor, UPrimitiveComponent*, OtherComp, int32, OtherBodyIndex, bool, bFromSweep, const FHitResult &, SweepResult);
241DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_TwoParams(FComponentPhysicsStateChanged, UPrimitiveComponent, OnComponentPhysicsStateChanged, UPrimitiveComponent*, ChangedComponent, EComponentPhysicsStateChange, StateChange);
242
247DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_TwoParams( FComponentOnInputTouchBeginSignature, UPrimitiveComponent, OnInputTouchBegin, ETouchIndex::Type, FingerIndex, UPrimitiveComponent*, TouchedComponent );
248DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_TwoParams( FComponentOnInputTouchEndSignature, UPrimitiveComponent, OnInputTouchEnd, ETouchIndex::Type, FingerIndex, UPrimitiveComponent*, TouchedComponent );
249DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_TwoParams( FComponentBeginTouchOverSignature, UPrimitiveComponent, OnInputTouchEnter, ETouchIndex::Type, FingerIndex, UPrimitiveComponent*, TouchedComponent );
250DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_TwoParams( FComponentEndTouchOverSignature, UPrimitiveComponent, OnInputTouchLeave, ETouchIndex::Type, FingerIndex, UPrimitiveComponent*, TouchedComponent );
251
258class UPrimitiveComponent : public USceneComponent, public INavRelevantInterface, public IInterface_AsyncCompilation, public IPhysicsComponent
259{
261
262public:
266 ENGINE_API UPrimitiveComponent(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get());
267 ENGINE_API UPrimitiveComponent(FVTableHelper& Helper);
268 ENGINE_API ~UPrimitiveComponent();
269
270 // Rendering
272
277 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=LOD)
278 float MinDrawDistance;
279
281 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=LOD, meta=(DisplayName="Desired Max Draw Distance") )
282 float LDMaxDrawDistance;
283
288 UPROPERTY(Category=LOD, AdvancedDisplay, VisibleAnywhere, BlueprintReadOnly, meta=(DisplayName="Current Max Draw Distance") )
289 float CachedMaxDrawDistance;
290
292 UPROPERTY()
293 TEnumAsByte<enum ESceneDepthPriorityGroup> DepthPriorityGroup;
294
296 UPROPERTY()
297 TEnumAsByte<enum ESceneDepthPriorityGroup> ViewOwnerDepthPriorityGroup;
298
300 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=Lighting)
301 TEnumAsByte<EIndirectLightingCacheQuality> IndirectLightingCacheQuality;
302
304 UE_DEPRECATED(5.5, "Use GetLightmapType()/SetLightmapType() instead")
305 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=Lighting, Getter, Setter, meta = (AllowPrivateAccess))
306 ELightmapType LightmapType;
307
308 ENGINE_API ELightmapType GetLightmapType() const;
310
312 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadWrite, Category=HLOD, meta=(DisplayName="HLOD Batching Policy", DisplayAfter="bEnableAutoLODGeneration", EditConditionHides, EditCondition="bEnableAutoLODGeneration"))
314
316 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Lighting, AdvancedDisplay, meta=(EditCondition="CastShadow"))
317 EShadowCacheInvalidationBehavior ShadowCacheInvalidationBehavior;
318
320 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = HLOD, meta=(DisplayName="Include Component in HLOD"))
321 uint8 bEnableAutoLODGeneration : 1;
322
324 UPROPERTY()
326
328 UPROPERTY()
330
332 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=LOD)
334
343
346
348 mutable uint8 bBulkReregister : 1;
349
352
358 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=Collision)
360
368 UFUNCTION(BlueprintGetter)
369 bool GetGenerateOverlapEvents() const;
370
372 UFUNCTION(BlueprintSetter)
374
375 UFUNCTION(BlueprintCallable, Category = "Rendering|Components")
376 ENGINE_API void SetLightingChannels(bool bChannel0, bool bChannel1, bool bChannel2);
377
379 UFUNCTION(BlueprintCallable, Category = "Rendering|Lighting")
381
382private:
383 UPROPERTY(EditAnywhere, BlueprintGetter = GetGenerateOverlapEvents, BlueprintSetter = SetGenerateOverlapEvents, Category = Collision)
384 uint8 bGenerateOverlapEvents : 1;
385
386public:
392 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadWrite, Category=Collision)
394
400 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadWrite, Category=Collision)
402
407 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadWrite, Category=Collision)
409
411 UPROPERTY()
412 uint8 bUseViewOwnerDepthPriorityGroup:1;
413
415 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=LOD)
417
419 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category = Rendering)
420 uint8 bVisibleInReflectionCaptures:1;
421
423 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category = Rendering)
424 uint8 bVisibleInRealTimeSkyCaptures :1;
425
427 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category = Rendering)
428 uint8 bVisibleInRayTracing : 1;
429
431 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category = Rendering)
432 uint8 bRenderInMainPass:1;
433
435 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category = Rendering, meta = (EditCondition = "!bRenderInMainPass"))
436 uint8 bRenderInDepthPass:1;
437
439 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=Rendering)
440 uint8 bReceivesDecals:1;
441
443 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category = Rendering, Interp)
444 uint8 bHoldout : 1;
445
447 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category = Rendering, meta=(EditCondition="FirstPersonPrimitiveType != EFirstPersonPrimitiveType::WorldSpaceRepresentation"))
448 uint8 bOwnerNoSee:1;
449
451 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category = Rendering)
452 uint8 bOnlyOwnerSee:1;
453
455 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=Rendering)
456 uint8 bTreatAsBackgroundForOcclusion:1;
457
463 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=Rendering)
464 uint8 bUseAsOccluder:1;
465
467 UPROPERTY()
468 uint8 bSelectable:1;
469
471 UPROPERTY()
472 uint8 bWantsEditorEffects:1;
473
474#if WITH_EDITORONLY_DATA
476 UPROPERTY(EditAnywhere, AdvancedDisplay, Category = Collision)
478#endif //WITH_EDITORONLY_DATA
479
481 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=TextureStreaming)
482 uint8 bForceMipStreaming:1;
483
487 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, AdvancedDisplay, Category=Rendering)
488 uint8 bHasPerInstanceHitProxies:1;
489
490 // Lighting flags
491
493 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Lighting, Interp)
495
497 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Lighting, AdvancedDisplay)
498 uint8 bEmissiveLightSource:1;
499
501 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Lighting, AdvancedDisplay, Interp)
502 uint8 bAffectDynamicIndirectLighting:1;
503
505 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=Lighting, meta=(EditCondition="bAffectDynamicIndirectLighting", DisplayName = "Affect Indirect Lighting While Hidden"), Interp)
506 uint8 bAffectIndirectLightingWhileHidden:1;
507
509 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Lighting, AdvancedDisplay)
510 uint8 bAffectDistanceFieldLighting:1;
511
513 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Lighting, AdvancedDisplay, meta=(EditCondition="CastShadow && (FirstPersonPrimitiveType != EFirstPersonPrimitiveType::FirstPerson)", DisplayName = "Dynamic Shadow"))
514 uint8 bCastDynamicShadow:1;
515
517 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Lighting, AdvancedDisplay, meta=(EditCondition="CastShadow && (FirstPersonPrimitiveType != EFirstPersonPrimitiveType::FirstPerson)", DisplayName = "Static Shadow"))
518 uint8 bCastStaticShadow:1;
519
525 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=Lighting, meta=(EditCondition="CastShadow && (FirstPersonPrimitiveType != EFirstPersonPrimitiveType::FirstPerson)", DisplayName = "Volumetric Translucent Shadow"))
526 uint8 bCastVolumetricTranslucentShadow:1;
527
532 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Lighting, AdvancedDisplay, meta=(EditCondition="CastShadow", DisplayName = "Contact Shadow"))
533 uint8 bCastContactShadow:1;
534
539 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=Lighting, meta=(EditCondition="CastShadow"))
540 uint8 bSelfShadowOnly:1;
541
545 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=Lighting, meta=(EditCondition="CastShadow && (FirstPersonPrimitiveType != EFirstPersonPrimitiveType::FirstPerson)", DisplayName = "Far Shadow"))
546 uint8 bCastFarShadow:1;
547
552 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=Lighting, meta=(EditCondition="CastShadow", DisplayName = "Dynamic Inset Shadow"))
553 uint8 bCastInsetShadow:1;
554
559 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=Lighting, meta=(EditCondition="CastShadow"))
560 uint8 bCastCinematicShadow:1;
561
567 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=Lighting, meta=(EditCondition="CastShadow && (FirstPersonPrimitiveType != EFirstPersonPrimitiveType::WorldSpaceRepresentation)", DisplayName = "Hidden Shadow"), Interp)
568 uint8 bCastHiddenShadow:1;
569
571 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=Lighting, meta=(EditCondition="CastShadow", DisplayName = "Shadow Two Sided"))
572 uint8 bCastShadowAsTwoSided:1;
573
575 UPROPERTY()
577
583 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=Lighting)
584 uint8 bLightAttachmentsAsGroup:1;
585
589 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=Lighting)
591
596 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category = Mobile, meta = (DisplayName = "Receive CSM Shadows"))
597 uint8 bReceiveMobileCSMShadows : 1;
598
604 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=Lighting)
605 uint8 bSingleSampleShadowFromStationaryLights:1;
606
607 // Physics
608
610 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Physics)
612
614 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Physics)
616
618 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Physics)
620
623 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Physics)
625
626 // Navigation
627
629 UPROPERTY(EditAnywhere, Category = Navigation)
630 uint8 bFillCollisionUnderneathForNavmesh:1;
631
635 UPROPERTY(EditAnywhere, Category = Navigation)
636 uint8 bRasterizeAsFilledConvexVolume:1;
637
638 // General flags.
639
641 UPROPERTY()
643
645 UPROPERTY()
647
649 UPROPERTY()
650 uint8 bUseEditorCompositing:1;
651
653 UPROPERTY(Transient, DuplicateTransient)
654 uint8 bIsBeingMovedByEditor:1;
655
657 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=Rendering, meta=(DisplayName = "Render CustomDepth Pass"))
658 uint8 bRenderCustomDepth:1;
659
660 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category = Rendering, meta = (DisplayName = "Visible In Scene Capture Only", ToolTip = "When true, will only be visible in Scene Capture"))
661 uint8 bVisibleInSceneCaptureOnly : 1;
662
663 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category = Rendering, meta = (DisplayName = "Hidden In Scene Capture", ToolTip = "When true, will not be captured by Scene Capture"))
664 uint8 bHiddenInSceneCapture : 1;
665
667 UPROPERTY()
668 uint8 bRayTracingFarField : 1;
669
672 uint8 bLumenHeightfield : 1;
673
675 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category = Rendering)
677
681
682 UPROPERTY()
684
691 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Lighting, AdvancedDisplay, meta=(
692 DisplayName = "Static When Not Moveable",
693 ToolTip = "When false, the underlying physics body will contain all sim data (mass, inertia tensor, etc) even if mobility is not set to Moveable"))
695
697
698public:
699#if UE_WITH_PSO_PRECACHING
702 static_assert((int)EPSOPrecachePriority::Highest < 1 << 2);
703#endif
704
705#if WITH_EDITOR
707
708 uint8 SelectionOutlineColorIndex;
709
710 FColor OverlayColor;
711#endif
712
714 UPROPERTY()
715 TEnumAsByte<EHasCustomNavigableGeometry::Type> bHasCustomNavigableGeometry;
716
717public:
718#if WITH_EDITORONLY_DATA
719 UPROPERTY()
721
722 UE_DEPRECATED(5.2, "Use SetExcludedFromHLODLevel/IsExcludedFromHLODLevel")
723 UPROPERTY(BlueprintReadWrite, Category = HLOD, BlueprintGetter=GetExcludeForSpecificHLODLevels, BlueprintSetter=SetExcludeForSpecificHLODLevels, meta = (DeprecatedProperty, DeprecationMessage = "WARNING: This property has been deprecated, use the SetExcludedFromHLODLevel/IsExcludedFromHLODLevel functions instead"))
725#endif
726
728 UFUNCTION(BlueprintCallable, Category = "HLOD", meta = (DisplayName="Is Excluded From HLOD Level"))
730
732 UFUNCTION(BlueprintCallable, Category = "HLOD", meta = (DisplayName = "Set Excluded From HLOD Level"))
734
735#if WITH_EDITOR
736 ENGINE_API virtual void ComputeHLODHash(class FHLODHashBuilder& HashBuilder) const override;
737#endif
738
739private:
740 UE_DEPRECATED("5.2", "Use SetExcludedFromHLODLevel instead")
741 UFUNCTION(BlueprintCallable, BlueprintSetter, Category = "HLOD", meta = (BlueprintInternalUseOnly="true"))
743
744 UE_DEPRECATED("5.2", "Use IsExcludedFromHLODLevel instead")
745 UFUNCTION(BlueprintCallable, BlueprintGetter, Category = "HLOD", meta = (BlueprintInternalUseOnly="true"))
747
748#if WITH_EDITORONLY_DATA
749 UPROPERTY()
751
753 UPROPERTY()
755
757 UPROPERTY()
759#endif
760
762
763public:
769 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Collision)
771
777 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=Lighting)
778 FLightingChannels LightingChannels;
779
780#if UE_WITH_PSO_PRECACHING
782 TArray<FMaterialPSOPrecacheRequestID> MaterialPSOPrecacheRequestIDs;
784 std::atomic<int> LatestPSOPrecacheJobSetCompleted = 0;
788#endif
789
793 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category = RayTracing, meta = (DisplayAfter="RayTracingGroupId"))
794 ERayTracingGroupCullingPriority RayTracingGroupCullingPriority;
795
797 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category = "Rendering", meta = (editcondition = "bRenderCustomDepth", DisplayAfter="CustomDepthStencilValue"))
798 ERendererStencilMask CustomDepthStencilWriteMask;
799
800private:
802 UPROPERTY(EditAnywhere, AdvancedDisplay, Category = HLOD, meta = (Bitmask, BitmaskEnum = "/Script/Engine.EHLODLevelExclusion", DisplayName = "Exclude from HLOD Levels", DisplayAfter = "bEnableAutoLODGeneration", EditConditionHides, EditCondition = "AllowHLODLevelsExclusion()"))
804
805public:
806
811 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category = RayTracing)
812 int32 RayTracingGroupId;
813
815 UPROPERTY()
816 int32 VisibilityId=0;
817
819 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=Rendering, meta=(UIMin = "0", UIMax = "255", editcondition = "bRenderCustomDepth", DisplayName = "CustomDepth Stencil Value"))
820 int32 CustomDepthStencilValue;
821
822private:
823
825 UPROPERTY(EditAnywhere, Category=Rendering, meta = (DisplayName = "Custom Primitive Data Defaults"))
827
831
833 TOptional<FBodyInstance::FAsyncTermBodyPayload> AsyncTermBodyPayload;
834
835public:
836
839
849 UPROPERTY(EditAnywhere, BlueprintReadOnly, AdvancedDisplay, Category=Rendering)
850 int32 TranslucencySortPriority;
851
859 UPROPERTY(EditAnywhere, BlueprintReadOnly, AdvancedDisplay, Category = Rendering)
860 float TranslucencySortDistanceOffset = 0.0f;
861
866 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = VirtualTexture, meta = (DisplayName = "Draw in Virtual Textures"))
867 TArray<TObjectPtr<URuntimeVirtualTexture>> RuntimeVirtualTextures;
868
870 UPROPERTY(EditAnywhere, AdvancedDisplay, Category = VirtualTexture, meta = (DisplayName = "Virtual Texture LOD Bias", UIMin = "-7", UIMax = "8"))
871 int8 VirtualTextureLodBias = 0;
872
878 UPROPERTY(EditAnywhere, AdvancedDisplay, Category = VirtualTexture, meta = (DisplayName = "Virtual Texture Skip Mips", UIMin = "0", UIMax = "7"))
879 int8 VirtualTextureCullMips = 0;
880
885 UPROPERTY(EditAnywhere, AdvancedDisplay, Category = VirtualTexture, meta = (UIMin = "0", UIMax = "7"))
886 int8 VirtualTextureMinCoverage = 0;
887
889 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = VirtualTexture, meta = (DisplayName = "Draw in Main Pass"))
891
893 virtual TArray<URuntimeVirtualTexture*> const& GetRuntimeVirtualTextures() const { return RuntimeVirtualTextures; }
895 virtual ERuntimeVirtualTextureMainPassType GetVirtualTextureRenderPassType() const { return VirtualTextureRenderPassType; }
897 virtual float GetVirtualTextureMainPassMaxDrawDistance() const { return 0.f; }
898
900 FPrimitiveComponentId GetPrimitiveSceneId() const { return SceneData.PrimitiveSceneId; }
901
903 ENGINE_API virtual void BeginPlay() override;
904
905protected:
908
911
912private:
913
915
916public:
917
924 UPROPERTY(EditAnywhere, AdvancedDisplay, Category=Rendering, meta=(UIMin = "1", UIMax = "10.0"))
925 float BoundsScale;
926
927 UE_DECLARE_COMPONENT_ACTOR_INTERFACE(PrimitiveComponent)
928
929private:
930
931 FPrimitiveSceneInfoData SceneData;
932
933#if MESH_DRAW_COMMAND_STATS
935 FName MeshDrawCommandStatsCategory;
936#endif
937
938 friend class FPrimitiveSceneInfo;
939 friend struct FPrimitiveSceneInfoAdapter;
940
941public:
942
943 FPrimitiveSceneInfoData& GetSceneData() { return SceneData; }
944 FThreadSafeCounter* GetAttachmentCounter() { return &GetSceneData().AttachmentCounter; }
945
946 ENGINE_API int32 GetRayTracingGroupId() const;
947
955 UFUNCTION(Category = "Rendering", BlueprintCallable, meta=(DisplayName="Was Component Recently Rendered", Keywords="scene visible"))
956 ENGINE_API bool WasRecentlyRendered(float Tolerance = 0.2f) const;
957
958 ENGINE_API void SetLastRenderTime(float InLastRenderTime);
959
960 ENGINE_API float GetLastRenderTime() const;
961 ENGINE_API float GetLastRenderTimeOnScreen() const;
962
963#if MESH_DRAW_COMMAND_STATS
965 FName GetMeshDrawCommandStatsCategory() const;
966#else
967 void SetMeshDrawCommandStatsCategory(FName StatsCategory) {}
968#endif
969
975
980
982 ENGINE_API virtual void PrecachePSOs() override;
983
986
988 ENGINE_API bool IsPSOPrecaching() const;
989
991 ENGINE_API bool ShouldRenderProxyFallbackToDefaultMaterial() const;
992
999
1000protected:
1001
1006 UE_DEPRECATED(5.7, "Please use GetUsedMaterialPropertyDesc with EShaderPlatform argument and not ERHIFeatureLevel::Type")
1007 ENGINE_API FPrimitiveMaterialPropertyDescriptor GetUsedMaterialPropertyDesc(ERHIFeatureLevel::Type FeatureLevel) const;
1009
1016
1017public:
1018
1026 UPROPERTY(Transient, DuplicateTransient)
1028
1034 UFUNCTION(BlueprintCallable, Category = "Collision", meta=(Keywords="Move MoveIgnore", UnsafeDuringActorConstruction="true"))
1036
1040 UFUNCTION(BlueprintCallable, meta=(DisplayName="Get Move Ignore Actors", UnsafeDuringActorConstruction="true"), Category = "Collision")
1042
1046 const TArray<AActor*>& GetMoveIgnoreActors() const { return MoveIgnoreActors; }
1047
1051 UFUNCTION(BlueprintCallable, Category = "Collision", meta=(UnsafeDuringActorConstruction="true"))
1053
1061 UPROPERTY(Transient, DuplicateTransient)
1062 TArray<TObjectPtr<UPrimitiveComponent>> MoveIgnoreComponents;
1063
1069 UFUNCTION(BlueprintCallable, Category = "Collision", meta=(Keywords="Move MoveIgnore", UnsafeDuringActorConstruction="true"))
1070 ENGINE_API void IgnoreComponentWhenMoving(UPrimitiveComponent* Component, bool bShouldIgnore);
1071
1075 UFUNCTION(BlueprintCallable, meta=(DisplayName="Get Move Ignore Components", UnsafeDuringActorConstruction="true"), Category = "Collision")
1076 ENGINE_API TArray<UPrimitiveComponent*> CopyArrayOfMoveIgnoreComponents();
1077
1081 const TArray<UPrimitiveComponent*>& GetMoveIgnoreComponents() const { return MoveIgnoreComponents; }
1082
1086 UFUNCTION(BlueprintCallable, Category = "Collision", meta=(UnsafeDuringActorConstruction="true"))
1088
1091
1093 FMaskFilter GetMoveIgnoreMask() const { return MoveIgnoreMask; }
1094
1097
1100
1103
1109 UFUNCTION(BlueprintCallable, Category = "Rendering|Material")
1111
1117 UFUNCTION(BlueprintCallable, Category = "Rendering|Material")
1119
1125 UFUNCTION(BlueprintCallable, Category = "Rendering|Material")
1127
1133 UFUNCTION(BlueprintCallable, Category = "Rendering|Material")
1135
1137 UFUNCTION(BlueprintCallable, Category="Rendering|Material")
1138 ENGINE_API void SetCustomPrimitiveDataFloat(int32 DataIndex, float Value);
1139
1141 UFUNCTION(BlueprintCallable, Category="Rendering|Material")
1143
1146
1148 UFUNCTION(BlueprintCallable, Category="Rendering|Material")
1150
1153
1155 UFUNCTION(BlueprintCallable, Category="Rendering|Material")
1157
1160
1162 UFUNCTION(BlueprintCallable, Category="Rendering|Material")
1163 ENGINE_API void SetCustomPrimitiveDataFloatArray(int32 DataIndex, const TArray<float>& Values);
1164
1167
1172 const FCustomPrimitiveData& GetCustomPrimitiveData() const { return CustomPrimitiveDataInternal; }
1173
1176
1182 UFUNCTION(BlueprintCallable, Category = "Rendering|Material")
1184
1190 UFUNCTION(BlueprintCallable, Category = "Rendering|Material")
1192
1194 UFUNCTION(BlueprintCallable, Category = "Rendering|Material")
1196
1198 UFUNCTION(BlueprintCallable, Category = "Rendering|Material")
1200
1203
1205 UFUNCTION(BlueprintCallable, Category = "Rendering|Material")
1207
1210
1212 UFUNCTION(BlueprintCallable, Category = "Rendering|Material")
1214
1217
1219 UFUNCTION(BlueprintCallable, Category="Rendering|Material")
1220 ENGINE_API void SetDefaultCustomPrimitiveDataFloatArray(int32 DataIndex, const TArray<float>& Values);
1221
1224
1230
1231#if WITH_EDITOR
1233 DECLARE_DELEGATE_RetVal_OneParam( bool, FSelectionOverride, const UPrimitiveComponent* );
1235#endif
1236
1237protected:
1238
1241
1244
1247
1248public:
1250 template<typename AllocatorType>
1252
1254 template<typename AllocatorType>
1256
1257private:
1258 template<typename AllocatorType>
1260
1261 // FScopedMovementUpdate needs access to the above two functions.
1262 friend FScopedMovementUpdate;
1263
1264public:
1272
1281
1287 UFUNCTION(BlueprintPure, Category="Collision", meta=(UnsafeDuringActorConstruction="true"))
1288 ENGINE_API bool IsOverlappingComponent(const UPrimitiveComponent* OtherComp) const;
1289
1292
1298 UFUNCTION(BlueprintPure, Category="Collision", meta=(UnsafeDuringActorConstruction="true"))
1299 ENGINE_API bool IsOverlappingActor(const AActor* Other) const;
1300
1302 ENGINE_API bool GetOverlapsWithActor(const AActor* Actor, TArray<FOverlapInfo>& OutOverlaps) const;
1303
1309 UFUNCTION(BlueprintPure, Category="Collision", meta=(UnsafeDuringActorConstruction="true"))
1310 ENGINE_API void GetOverlappingActors(TArray<AActor*>& OverlappingActors, TSubclassOf<AActor> ClassFilter=nullptr) const;
1311
1317 ENGINE_API void GetOverlappingActors(TSet<AActor*>& OverlappingActors, TSubclassOf<AActor> ClassFilter=nullptr) const;
1318
1320 UFUNCTION(BlueprintPure, Category="Collision", meta=(UnsafeDuringActorConstruction="true"))
1321 ENGINE_API void GetOverlappingComponents(TArray<UPrimitiveComponent*>& OutOverlappingComponents) const;
1322
1324 ENGINE_API void GetOverlappingComponents(TSet<UPrimitiveComponent*>& OutOverlappingComponents) const;
1325
1327 const TArray<FOverlapInfo>& GetOverlapInfos() const;
1328
1338 ENGINE_API virtual bool UpdateOverlapsImpl(const TOverlapArrayView* NewPendingOverlaps=nullptr, bool bDoNotifies=true, const TOverlapArrayView* OverlapsAtEndLocation=nullptr) override;
1339
1344 UFUNCTION(BlueprintCallable, Category = "Editor")
1345 virtual bool GetIgnoreBoundsForEditorFocus() const { return bIgnoreBoundsForEditorFocus; }
1346
1350 UFUNCTION(BlueprintCallable, Category = "Editor")
1352
1354 ENGINE_API virtual void UpdatePhysicsVolume( bool bTriggerNotifiers ) override;
1355
1370
1375 ENGINE_API const UPrimitiveComponent* GetLightingAttachmentRoot() const;
1376
1377protected:
1379 ENGINE_API 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;
1380
1381public:
1382 // Internal physics engine data.
1383
1385 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Collision, meta=(ShowOnlyInnerProperties, SkipUCSModifiedProperties))
1387
1397 UPROPERTY(BlueprintAssignable, Category="Collision")
1399
1408 UPROPERTY(BlueprintAssignable, Category="Collision")
1410
1415 UPROPERTY(BlueprintAssignable, Category="Collision")
1417
1421 UPROPERTY(BlueprintAssignable, Category="Collision")
1423
1427 UPROPERTY(BlueprintAssignable, Category = "Collision")
1429
1434
1438 UPROPERTY(BlueprintAssignable, Category = "Physics", TextExportTransient)
1439 FComponentPhysicsStateChanged OnComponentPhysicsStateChanged;
1440
1442 UPROPERTY(BlueprintAssignable, Category="Input|Mouse Input")
1443 FComponentBeginCursorOverSignature OnBeginCursorOver;
1444
1446 UPROPERTY(BlueprintAssignable, Category="Input|Mouse Input")
1447 FComponentEndCursorOverSignature OnEndCursorOver;
1448
1450 UPROPERTY(BlueprintAssignable, Category="Input|Mouse Input")
1452
1454 UPROPERTY(BlueprintAssignable, Category="Input|Mouse Input")
1456
1458 UPROPERTY(BlueprintAssignable, Category="Input|Touch Input")
1459 FComponentOnInputTouchBeginSignature OnInputTouchBegin;
1460
1462 UPROPERTY(BlueprintAssignable, Category="Input|Touch Input")
1463 FComponentOnInputTouchEndSignature OnInputTouchEnd;
1464
1466 UPROPERTY(BlueprintAssignable, Category="Input|Touch Input")
1467 FComponentBeginTouchOverSignature OnInputTouchEnter;
1468
1470 UPROPERTY(BlueprintAssignable, Category="Input|Touch Input")
1471 FComponentEndTouchOverSignature OnInputTouchLeave;
1472
1474 UFUNCTION(BlueprintCallable, Category = "Rendering")
1476
1482 UFUNCTION(BlueprintPure, Category="Rendering|Material")
1483 ENGINE_API virtual class UMaterialInterface* GetMaterial(int32 ElementIndex) const;
1484
1485#if WITH_EDITOR
1487 UFUNCTION(BlueprintPure, Category = "Rendering|Material")
1488 virtual class UMaterialInterface* GetEditorMaterial(int32 ElementIndex) const
1489 {
1490 return GetMaterial(ElementIndex);
1491 }
1492#endif
1493
1494 UFUNCTION(BlueprintCallable, Category = "Rendering|Material")
1495 ENGINE_API virtual int32 GetMaterialIndex(FName MaterialSlotName) const;
1496
1497 UFUNCTION(BlueprintCallable, Category = "Rendering|Material")
1498 ENGINE_API virtual TArray<FName> GetMaterialSlotNames() const;
1499
1500 UFUNCTION(BlueprintCallable, Category = "Rendering|Material")
1501 ENGINE_API virtual bool IsMaterialSlotNameValid(FName MaterialSlotName) const;
1502
1508 UFUNCTION(BlueprintCallable, Category = "Rendering|Material")
1509 ENGINE_API virtual class UMaterialInterface* GetMaterialByName(FName MaterialSlotName) const;
1510
1516 UFUNCTION(BlueprintCallable, Category="Rendering|Material")
1517 ENGINE_API virtual void SetMaterial(int32 ElementIndex, class UMaterialInterface* Material);
1518
1524 UFUNCTION(BlueprintCallable, Category = "Rendering|Material")
1525 ENGINE_API virtual void SetMaterialByName(FName MaterialSlotName, class UMaterialInterface* Material);
1526
1531 UFUNCTION(BlueprintCallable, meta=(DisplayName = "CreateMIDForElement", DeprecatedFunction, DeprecationMessage="Use CreateDynamicMaterialInstance instead."), Category="Rendering|Material")
1533
1538 UFUNCTION(BlueprintCallable, meta=(DisplayName = "CreateMIDForElementFromMaterial", DeprecatedFunction, DeprecationMessage="Use CreateDynamicMaterialInstance instead."), Category="Rendering|Material")
1540
1545 UFUNCTION(BlueprintCallable, Category="Rendering|Material")
1546 ENGINE_API virtual class UMaterialInstanceDynamic* CreateDynamicMaterialInstance(int32 ElementIndex, class UMaterialInterface* SourceMaterial = NULL, FName OptionalName = NAME_None);
1547
1554 UFUNCTION(BlueprintPure, Category = "Rendering|Material")
1555 ENGINE_API virtual UMaterialInterface* GetMaterialFromCollisionFaceIndex(int32 FaceIndex, int32& SectionIndex) const;
1556
1558 UFUNCTION(BlueprintPure, Category="Physics")
1559 ENGINE_API const struct FWalkableSlopeOverride& GetWalkableSlopeOverride() const;
1560
1562 UFUNCTION(BlueprintCallable, Category="Physics")
1563 ENGINE_API virtual void SetWalkableSlopeOverride(const FWalkableSlopeOverride& NewOverride);
1564
1577 UFUNCTION(BlueprintCallable, Category="Physics")
1578 ENGINE_API virtual void SetSimulatePhysics(bool bSimulate);
1579
1580 /*
1581 *
1582 */
1583 UFUNCTION(BlueprintCallable, Category="Physics")
1585
1586 UFUNCTION(BlueprintCallable, Category="Physics")
1587 bool GetStaticWhenNotMoveable() const { return bStaticWhenNotMoveable; }
1588
1592 ENGINE_API virtual bool CanEditSimulatePhysics();
1593
1598 UFUNCTION(BlueprintCallable, meta = (DisplayName = "Set Constraint Mode", Keywords = "set locked axis constraint physics"), Category = Physics)
1600
1608 UFUNCTION(BlueprintCallable, Category="Physics", meta=(UnsafeDuringActorConstruction="true"))
1609 ENGINE_API virtual void AddImpulse(FVector Impulse, FName BoneName = NAME_None, bool bVelChange = false);
1610
1618 UFUNCTION(BlueprintCallable, Category = "Physics", meta=(UnsafeDuringActorConstruction="true"))
1619 ENGINE_API virtual void AddAngularImpulseInRadians(FVector Impulse, FName BoneName = NAME_None, bool bVelChange = false);
1620
1628 UFUNCTION(BlueprintCallable, Category = "Physics", meta=(UnsafeDuringActorConstruction="true"))
1630 {
1631 AddAngularImpulseInRadians(FMath::DegreesToRadians(Impulse), BoneName, bVelChange);
1632 }
1633
1641 UFUNCTION(BlueprintCallable, Category="Physics", meta=(UnsafeDuringActorConstruction="true"))
1642 ENGINE_API virtual void AddImpulseAtLocation(FVector Impulse, FVector Location, FName BoneName = NAME_None);
1643
1651 UFUNCTION(BlueprintCallable, Category = "Physics", meta = (UnsafeDuringActorConstruction = "true"))
1652 ENGINE_API virtual void AddVelocityChangeImpulseAtLocation(FVector Impulse, FVector Location, FName BoneName = NAME_None);
1653
1654
1664 UFUNCTION(BlueprintCallable, Category="Physics", meta=(UnsafeDuringActorConstruction="true"))
1665 ENGINE_API virtual void AddRadialImpulse(FVector Origin, float Radius, float Strength, enum ERadialImpulseFalloff Falloff, bool bVelChange = false);
1666
1675 UFUNCTION(BlueprintCallable, Category="Physics", meta=(UnsafeDuringActorConstruction="true"))
1676 ENGINE_API virtual void AddForce(FVector Force, FName BoneName = NAME_None, bool bAccelChange = false);
1677
1686 UFUNCTION(BlueprintCallable, Category="Physics", meta=(UnsafeDuringActorConstruction="true"))
1687 ENGINE_API virtual void AddForceAtLocation(FVector Force, FVector Location, FName BoneName = NAME_None);
1688
1697 UFUNCTION(BlueprintCallable, Category="Physics", meta=(UnsafeDuringActorConstruction="true"))
1699
1709 UFUNCTION(BlueprintCallable, Category="Physics", meta=(UnsafeDuringActorConstruction="true"))
1710 ENGINE_API virtual void AddRadialForce(FVector Origin, float Radius, float Strength, enum ERadialImpulseFalloff Falloff, bool bAccelChange = false);
1711
1718 UFUNCTION(BlueprintCallable, Category="Physics", meta=(UnsafeDuringActorConstruction="true"))
1719 ENGINE_API virtual void AddTorqueInRadians(FVector Torque, FName BoneName = NAME_None, bool bAccelChange = false);
1720
1727 UFUNCTION(BlueprintCallable, Category="Physics", meta=(UnsafeDuringActorConstruction="true"))
1728 void AddTorqueInDegrees(FVector Torque, FName BoneName = NAME_None, bool bAccelChange = false)
1729 {
1730 AddTorqueInRadians(FMath::DegreesToRadians(Torque), BoneName, bAccelChange);
1731 }
1732
1741 UFUNCTION(BlueprintCallable, Category="Physics", meta=(UnsafeDuringActorConstruction="true"))
1743
1748 UFUNCTION(BlueprintCallable, Category="Physics", meta=(UnsafeDuringActorConstruction="true"))
1750
1756 UFUNCTION(BlueprintCallable, Category = "Physics", meta=(UnsafeDuringActorConstruction="true"))
1758
1765 UFUNCTION(BlueprintCallable, Category="Physics", meta=(UnsafeDuringActorConstruction="true"))
1767
1776 UFUNCTION(BlueprintCallable, Category="Physics", meta=(UnsafeDuringActorConstruction="true"))
1778
1787 UFUNCTION(BlueprintCallable, Category="Physics", meta=(UnsafeDuringActorConstruction="true"))
1789 {
1791 }
1792
1800 UFUNCTION(BlueprintCallable, Category = "Physics", meta=(UnsafeDuringActorConstruction="true"))
1802 {
1804 }
1805
1813 UFUNCTION(BlueprintCallable, Category = "Physics", meta=(UnsafeDuringActorConstruction="true"))
1815
1820 UFUNCTION(BlueprintCallable, Category="Physics", meta=(UnsafeDuringActorConstruction="true"))
1822 {
1824 }
1825
1830 UFUNCTION(BlueprintCallable, Category="Physics", meta=(UnsafeDuringActorConstruction="true"))
1832
1838 UFUNCTION(BlueprintPure, Category = "Physics", meta=(UnsafeDuringActorConstruction="true"))
1839 ENGINE_API FVector GetCenterOfMass(FName BoneName = NAME_None) const;
1840
1847 UFUNCTION(BlueprintCallable, Category = "Physics", meta=(UnsafeDuringActorConstruction="true"))
1848 ENGINE_API void SetCenterOfMass(FVector CenterOfMassOffset, FName BoneName = NAME_None);
1849
1854 UFUNCTION(BlueprintCallable, Category="Physics", meta=(UnsafeDuringActorConstruction="true"))
1856
1861 UFUNCTION(BlueprintCallable, Category="Physics", meta=(UnsafeDuringActorConstruction="true"))
1863
1865 UFUNCTION(BlueprintCallable, Category="Physics")
1866 ENGINE_API virtual void SetNotifyRigidBodyCollision(bool bNewNotifyRigidBodyCollision);
1867
1869 UFUNCTION(BlueprintCallable, Category="Rendering")
1871
1873 UFUNCTION(BlueprintCallable, Category="Rendering")
1875
1877 UFUNCTION(BlueprintCallable, Category = "Rendering")
1879
1881 UFUNCTION(BlueprintCallable, Category="Rendering")
1882 ENGINE_API void SetCastShadow(bool NewCastShadow);
1883
1885 UFUNCTION(BlueprintCallable, Category="Rendering")
1887
1889 UFUNCTION(BlueprintCallable, Category = "Rendering")
1891
1893 UFUNCTION(BlueprintCallable, Category="Rendering")
1895
1897 UFUNCTION(BlueprintCallable, Category = "Rendering")
1899
1901 UFUNCTION(BlueprintCallable, Category="Rendering")
1902 ENGINE_API void SetLightAttachmentsAsGroup(UPARAM(DisplayName="LightAttachmentsAsGroup") bool bInLightAttachmentsAsGroup);
1903
1905 UFUNCTION(BlueprintCallable, Category="Rendering")
1907
1909 UFUNCTION(BlueprintCallable, Category="Rendering")
1911
1913 UFUNCTION(BlueprintCallable, Category="Rendering")
1915
1917 UFUNCTION(BlueprintCallable, Category = "Rendering")
1919
1921 UFUNCTION(BlueprintCallable, Category = "Rendering")
1923
1925 UFUNCTION(BlueprintCallable, Category = "Rendering")
1927
1929 UFUNCTION(BlueprintCallable, Category = "Rendering")
1931
1933 UFUNCTION(BlueprintCallable, Category = "Rendering")
1935
1937 UFUNCTION(BlueprintCallable, Category = "Rendering")
1939
1940
1942 UFUNCTION(BlueprintCallable, Category="Collision")
1943 ENGINE_API virtual void SetCollisionEnabled(ECollisionEnabled::Type NewType);
1944
1952 UFUNCTION(BlueprintCallable, Category="Collision")
1953 ENGINE_API virtual void SetCollisionProfileName(FName InCollisionProfileName, bool bUpdateOverlaps=true);
1954
1956 UFUNCTION(BlueprintPure, Category="Collision")
1957 ENGINE_API FName GetCollisionProfileName() const;
1958
1963 UFUNCTION(BlueprintCallable, Category="Collision")
1964 ENGINE_API virtual void SetCollisionObjectType(ECollisionChannel Channel);
1965
1973 UFUNCTION(BlueprintCallable, Category="Collision", meta=(DisplayName = "Line Trace Component", ScriptName = "LineTraceComponent", bTraceComplex="true", bPersistentShowTrace="false", UnsafeDuringActorConstruction="true"))
1974 ENGINE_API bool K2_LineTraceComponent(FVector TraceStart, FVector TraceEnd, bool bTraceComplex, bool bShowTrace, bool bPersistentShowTrace, FVector& HitLocation, FVector& HitNormal, FName& BoneName, FHitResult& OutHit);
1975
1984 UFUNCTION(BlueprintCallable, Category = "Collision", meta = (DisplayName = "Sphere Trace Component", ScriptName = "SphereTraceComponent", bTraceComplex = "true", bPersistentShowTrace="false", UnsafeDuringActorConstruction = "true"))
1985 ENGINE_API bool K2_SphereTraceComponent(FVector TraceStart, FVector TraceEnd, float SphereRadius, bool bTraceComplex, bool bShowTrace, bool bPersistentShowTrace, FVector& HitLocation, FVector& HitNormal, FName& BoneName, FHitResult& OutHit);
1986
1994 UFUNCTION(BlueprintCallable, Category = "Collision", meta = (DisplayName = "Box Overlap Component", ScriptName = "BoxOverlapComponent", bTraceComplex = "true", bPersistentShowTrace="false", UnsafeDuringActorConstruction = "true"))
1996
2004 UFUNCTION(BlueprintCallable, Category = "Collision", meta = (DisplayName = "Sphere Overlap Component", ScriptName = "SphereOverlapComponent", bTraceComplex = "true", bPersistentShowTrace="false", UnsafeDuringActorConstruction = "true"))
2006
2008 UFUNCTION(BlueprintCallable, Category="Rendering")
2009 ENGINE_API void SetRenderCustomDepth(bool bValue);
2010
2012 UFUNCTION(BlueprintCallable, Category = "Rendering", meta=(UIMin = "0", UIMax = "255"))
2014
2016 UFUNCTION(BlueprintCallable, Category = "Rendering")
2018
2020 UFUNCTION(BlueprintCallable, Category = "Rendering")
2021 ENGINE_API void SetRenderInMainPass(bool bValue);
2022
2024 UFUNCTION(BlueprintCallable, Category = "Rendering")
2025 ENGINE_API void SetRenderInDepthPass(bool bValue);
2026
2028 UFUNCTION(BlueprintCallable, Category = "Rendering")
2029 ENGINE_API void SetVisibleInSceneCaptureOnly(bool bValue);
2030
2032 UFUNCTION(BlueprintCallable, Category = "Rendering")
2033 ENGINE_API void SetHiddenInSceneCapture(bool bValue);
2034
2036 UFUNCTION(BlueprintCallable, Category = "Rendering")
2038
2045
2047 FPrimitiveSceneProxy* SceneProxy;
2048
2049 FPrimitiveSceneProxy* GetSceneProxy() const { check(SceneProxy == SceneData.SceneProxy); return SceneData.SceneProxy; }
2050
2052 ENGINE_API void ReleaseSceneProxy();
2053
2055 bool IsAlwaysVisible() const { return SceneData.bAlwaysVisible; }
2056
2058 FRenderCommandFence DetachFence;
2059
2060private:
2062 UPROPERTY(NonPIEDuplicateTransient)
2063 TObjectPtr<class UPrimitiveComponent> LODParentPrimitive;
2064
2065 /* Returns true if component can be excluded from specific HLOD levels */
2066 UFUNCTION()
2068
2069public:
2070
2072 ENGINE_API void SetLODParentPrimitive(UPrimitiveComponent* InLODParentPrimitive);
2073
2075 ENGINE_API UPrimitiveComponent* GetLODParentPrimitive() const;
2076
2077#if WITH_EDITOR
2079 ENGINE_API virtual const bool ShouldGenerateAutoLOD(const int32 HierarchicalLevelIndex) const;
2080#endif
2082 ENGINE_API virtual bool ShouldRenderSelected() const;
2083
2085 ENGINE_API bool GetLevelInstanceEditingState() const;
2086
2088 ENGINE_API bool IsComponentIndividuallySelected() const;
2089
2091 ENGINE_API bool HasStaticLighting() const;
2092
2095
2096 virtual float GetStreamingScale() const { return 1.f; }
2097
2099 virtual bool HasValidSettingsForStaticLighting(bool bOverlookInvalidComponents) const
2100 {
2101 return HasStaticLighting();
2102 }
2103
2105 ENGINE_API virtual bool UsesOnlyUnlitMaterials() const;
2106
2115 ENGINE_API virtual bool GetLightMapResolution( int32& Width, int32& Height ) const;
2116
2123 virtual int32 GetStaticLightMapResolution() const { return 0; }
2124
2133 ENGINE_API virtual void GetLightAndShadowMapMemoryUsage( int32& LightMapMemoryUsage, int32& ShadowMapMemoryUsage ) const;
2134
2135#if WITH_EDITOR
2143
2145 virtual void AddMapBuildDataGUIDs(TSet<FGuid>& InGUIDs) const {}
2146
2152
2154 virtual uint32 ComputeHashTextureStreamingBuiltData() const { return 0; }
2155#endif // WITH_EDITOR
2156
2162 virtual ELightMapInteractionType GetStaticLightingType() const { return LMIT_None; }
2163
2170
2176
2187
2198
2204 virtual ESceneDepthPriorityGroup GetStaticDepthPriorityGroup() const { return DepthPriorityGroup; }
2205
2211 virtual void GetUsedMaterials(TArray<UMaterialInterface*>& OutMaterials, bool bGetDebugMaterials = false) const {}
2212
2219 ENGINE_API virtual void GetUsedTextures(TArray<UTexture*>& OutTextures, EMaterialQualityLevel::Type QualityLevel);
2220
2222 virtual class UBodySetup* GetBodySetup() { return NULL; }
2223
2226
2233 ENGINE_API virtual FMatrix GetRenderMatrix() const;
2234
2236 UFUNCTION(BlueprintPure, Category="Rendering|Material")
2237 ENGINE_API virtual int32 GetNumMaterials() const;
2238
2248 ENGINE_API virtual FBodyInstance* GetBodyInstance(FName BoneName = NAME_None, bool bGetWelded = true, int32 Index = INDEX_NONE) const;
2249
2259 UFUNCTION(BlueprintPure, Category = "Physics")
2260 ENGINE_API FBodyInstanceAsyncPhysicsTickHandle GetBodyInstanceAsyncPhysicsTickHandle(FName BoneName = NAME_None, bool bGetWelded = true, int32 Index = -1) const;
2261
2272
2283 {
2284 float DistanceSqr = -1.f;
2286 }
2287
2299 UFUNCTION(BlueprintCallable, Category = "Collision", meta=(UnsafeDuringActorConstruction="true"))
2301
2306 virtual FPrimitiveSceneProxy* CreateSceneProxy()
2307 {
2308 return NULL;
2309 }
2310
2311#if WITH_EDITOR
2316 virtual HHitProxy* CreateMeshHitProxy(int32 SectionIndex, int32 MaterialIndex) const
2317 {
2318 return nullptr;
2319 }
2320#endif
2321
2326 virtual bool ShouldRecreateProxyOnUpdateTransform() const
2327 {
2328 return false;
2329 }
2330
2335 virtual bool IsZeroExtent() const
2336 {
2337 return false;
2338 }
2339
2341 ENGINE_API virtual void RecreateInstanceBody(int32 InstanceBodyIndex);
2342
2344 ENGINE_API virtual void ReceiveComponentDamage(float DamageAmount, FDamageEvent const& DamageEvent, AController* EventInstigator, AActor* DamageCauser);
2345
2359 ENGINE_API virtual void WeldTo(class USceneComponent* InParent, FName InSocketName = NAME_None, bool bWeldToKinematicParent = false);
2360
2367 ENGINE_API virtual bool WeldToImplementation(USceneComponent * InParent, FName ParentSocketName = NAME_None, bool bWeldSimulatedChild = true, bool bWeldToKinematicParent = false);
2368
2372 ENGINE_API virtual void UnWeldFromParent();
2373
2377 ENGINE_API virtual void UnWeldChildren();
2378
2383
2385 ENGINE_API bool IsWelded() const;
2386
2397
2403 ENGINE_API virtual bool IsShown(const FEngineShowFlags& ShowFlags) const;
2404
2406 virtual bool SupportsWorldPositionOffsetVelocity() const { return true; }
2407
2408#if WITH_EDITOR
2420
2432#endif
2433
2434protected:
2435
2438
2440 virtual bool SupportsStaticLighting() const
2441 {
2442 return false;
2443 }
2444
2445public:
2446#if UE_ENABLE_DEBUG_DRAWING
2449private:
2453public:
2454#endif
2455
2456 //~ Begin UActorComponent Interface
2457 using Super::SendRenderDynamicData_Concurrent;
2458 ENGINE_API virtual void CreateRenderState_Concurrent(FRegisterComponentContext* Context) override;
2459 ENGINE_API virtual void SendRenderTransform_Concurrent() override;
2460 ENGINE_API virtual void OnRegister() override;
2461 ENGINE_API virtual void OnUnregister() override;
2462 ENGINE_API virtual void DestroyRenderState_Concurrent() override;
2463 ENGINE_API virtual void OnCreatePhysicsState() override;
2464 ENGINE_API virtual void OnDestroyPhysicsState() override;
2465 ENGINE_API virtual void OnActorEnableCollisionChanged() override;
2466 ENGINE_API virtual void InvalidateLightingCacheDetailed(bool bInvalidateBuildEnqueuedLighting, bool bTranslationOnly) override;
2467 ENGINE_API virtual bool IsEditorOnly() const override;
2468 ENGINE_API virtual bool ShouldCreatePhysicsState() const override;
2469 ENGINE_API virtual bool HasValidPhysicsState() const override;
2470 ENGINE_API virtual TStructOnScope<FActorComponentInstanceData> GetComponentInstanceData() const override;
2471 ENGINE_API virtual void OnComponentDestroyed(bool bDestroyingHierarchy) override;
2472#if WITH_EDITOR
2473 ENGINE_API virtual void CheckForErrors() override;
2475#endif // WITH_EDITOR
2476 //~ End UActorComponent Interface
2477
2478 //~ Begin IAsyncPhysicsStateProcessor
2479 ENGINE_API virtual void OnAsyncCreatePhysicsStateEnd_GameThread() override;
2480 ENGINE_API virtual bool OnAsyncDestroyPhysicsState(const UE::FTimeout& Timeout) override;
2481 ENGINE_API virtual void OnAsyncDestroyPhysicsStateBegin_GameThread() override;
2482 ENGINE_API virtual void OnAsyncDestroyPhysicsStateEnd_GameThread() override;
2483 ENGINE_API virtual void CollectBodySetupsWithPhysicsMeshesToCreate(TSet<UBodySetup*>& OutBodySetups) const override;
2484 //~ End IAsyncPhysicsStateProcessor
2485
2486protected:
2489
2492
2495
2498
2501public:
2502
2503 //~ Begin UObject Interface.
2504 ENGINE_API virtual void Serialize(FArchive& Ar) override;
2505 ENGINE_API virtual void PostInitProperties() override;
2506 ENGINE_API virtual void PostLoad() override;
2507 ENGINE_API virtual void PostDuplicate(bool bDuplicateForPIE) override;
2508 ENGINE_API virtual void GetResourceSizeEx(FResourceSizeEx& CumulativeResourceSize) override;
2509 ENGINE_API virtual void BeginDestroy() override;
2510 ENGINE_API virtual void FinishDestroy() override;
2511 ENGINE_API virtual bool IsReadyForFinishDestroy() override;
2512 ENGINE_API virtual bool NeedsLoadForClient() const override;
2513 ENGINE_API virtual bool NeedsLoadForServer() const override;
2514#if WITH_EDITOR
2515 ENGINE_API virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
2516 ENGINE_API virtual void PostEditChangeChainProperty(FPropertyChangedChainEvent& PropertyChangedEvent) override;
2517 ENGINE_API virtual bool CanEditChange(const FProperty* InProperty) const override;
2518 ENGINE_API virtual void UpdateCollisionProfile();
2519 ENGINE_API virtual void PostEditImport() override;
2520 ENGINE_API virtual void PreSave(FObjectPreSaveContext ObjectSaveContext) override;
2521#endif // WITH_EDITOR
2522 //~ End UObject Interface.
2523
2524 //~ Begin USceneComponent Interface
2525
2527 UFUNCTION(BlueprintPure, Category="Collision")
2528 ENGINE_API virtual ECollisionEnabled::Type GetCollisionEnabled() const override;
2529
2531 UFUNCTION(BlueprintPure, meta=(DisplayName="Is Collision Enabled", ScriptName="IsCollisionEnabled"), Category="Collision")
2532 bool K2_IsCollisionEnabled() const;
2533
2535 UFUNCTION(BlueprintPure, meta=(DisplayName="Is Query Collision Enabled", ScriptName="IsQueryCollisionEnabled"), Category="Collision")
2536 bool K2_IsQueryCollisionEnabled() const;
2537
2539 UFUNCTION(BlueprintPure, meta=(DisplayName="Is Physics Collision Enabled", ScriptName="IsPhysicsCollisionEnabled"), Category="Collision")
2540 bool K2_IsPhysicsCollisionEnabled() const;
2541
2543 UFUNCTION(BlueprintPure, Category="Collision")
2544 ENGINE_API virtual ECollisionResponse GetCollisionResponseToChannel(ECollisionChannel Channel) const override;
2545
2547 UFUNCTION(BlueprintPure, Category="Collision")
2548 ENGINE_API virtual ECollisionChannel GetCollisionObjectType() const override;
2549
2553 ENGINE_API virtual bool MoveComponentImpl(const FVector& Delta, const FQuat& NewRotation, bool bSweep, FHitResult* OutHit = NULL, EMoveComponentFlags MoveFlags = MOVECOMP_NoFlags, ETeleportType Teleport = ETeleportType::None) override;
2555 ENGINE_API virtual const FCollisionResponseContainer& GetCollisionResponseToChannels() const override;
2556 ENGINE_API virtual FVector GetComponentVelocity() const override;
2557#if WITH_EDITOR
2558 ENGINE_API virtual void UpdateBounds() override;
2559 ENGINE_API virtual const int32 GetNumUncachedStaticLightingInteractions() const override;
2560#endif
2561 //~ End USceneComponentInterface
2562
2564
2571 ENGINE_API void DispatchBlockingHit(AActor& OutOwner, FHitResult const& BlockingHit);
2572
2577 ENGINE_API void DispatchWakeEvents(ESleepEvent WakeEvent, FName BoneName);
2578
2582 ENGINE_API virtual bool ShouldDispatchWakeEvents(FName BoneName) const;
2583
2588
2592 ENGINE_API virtual struct FCollisionShape GetCollisionShape(float Inflation = 0.0f) const;
2593
2599 virtual bool AreSymmetricRotations(const FQuat& A, const FQuat& B, const FVector& Scale3D) const { return A.Equals(B); }
2600
2604 ENGINE_API virtual void PushSelectionToProxy();
2605
2610
2615 ENGINE_API void PushHoveredToProxy(const bool bInHovered);
2616
2619
2621 virtual float GetEmissiveBoost(int32 ElementIndex) const { return 1.0f; };
2622
2624 virtual float GetDiffuseBoost(int32 ElementIndex) const { return 1.0f; };
2625
2627 virtual bool GetShadowIndirectOnly() const { return false; }
2628
2630 virtual bool IsCompiling() const { return false; }
2631
2632 ENGINE_API virtual void GetPrimitiveStats(FPrimitiveStats& PrimitiveStats) const;
2633
2634#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
2637#endif
2638
2639#if WITH_EDITOR
2641 ENGINE_API virtual uint64 GetHiddenEditorViews() const;
2642
2645
2646
2647 ENGINE_API void SetSelectionOutlineColorIndex(uint8 SelectionOutlineColorIndex);
2648
2649 ENGINE_API void SetOverlayColor(FColor OverlayColor);
2651#endif// WITH_EDITOR
2652
2655
2662 UFUNCTION(BlueprintCallable, Category = "Physics", meta = (UnsafeDuringActorConstruction = "true"))
2664 {
2666 }
2667
2674 UFUNCTION(BlueprintCallable, Category = "Physics", meta = (UnsafeDuringActorConstruction = "true"))
2676
2684
2692
2699 ENGINE_API virtual void SetAllPhysicsRotation(const FQuat& NewRot);
2700
2704 UFUNCTION(BlueprintCallable, Category="Physics", meta=(UnsafeDuringActorConstruction="true"))
2705 ENGINE_API virtual void WakeAllRigidBodies();
2706
2708 UFUNCTION(BlueprintCallable, Category="Physics")
2709 ENGINE_API virtual void SetEnableGravity(bool bGravityEnabled);
2710
2712 UFUNCTION(BlueprintPure, Category="Physics")
2713 ENGINE_API virtual bool IsGravityEnabled() const;
2714
2716 UFUNCTION(BlueprintCallable, Category="Physics")
2717 ENGINE_API virtual void SetUpdateKinematicFromSimulation(bool bUpdateKinematicFromSimulation);
2718
2720 UFUNCTION(BlueprintPure, Category="Physics")
2721 ENGINE_API virtual bool GetUpdateKinematicFromSimulation() const;
2722
2724 UFUNCTION(BlueprintCallable, Category = "Physics")
2725 ENGINE_API void SetGyroscopicTorqueEnabled(bool bInGyroscopicTorqueEnabled);
2726
2728 UFUNCTION(BlueprintPure, Category = "Physics")
2729 ENGINE_API virtual bool GetGyroscopicTorqueEnabled() const;
2730
2732 UFUNCTION(BlueprintCallable, Category="Physics")
2733 ENGINE_API virtual void SetLinearDamping(float InDamping);
2734
2736 UFUNCTION(BlueprintPure, Category="Physics")
2737 ENGINE_API virtual float GetLinearDamping() const;
2738
2740 UFUNCTION(BlueprintCallable, Category="Physics")
2741 ENGINE_API virtual void SetAngularDamping(float InDamping);
2742
2744 UFUNCTION(BlueprintPure, Category="Physics")
2745 ENGINE_API virtual float GetAngularDamping() const;
2746
2748 UFUNCTION(BlueprintCallable, Category="Physics")
2749 ENGINE_API virtual void SetMassScale(FName BoneName = NAME_None, float InMassScale = 1.f);
2750
2752 UFUNCTION(BlueprintPure, Category = "Physics")
2753 ENGINE_API virtual float GetMassScale(FName BoneName = NAME_None) const;
2754
2756 UFUNCTION(BlueprintCallable, Category="Physics")
2758
2764 UFUNCTION(BlueprintCallable, Category = "Physics")
2765 ENGINE_API virtual void SetMassOverrideInKg(FName BoneName = NAME_None, float MassInKg = 1.f, bool bOverrideMass = true);
2766
2768 UFUNCTION(BlueprintPure, Category="Physics", meta=(UnsafeDuringActorConstruction="true"))
2769 ENGINE_API virtual float GetMass() const;
2770
2772 UFUNCTION(BlueprintPure, Category = "Physics", meta =(Keywords = "physics moment of inertia tensor MOI", UnsafeDuringActorConstruction="true"))
2773 ENGINE_API virtual FVector GetInertiaTensor(FName BoneName = NAME_None) const;
2774
2776 UFUNCTION(BlueprintPure, Category = "Physics", meta = (Keywords = "physics moment of inertia tensor MOI", UnsafeDuringActorConstruction="true"))
2778
2780 ENGINE_API virtual float CalculateMass(FName BoneName = NAME_None);
2781
2788 UFUNCTION(BlueprintCallable, Category = "Physics")
2789 ENGINE_API virtual float GetMaxDepenetrationVelocity(FName BoneName = NAME_None);
2790
2797 UFUNCTION(BlueprintCallable, Category = "Physics")
2798 ENGINE_API virtual void SetMaxDepenetrationVelocity(FName BoneName = NAME_None, float InMaxDepenetrationVelocity = -1.0f);
2799
2801 UFUNCTION(BlueprintCallable, Category = "Physics")
2802 ENGINE_API virtual void SetUseCCD(bool InUseCCD, FName BoneName = NAME_None);
2803
2805 UFUNCTION(BlueprintCallable, Category = "Physics")
2807
2809 UFUNCTION(BlueprintCallable, Category = "Physics")
2810 ENGINE_API virtual void SetUseMACD(bool InUseMACD, FName BoneName = NAME_None);
2811
2813 UFUNCTION(BlueprintCallable, Category = "Physics")
2815
2819 UFUNCTION(BlueprintCallable, Category = "Physics")
2820 ENGINE_API virtual void SetAllowPartialIslandSleep(bool InAllowPartialIslandSleep = true, FName BoneName = NAME_None);
2821
2825 UFUNCTION(BlueprintCallable, Category = "Physics")
2827
2832
2837 ENGINE_API bool RigidBodyIsAwake(FName BoneName = NAME_None) const;
2838
2842 UFUNCTION(BlueprintPure, Category = "Physics", meta = (Keywords = "physics asleep sleeping awake simulating", UnsafeDuringActorConstruction="true"))
2843 ENGINE_API virtual bool IsAnyRigidBodyAwake();
2844
2851 UFUNCTION(BlueprintCallable, Category="Collision")
2853
2859 UFUNCTION(BlueprintCallable, Category="Collision")
2861
2867 ENGINE_API virtual void SetCollisionResponseToChannels(const FCollisionResponseContainer& NewReponses);
2868
2869protected:
2871 ENGINE_API virtual void OnComponentCollisionSettingsChanged(bool bUpdateOverlaps=true);
2872
2875
2877 ENGINE_API void ClearComponentOverlaps(bool bDoNotifies, bool bSkipNotifySelf);
2878
2879private:
2882
2883public:
2889
2891 UFUNCTION(BlueprintCallable, Category = Replication)
2892 ENGINE_API void RegisterAsFocalPointInPhysicsReplicationLOD() const;
2893
2895 UFUNCTION(BlueprintCallable, Category = Replication)
2896 ENGINE_API void UnregisterAsFocalPointInPhysicsReplicationLOD() const;
2897
2898protected:
2899 virtual bool CanBeUsedInPhysicsReplication(const FName BoneName = NAME_None) const { return true; }
2900
2901public:
2902
2908 ENGINE_API bool GetRigidBodyState(FRigidBodyState& OutState, FName BoneName = NAME_None);
2909
2915 UFUNCTION(BlueprintCallable, Category="Physics", meta=(DisplayName="Set PhysicalMaterial Override"))
2916 ENGINE_API virtual void SetPhysMaterialOverride(class UPhysicalMaterial* NewPhysMaterial);
2917
2924
2929 UFUNCTION(BlueprintCallable, Category="LOD", meta=(DisplayName="Set Max Draw Distance"))
2930 ENGINE_API void SetCullDistance(float NewCullDistance);
2931
2936
2942
2951 );
2952
2961 ENGINE_API virtual bool LineTraceComponent( FHitResult& OutHit, const FVector Start, const FVector End, const FCollisionQueryParams& Params );
2962
2974 ENGINE_API 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);
2975
2986 ENGINE_API virtual bool SweepComponent(FHitResult& OutHit, const FVector Start, const FVector End, const FQuat& ShapeWorldRotation, const FCollisionShape &CollisionShape, bool bTraceComplex=false);
2987
3001 ENGINE_API 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);
3002
3013 bool ComponentOverlapComponent(class UPrimitiveComponent* PrimComp, const FVector Pos, const FQuat& Rot, const FCollisionQueryParams& Params);
3014 bool ComponentOverlapComponent(class UPrimitiveComponent* PrimComp, const FVector Pos, const FRotator Rot, const FCollisionQueryParams& Params);
3015
3027 bool ComponentOverlapComponentWithResult(const class UPrimitiveComponent* const PrimComp, const FVector& Pos, const FQuat& Rot, const FCollisionQueryParams& Params, TArray<FOverlapResult>& OutOverlap) const;
3028 bool ComponentOverlapComponentWithResult(const class UPrimitiveComponent* const PrimComp, const FVector& Pos, const FRotator& Rot, const FCollisionQueryParams& Params, TArray<FOverlapResult>& OutOverlap) const;
3029protected:
3031 ENGINE_API virtual bool ComponentOverlapComponentImpl(class UPrimitiveComponent* PrimComp, const FVector Pos, const FQuat& Rot, const FCollisionQueryParams& Params);
3032 ENGINE_API virtual bool ComponentOverlapComponentWithResultImpl(const class UPrimitiveComponent* const PrimComp, const FVector& Pos, const FQuat& Rot, const FCollisionQueryParams& Params, TArray<FOverlapResult>& OutOverlap) const;
3033
3034public:
3044 //UE_DEPRECATED(5.0, "Use the const version of OverlapComponent. This deprecation cannot be uncommented as it would produce false positives." )
3045 virtual bool OverlapComponent(const FVector& Pos, const FQuat& Rot, const FCollisionShape& CollisionShape) final
3046 {
3047 return const_cast<const UPrimitiveComponent*>(this)->OverlapComponent(Pos, Rot, CollisionShape);
3048 }
3049 ENGINE_API virtual bool OverlapComponent(const FVector& Pos, const FQuat& Rot, const FCollisionShape& CollisionShape) const;
3050
3060 ENGINE_API virtual bool OverlapComponentWithResult(const FVector& Pos, const FQuat& Rot, const FCollisionShape& CollisionShape, TArray<FOverlapResult>& OutOverlap) const;
3061
3075 ENGINE_API 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;
3076
3085 ENGINE_API virtual bool ComputePenetration(FMTDResult & OutMTD, const FCollisionShape& CollisionShape, const FVector& Pos, const FQuat& Rot);
3086
3093 UFUNCTION(BlueprintCallable, Category=Collision)
3094 ENGINE_API virtual bool CanCharacterStepUp(class APawn* Pawn) const;
3095
3096 //~ Begin INavRelevantInterface Interface
3097 ENGINE_API virtual void GetNavigationData(FNavigationRelevantData& OutData) const override;
3098 ENGINE_API virtual FBox GetNavigationBounds() const override;
3099 ENGINE_API virtual bool IsNavigationRelevant() const override;
3100 ENGINE_API virtual UBodySetup* GetNavigableGeometryBodySetup() override final; // marked as final since PrimitiveComponent derived classes relies on GetBodySetup()
3101 ENGINE_API virtual FTransform GetNavigableGeometryTransform() const override final; // marked as final since PrimitiveComponent derived classes relies on GetComponentTransform()
3102
3104 ENGINE_API virtual EHasCustomNavigableGeometry::Type HasCustomNavigableGeometry() const override;
3105
3109 ENGINE_API virtual bool DoCustomNavigableGeometryExport(FNavigableGeometryExport& GeomExport) const override;
3110 //~ End INavRelevantInterface Interface
3111
3112 // Returns true if we should check the GetGenerateOverlapEvents() flag when gathering overlaps, otherwise we'll always just do it.
3113 inline bool ShouldCheckOverlapFlagToQueueOverlaps(const UPrimitiveComponent& ThisComponent) const;
3114
3117
3118 static ENGINE_API void DispatchMouseOverEvents(UPrimitiveComponent* CurrentComponent, UPrimitiveComponent* NewComponent);
3119 static ENGINE_API void DispatchTouchOverEvents(ETouchIndex::Type FingerIndex, UPrimitiveComponent* CurrentComponent, UPrimitiveComponent* NewComponent);
3120 ENGINE_API void DispatchOnClicked(FKey ButtonClicked = EKeys::LeftMouseButton);
3121 ENGINE_API void DispatchOnReleased(FKey ButtonReleased = EKeys::LeftMouseButton);
3122 ENGINE_API void DispatchOnInputTouchBegin(const ETouchIndex::Type Key);
3123 ENGINE_API void DispatchOnInputTouchEnd(const ETouchIndex::Type Key);
3124
3125 //~ Begin IPhysicsComponent Interface.
3126public:
3127 ENGINE_API virtual Chaos::FPhysicsObject* GetPhysicsObjectById(Chaos::FPhysicsObjectId Id) const override;
3128 ENGINE_API virtual Chaos::FPhysicsObject* GetPhysicsObjectByName(const FName& Name) const override;
3129 ENGINE_API virtual TArray<Chaos::FPhysicsObject*> GetAllPhysicsObjects() const override;
3130 ENGINE_API virtual Chaos::FPhysicsObjectId GetIdFromGTParticle(Chaos::FGeometryParticle* Particle) const override;
3131 //~ End IPhysicsComponent Interface.
3132
3134 inline bool IsStaticPhysics() const { return Mobility != EComponentMobility::Movable && bStaticWhenNotMoveable; }
3135
3137 inline bool IsFirstPersonRelevant() const { return FirstPersonPrimitiveType != EFirstPersonPrimitiveType::None; }
3138protected:
3139
3140 UFUNCTION()
3142
3143#if UE_WITH_REMOTE_OBJECT_HANDLE
3144
3146
3147 ENGINE_API virtual void MigratePhysicsState(FArchive& Ar) override;
3148
3150
3151 ENGINE_API virtual void PostMigrate(const struct FUObjectMigrationContext& MigrationContext) override;
3152#endif
3153
3154protected:
3155 void AddNavigationModifier(FNavigationRelevantData& OutData) const;
3156};
3157
3162USTRUCT()
3164{
3166public:
3168 ENGINE_API FPrimitiveComponentInstanceData(const UPrimitiveComponent* SourceComponent);
3170
3171 ENGINE_API virtual bool ContainsData() const override;
3172
3173 ENGINE_API virtual void ApplyToComponent(UActorComponent* Component, const ECacheApplyPhase CacheApplyPhase) override;
3174 ENGINE_API virtual void FindAndReplaceInstances(const TMap<UObject*, UObject*>& OldToNewInstanceMap) override;
3175 ENGINE_API virtual void AddReferencedObjects(FReferenceCollector& Collector) override;
3176
3177 const FTransform& GetComponentTransform() const { return ComponentTransform; }
3178
3179private:
3180 UPROPERTY()
3181 FTransform ComponentTransform;
3182
3183 UPROPERTY()
3184 int32 VisibilityId = INDEX_NONE;
3185
3186 UPROPERTY()
3187 TObjectPtr<UPrimitiveComponent> LODParent = nullptr;
3188
3189#if WITH_EDITOR
3190 FColor OverlayColor;
3191#endif
3192
3193};
3194
3195
3197// PrimitiveComponent inlines
3198
3199inline 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
3200{
3201 return ComponentOverlapMultiImpl(OutOverlaps, InWorld, Pos, Rot, TestChannel, Params, ObjectQueryParams);
3202}
3203
3204inline 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
3205{
3206 return ComponentOverlapMultiImpl(OutOverlaps, InWorld, Pos, Rot.Quaternion(), TestChannel, Params, ObjectQueryParams);
3207}
3208
3209inline bool UPrimitiveComponent::ComponentOverlapComponent(class UPrimitiveComponent* PrimComp, const FVector Pos, const FQuat& Rot, const FCollisionQueryParams& Params)
3210{
3211 return ComponentOverlapComponentImpl(PrimComp, Pos, Rot, Params);
3212}
3213
3214inline bool UPrimitiveComponent::ComponentOverlapComponent(class UPrimitiveComponent* PrimComp, const FVector Pos, const FRotator Rot, const FCollisionQueryParams& Params)
3215{
3216 return ComponentOverlapComponentImpl(PrimComp, Pos, Rot.Quaternion(), Params);
3217}
3218
3219inline bool UPrimitiveComponent::ComponentOverlapComponentWithResult(const class UPrimitiveComponent* const PrimComp, const FVector& Pos, const FQuat& Rot, const FCollisionQueryParams& Params, TArray<FOverlapResult>& OutOverlap) const
3220{
3221 return ComponentOverlapComponentWithResultImpl(PrimComp, Pos, Rot, Params, OutOverlap);
3222}
3223
3224inline bool UPrimitiveComponent::ComponentOverlapComponentWithResult(const class UPrimitiveComponent* const PrimComp, const FVector& Pos, const FRotator& Rot, const FCollisionQueryParams& Params, TArray<FOverlapResult>& OutOverlap) const
3225{
3226 return ComponentOverlapComponentWithResultImpl(PrimComp, Pos, Rot.Quaternion(), Params, OutOverlap);
3227}
3228
3229inline const TArray<FOverlapInfo>& UPrimitiveComponent::GetOverlapInfos() const
3230{
3231 return OverlappingComponents;
3232}
3233
3234inline bool UPrimitiveComponent::K2_IsCollisionEnabled() const
3235{
3236 return IsCollisionEnabled();
3237}
3238
3239inline bool UPrimitiveComponent::K2_IsQueryCollisionEnabled() const
3240{
3241 return IsQueryCollisionEnabled();
3242}
3243
3244inline bool UPrimitiveComponent::K2_IsPhysicsCollisionEnabled() const
3245{
3247}
3248
3249inline bool UPrimitiveComponent::GetGenerateOverlapEvents() const
3250{
3251 return bGenerateOverlapEvents;
3252}
3253
3254inline bool UPrimitiveComponent::ShouldCheckOverlapFlagToQueueOverlaps(const UPrimitiveComponent& ThisComponent) const
3255{
3256 const FScopedMovementUpdate* CurrentUpdate = ThisComponent.GetCurrentScopedMovement();
3257 if (CurrentUpdate)
3258 {
3260 }
3261 // By default we require the GetGenerateOverlapEvents() to queue up overlaps, since we require it to trigger events.
3262 return true;
3263}
3264
3266// PrimitiveComponent templates
3267
3268template<typename AllocatorType>
3269bool UPrimitiveComponent::ConvertSweptOverlapsToCurrentOverlaps(
3271 const FVector& EndLocation, const FQuat& EndRotationQuat)
3272{
3274
3275 bool bResult = false;
3276 const bool bForceGatherOverlaps = !ShouldCheckOverlapFlagToQueueOverlaps(*this);
3278 {
3279 const AActor* Actor = GetOwner();
3280 if (Actor && Actor->GetRootComponent() == this)
3281 {
3282 // We know we are not overlapping any new components at the end location. Children are ignored here (see note below).
3284 {
3286
3287 // Check components we hit during the sweep, keep only those still overlapping
3289 const int32 NumSweptOverlaps = SweptOverlaps.Num();
3292 {
3294 UPrimitiveComponent* OtherPrimitive = OtherOverlap.OverlapInfo.GetComponent();
3295 if (OtherPrimitive && (OtherPrimitive->GetGenerateOverlapEvents() || bForceGatherOverlaps))
3296 {
3297 if (OtherPrimitive->bMultiBodyOverlap)
3298 {
3299 // Not handled yet. We could do it by checking every body explicitly and track each body index in the overlap test, but this seems like a rare need.
3300 return false;
3301 }
3303 {
3304 // SkeletalMeshComponent does not support this operation, and would return false in the test when an actual query could return true.
3305 return false;
3306 }
3307 else if (OtherPrimitive->ComponentOverlapComponent(this, EndLocation, EndRotationQuat, UnusedQueryParams))
3308 {
3310 }
3311 }
3312 }
3313
3314 // Note: we don't worry about adding any child components here, because they are not included in the sweep results.
3315 // Children test for their own overlaps after we update our own, and we ignore children in our own update.
3317 TEXT("Child overlaps should not be included in the SweptOverlaps() array in UPrimitiveComponent::ConvertSweptOverlapsToCurrentOverlaps()."));
3318
3319 bResult = true;
3320 }
3321 else
3322 {
3324 {
3325 // Add overlaps with components in this actor.
3327 bResult = true;
3328 }
3329 }
3330 }
3331 }
3332
3333 return bResult;
3334}
3335
3336template<typename AllocatorType>
3337bool UPrimitiveComponent::ConvertRotationOverlapsToCurrentOverlaps(TArray<FOverlapInfo, AllocatorType>& OutOverlapsAtEndLocation, const TOverlapArrayView& CurrentOverlaps)
3338{
3339 bool bResult = false;
3340 const bool bForceGatherOverlaps = !ShouldCheckOverlapFlagToQueueOverlaps(*this);
3342 {
3343 const AActor* Actor = GetOwner();
3344 if (Actor && Actor->GetRootComponent() == this)
3345 {
3347 {
3348 // Add all current overlaps that are not children. Children test for their own overlaps after we update our own, and we ignore children in our own update.
3351 bResult = true;
3352 }
3353 }
3354 }
3355
3356 return bResult;
3357}
3358
3359template<typename AllocatorType>
3360bool UPrimitiveComponent::GetOverlapsWithActor_Template(const AActor* Actor, TArray<FOverlapInfo, AllocatorType>& OutOverlaps) const
3361{
3362 const int32 InitialCount = OutOverlaps.Num();
3363 if (Actor)
3364 {
3366 {
3367 UPrimitiveComponent const* const PrimComp = OverlappingComponents[OverlapIdx].OverlapInfo.Component.Get();
3368 if (PrimComp && (PrimComp->GetOwner() == Actor))
3369 {
3370 OutOverlaps.Add(OverlappingComponents[OverlapIdx]);
3371 }
3372 }
3373 }
3374
3375 return InitialCount != OutOverlaps.Num();
3376}
3377
3378#if UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_5
3379#include "InputCoreTypes.h"
3380#include "PSOPrecache.h"
3381#endif
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
#define NULL
Definition oodle2base.h:134
EUpdateTransformFlags
Definition ActorComponent.h:95
#define checkSlow(expr)
Definition AssertionMacros.h:332
#define checkfSlow(expr, format,...)
Definition AssertionMacros.h:333
#define check(expr)
Definition AssertionMacros.h:314
ERadialImpulseFalloff
Definition ChaosEngineInterface.h:91
uint8 FMaskFilter
Definition CollisionFilter.h:14
ECacheApplyPhase
Definition ComponentInstanceDataCache.h:18
#define UE_DECLARE_COMPONENT_ACTOR_INTERFACE(name)
Definition ComponentInterfaces.h:193
@ INDEX_NONE
Definition CoreMiscDefines.h:150
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
FPlatformTypes::int8 int8
An 8-bit signed integer.
Definition Platform.h:1121
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
FPlatformTypes::uint64 uint64
A 64-bit unsigned integer.
Definition Platform.h:1117
#define DECLARE_CYCLE_STAT_EXTERN(CounterName, StatId, GroupId, API)
Definition Stats.h:679
#define SCOPE_CYCLE_COUNTER(Stat)
Definition Stats.h:650
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define DECLARE_DELEGATE_RetVal_OneParam(ReturnValueType, DelegateName, Param1Type)
Definition DelegateCombinations.h:54
ETeleportType
Definition EngineTypes.h:2401
ESleepEvent
Definition EngineTypes.h:1711
ECollisionChannel
Definition EngineTypes.h:1088
ECollisionResponse
Definition EngineTypes.h:1240
ELightmapType
Definition EngineTypes.h:210
ESceneDepthPriorityGroup
Definition EngineTypes.h:187
EIndirectLightingCacheQuality
Definition EngineTypes.h:198
return true
Definition ExternalRpcRegistry.cpp:601
EHLODBatchingPolicy
Definition HLODBatchingPolicy.h:14
EHLODLevelExclusion
Definition HLODLevelExclusion.h:11
EHitProxyPriority
Definition HitProxies.h:27
const bool
Definition NetworkReplayStreaming.h:178
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define UPARAM(...)
Definition ObjectMacros.h:748
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UFUNCTION(...)
Definition ObjectMacros.h:745
#define UCLASS(...)
Definition ObjectMacros.h:776
#define UENUM(...)
Definition ObjectMacros.h:749
#define USTRUCT(...)
Definition ObjectMacros.h:746
const bool bTraceComplex
Definition PhysicsInterfaceUtils.h:19
EPSOPrecachePriority
Definition PipelineStateCache.h:33
ERendererStencilMask
Definition PrimitiveComponent.h:103
EComponentPhysicsStateChange
Definition PrimitiveComponent.h:220
EFirstPersonPrimitiveType
Definition PrimitiveComponent.h:134
ECanBeCharacterBase
Definition PrimitiveComponent.h:68
@ UMETA
Definition PrimitiveComponent.h:70
@ ECB_MAX
Definition PrimitiveComponent.h:78
ERayTracingGroupCullingPriority
Definition PrimitiveComponent.h:119
@ Two
Definition PropertyPathHelpersTest.h:17
EStencilMask
Definition RHIDefinitions.h:428
@ SM_255
Definition RHIDefinitions.h:430
@ SM_32
Definition RHIDefinitions.h:436
@ SM_4
Definition RHIDefinitions.h:433
@ SM_64
Definition RHIDefinitions.h:437
@ SM_1
Definition RHIDefinitions.h:431
@ SM_Default
Definition RHIDefinitions.h:429
@ SM_8
Definition RHIDefinitions.h:434
@ SM_128
Definition RHIDefinitions.h:438
@ SM_2
Definition RHIDefinitions.h:432
@ SM_16
Definition RHIDefinitions.h:435
EShaderPlatform
Definition RHIShaderPlatform.h:11
ERuntimeVirtualTextureMainPassType
Definition RuntimeVirtualTextureEnum.h:58
EMoveComponentFlags
Definition SceneComponent.h:56
@ MOVECOMP_NoFlags
Definition SceneComponent.h:58
ELightMapInteractionType
Definition SceneTypes.h:111
@ LMIT_None
Definition SceneTypes.h:112
EShadowCacheInvalidationBehavior
Definition SceneTypes.h:219
USkinnedMeshComponent float
Definition SkinnedMeshComponent.h:60
#define DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_SixParams(SparseDelegateClass, OwningClass, DelegateName, Param1Type, Param1Name, Param2Type, Param2Name, Param3Type, Param3Name, Param4Type, Param4Name, Param5Type, Param5Name, Param6Type, Param6Name)
Definition SparseDelegate.h:451
#define DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_FiveParams(SparseDelegateClass, OwningClass, DelegateName, Param1Type, Param1Name, Param2Type, Param2Name, Param3Type, Param3Name, Param4Type, Param4Name, Param5Type, Param5Name)
Definition SparseDelegate.h:450
#define DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_TwoParams(SparseDelegateClass, OwningClass, DelegateName, Param1Type, Param1Name, Param2Type, Param2Name)
Definition SparseDelegate.h:447
#define DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_OneParam(SparseDelegateClass, OwningClass, DelegateName, Param1Type, Param1Name)
Definition SparseDelegate.h:446
#define DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_FourParams(SparseDelegateClass, OwningClass, DelegateName, Param1Type, Param1Name, Param2Type, Param2Name, Param3Type, Param3Name, Param4Type, Param4Name)
Definition SparseDelegate.h:449
ETextureStreamingBuildType
Definition TextureStreamingTypes.h:204
EObjectMigrationSendType
Definition UObjectMigrationContext.h:43
void Move(T &A, typename TMoveSupportTraits< T >::Copy B)
Definition UnrealTemplate.h:24
if(Failed) console_printf("Failed.\n")
uint8_t uint8
Definition binka_ue_file_header.h:8
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition Actor.h:257
Definition Controller.h:41
Definition ImplicitObject.h:111
Definition Engine.Build.cs:7
Definition Archive.h:1208
Definition LightingBuildOptions.h:14
Definition NameTypes.h:617
Definition UObjectGlobals.h:1292
Definition ObjectSaveContext.h:244
Definition UnrealType.h:3087
Definition PhysScene_Chaos.h:116
Definition PrimitiveComponentId.h:12
Definition PrimitiveSceneInfo.h:266
Definition PrimitiveSceneProxy.h:296
Definition PropertyPairsMap.h:13
Definition UnrealType.h:174
Definition UObjectGlobals.h:2492
Definition ActorComponent.h:47
Definition RenderCommandFence.h:15
Definition ScopedMovementUpdate.h:56
bool RequiresOverlapsEventFlag() const
Definition ScopedMovementUpdate.h:225
Definition StaticMeshResources.h:1003
Definition StaticMeshResources.h:952
Definition TextureStreamingTypes.h:223
Definition Text.h:385
Definition ThreadSafeCounter.h:14
Definition ObjectMacros.h:180
Definition HitProxies.h:135
Definition Interface_AsyncCompilation.h:21
Definition NavRelevantInterface.h:49
Definition IPhysicsComponent.h:21
Definition ArrayView.h:139
Definition Array.h:670
UE_REWRITE SizeType Num() const
Definition Array.h:1144
UE_NODEBUG UE_FORCEINLINE_HINT SizeType Add(ElementType &&Item)
Definition Array.h:2696
void Empty(SizeType Slack=0)
Definition Array.h:2273
Definition EnumAsByte.h:22
Definition UnrealString.h.inl:34
Definition StructOnScope.h:142
Definition SubclassOf.h:30
Definition UniquePtr.h:107
Definition ActorComponent.h:152
Definition ActorTextureStreamingBuildDataComponent.h:43
Definition BodySetup.h:128
Definition Timeout.h:21
Definition MaterialInstanceDynamic.h:15
Definition MaterialInterface.h:296
Definition PhysicalMaterial.h:104
Definition RuntimeVirtualTexture.h:18
Definition Texture.h:1219
Definition World.h:918
void CopyIf(const InT &Input, OutT &Output, PredicateT Predicate)
Definition Copy.h:18
Definition SkeletalMeshComponent.h:307
Definition EngineTypes.h:1571
@ Movable
Definition EngineTypes.h:3812
Type
Definition BodyInstance.h:42
Definition NavigationElement.h:18
Type
Definition SceneTypes.h:132
@ BodyInstance
Definition PhysxUserData.h:25
Definition SceneComponent.h:24
Type
Definition RHIFeatureLevel.h:20
Definition InputCoreTypes.h:255
Definition RobinHoodHashTable.h:18
const FName CastShadow("CastShadow")
Definition PrimitiveComponent.h:58
int32 bAllowCachedOverlapsCVar
Definition PrimitiveComponent.cpp:112
int32 bEnableFastOverlapCheck
Definition PrimitiveComponent.cpp:137
float InitialOverlapToleranceCVar
Definition PrimitiveComponent.cpp:120
float HitDistanceToleranceCVar
Definition PrimitiveComponent.cpp:129
Definition SceneManagement.h:73
int
Definition TestServer.py:515
FQuat2D Rot
Definition STestSuite.cpp:5721
Definition VirtualTextureRecreate.cpp:16
@ false
Definition radaudio_common.h:23
U16 Index
Definition radfft.cpp:71
Definition InputCoreTypes.h:290
Definition BodyInstance.h:307
Definition BodyInstance.h:320
Definition CollisionQueryParams.h:430
static ENGINE_API FCollisionObjectQueryParams DefaultObjectQueryParam
Definition CollisionQueryParams.h:538
Definition CollisionQueryParams.h:43
static TStatId GetUnknownStatId()
Definition CollisionQueryParams.h:99
Definition EngineTypes.h:1339
Definition CollisionQueryParams.h:324
Definition CollisionShape.h:21
Definition Color.h:486
Definition CollisionQueryParams.h:297
static ENGINE_API FComponentQueryParams DefaultComponentQueryParams
Definition CollisionQueryParams.h:319
Definition ConvexVolume.h:44
Definition SceneTypes.h:30
Definition DamageEvents.h:16
Definition ShowFlags.h:56
Definition HitResult.h:21
UPrimitiveComponent * GetComponent() const
Definition HitResult.h:227
Definition InputCoreTypes.h:50
Definition EngineTypes.h:562
Definition Color.h:48
Definition EngineTypes.h:2418
static constexpr UE_FORCEINLINE_HINT auto DegreesToRadians(T const &DegVal) -> decltype(DegVal *(UE_PI/180.f))
Definition UnrealMathUtility.h:871
static constexpr UE_FORCEINLINE_HINT auto RadiansToDegrees(T const &RadVal) -> decltype(RadVal *(180.f/UE_PI))
Definition UnrealMathUtility.h:857
Definition NavigationSystemHelpers.h:25
Definition NavigationRelevantData.h:40
Definition OverlapInfo.h:14
FHitResult OverlapInfo
Definition OverlapInfo.h:39
Definition OverlapResult.h:13
Definition PSOPrecache.h:30
Definition PrimitiveComponent.h:199
bool operator()(const FOverlapInfo &Info)
Definition PrimitiveComponent.h:205
FPredicateOverlapHasDifferentActor(const AActor &Owner)
Definition PrimitiveComponent.h:200
Definition PrimitiveComponent.h:181
bool operator()(const FOverlapInfo &Info)
Definition PrimitiveComponent.h:187
FPredicateOverlapHasSameActor(const AActor &Owner)
Definition PrimitiveComponent.h:182
Definition PrimitiveComponent.h:3164
virtual ~FPrimitiveComponentInstanceData()=default
const FTransform & GetComponentTransform() const
Definition PrimitiveComponent.h:3177
Definition SceneTypes.h:237
Definition PrimitiveSceneInfo.cpp:197
Definition PrimitiveSceneInfoData.h:16
Definition ComponentInterfaces.h:48
Definition UnrealType.h:7001
Definition UnrealType.h:6865
Definition PrimitiveComponent.h:146
static EStencilMask ToStencilMask(const ERendererStencilMask InEnum)
Definition PrimitiveComponent.h:147
Definition ResourceSize.h:31
Definition ReplicatedState.h:86
Definition SceneComponent.h:1743
Definition PrimitiveComponent.h:84
Definition StaticLighting.h:506
Definition UObjectMigrationContext.h:62
Definition EngineTypes.h:3483
Definition ObjectPtr.h:488
Definition Optional.h:131
Definition WeakObjectPtrTemplates.h:25
FORCEINLINE bool HasSameIndexAndSerialNumber(const TWeakObjectPtr &Other) const
Definition WeakObjectPtrTemplates.h:273