UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ChaosUserEntity.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
7
9{
10public:
14
16 return EntityTypeName;
17 }
18
19 // Get the UObject (usually a verse::component) that owns this FChaosUserDefinedEntity
21
22private:
23 FName EntityTypeName;
24};
25
26// This is used to add your own Unreal Engine agnostic user entities to Chaos Physics Results
28{
37
38 // Get the UObject that controls the lifetime of the physics objects
39 // that will be referencing this UserData object. It will be stored
40 // as a weak pointer in hit/overlap results to verify that the raw
41 // PhysicsObject pointer they hold is valid.
43 {
44 if (UserDefinedEntity != nullptr)
45 {
47 }
49 }
50
51 FChaosUserData* ChaosUserData; // Chaos data to access the physics body properties
53};
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition ChaosUserEntity.h:9
FName GetEntityTypeName()
Definition ChaosUserEntity.h:15
FChaosUserDefinedEntity()=delete
virtual TWeakObjectPtr< UObject > GetOwnerObject()=0
virtual ~FChaosUserDefinedEntity()
Definition ChaosUserEntity.h:13
FChaosUserDefinedEntity(FName InEntityTypeName)
Definition ChaosUserEntity.h:12
Definition NameTypes.h:617
@ ChaosUserEntity
Definition PhysicsInterfaceTypesCore.h:192
Definition PhysicsInterfaceTypesCore.h:199
void * Payload
Definition PhysicsInterfaceTypesCore.h:202
EChaosUserDataType::Type Type
Definition PhysicsInterfaceTypesCore.h:201
Definition ChaosUserEntity.h:28
FChaosUserDefinedEntity * UserDefinedEntity
Definition ChaosUserEntity.h:52
TWeakObjectPtr< UObject > GetOwnerObject()
Definition ChaosUserEntity.h:42
FChaosUserEntityAppend()
Definition ChaosUserEntity.h:29
FChaosUserData * ChaosUserData
Definition ChaosUserEntity.h:51
Definition WeakObjectPtrTemplates.h:25