UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
BodySetup.cpp File Reference

Macros

#define VERIFY_COOKED_PHYS_DATA   0
 
#define LOCTEXT_NAMESPACE   "PhysicsAsset"
 

Functions

PRAGMA_ENABLE_DEPRECATION_WARNINGS DEFINE_STAT (STAT_PhysXCooking)
 
bool IsRuntimeCookingEnabled ()
 
ENGINE_API TAutoConsoleVariable< floatCVarContactOffsetFactor (TEXT("p.ContactOffsetFactor"), -1.f, TEXT("Multiplied by min dimension of object to calculate how close objects get before generating contacts. < 0 implies use project settings. Default: 0.01"), ECVF_Default)
 
ENGINE_API TAutoConsoleVariable< floatCVarMaxContactOffset (TEXT("p.MaxContactOffset"), -1.f, TEXT("Max value of contact offset, which controls how close objects get before generating contacts. < 0 implies use project settings. Default: 1.0"), ECVF_Default)
 
 DEFINE_LOG_CATEGORY (LogPhysics)
 
bool IsRuntime (const UBodySetup *BS)
 
 DECLARE_CYCLE_STAT (TEXT("Create Physics Meshes"), STAT_CreatePhysicsMeshes, STATGROUP_Physics)
 
 DECLARE_CYCLE_STAT (TEXT("AddShapesToRigidActor"), STAT_AddShapesToActor, STATGROUP_Physics)
 
 DECLARE_CYCLE_STAT (TEXT("AddGeomToSolver"), STAT_AddGeomToSolver, STATGROUP_Physics)
 
template<bool bPositionAndNormal, bool bUseConvexShapes>
float GetClosestPointAndNormalImpl (const UBodySetup *BodySetup, const FVector &WorldPosition, const FTransform &LocalToWorld, FVector *ClosestWorldPosition, FVector *FeatureNormal)
 
float SignedVolumeOfTriangle (const FVector3f &p1, const FVector3f &p2, const FVector3f &p3)
 

Macro Definition Documentation

◆ LOCTEXT_NAMESPACE

#define LOCTEXT_NAMESPACE   "PhysicsAsset"

◆ VERIFY_COOKED_PHYS_DATA

#define VERIFY_COOKED_PHYS_DATA   0

Enable to verify that the cooked data matches the source data as we cook it

Function Documentation

◆ CVarContactOffsetFactor()

ENGINE_API TAutoConsoleVariable< float > CVarContactOffsetFactor ( TEXT("p.ContactOffsetFactor")  ,
-1.  f,
TEXT("Multiplied by min dimension of object to calculate how close objects get before generating contacts. < 0 implies use project settings. Default: 0.01")  ,
ECVF_Default   
)

◆ CVarMaxContactOffset()

ENGINE_API TAutoConsoleVariable< float > CVarMaxContactOffset ( TEXT("p.MaxContactOffset")  ,
-1.  f,
TEXT("Max value of contact offset, which controls how close objects get before generating contacts. < 0 implies use project settings. Default: 1.0")  ,
ECVF_Default   
)

◆ DECLARE_CYCLE_STAT() [1/3]

DECLARE_CYCLE_STAT ( TEXT("AddGeomToSolver")  ,
STAT_AddGeomToSolver  ,
STATGROUP_Physics   
)

◆ DECLARE_CYCLE_STAT() [2/3]

DECLARE_CYCLE_STAT ( TEXT("AddShapesToRigidActor")  ,
STAT_AddShapesToActor  ,
STATGROUP_Physics   
)

◆ DECLARE_CYCLE_STAT() [3/3]

DECLARE_CYCLE_STAT ( TEXT("Create Physics Meshes" ,
STAT_CreatePhysicsMeshes  ,
STATGROUP_Physics   
)

◆ DEFINE_LOG_CATEGORY()

DEFINE_LOG_CATEGORY ( LogPhysics  )

◆ DEFINE_STAT()

◆ GetClosestPointAndNormalImpl()

template<bool bPositionAndNormal, bool bUseConvexShapes>
float GetClosestPointAndNormalImpl ( const UBodySetup BodySetup,
const FVector WorldPosition,
const FTransform LocalToWorld,
FVector ClosestWorldPosition,
FVector FeatureNormal 
)

◆ IsRuntime()

bool IsRuntime ( const UBodySetup BS)

◆ IsRuntimeCookingEnabled()

bool IsRuntimeCookingEnabled ( )

◆ SignedVolumeOfTriangle()

float SignedVolumeOfTriangle ( const FVector3f p1,
const FVector3f p2,
const FVector3f p3 
)