Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UBodySetup
Description
Converts a UModel to a set of convex hulls for simplified collision. Any convex elements already in this BodySetup will be destroyed. WARNING: the input model can have no single polygon or set of coplanar polygons which merge to more than FPoly::MAX_VERTICES vertices.
| Name | CreateFromModel |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/PhysicsEngine/BodySetup.h |
| Include Path | #include "PhysicsEngine/BodySetup.h" |
| Source | /Engine/Source/Runtime/Engine/Private/PhysicsEngine/PhysUtils.cpp |
bool CreateFromModel
(
class UModel * InModel,
bool bRemoveExisting
)
true on success, false on failure because of vertex count overflow.
Parameters
| Name | Remarks |
|---|---|
| InModel | The input BSP. |
| bRemoveExisting | If true, clears any pre-existing collision |