Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/FBodyInstance
Description
Apply a material directly to the passed in shape. Note this function is very advanced and requires knowledge of shape sharing as well as threading. Note: assumes the appropriate locks have been obtained
| Name | ApplyMaterialToShape_AssumesLocked |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/PhysicsEngine/BodyInstance.h |
| Include Path | #include "PhysicsEngine/BodyInstance.h" |
| Source | /Engine/Source/Runtime/Engine/Private/PhysicsEngine/BodyInstance.cpp |
static void ApplyMaterialToShape_AssumesLocked
(
const FPhysicsShapeHandle & InShape,
UPhysicalMaterial * SimplePhysMat,
const TArrayView < UPhysicalMaterial * > & ComplexPhysMats,
const TArrayView < FPhysicalMaterialMaskParams > * ComplexPhysMatMasks
)
Parameters
| Name | Remarks |
|---|---|
| PShape | The shape we are applying the material to |
| SimplePhysMat | The material to use if a simple shape is provided (or complex materials are empty) |
| ComplexPhysMats | The array of materials to apply if a complex shape is provided |