UBodySetup::CreateFromModel

Converts a [UModel](API\Runtime\Engine\UModel) to a set of convex hulls for simplified collision.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/PhysicsEngine/BodySetup.h

Include

#include "PhysicsEngine/BodySetup.h"

Source

/Engine/Source/Runtime/Engine/Private/PhysicsEngine/PhysUtils.cpp

Syntax

bool CreateFromModel
(
    class UModel * InModel,
    bool bRemoveExisting
)

Remarks

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.

Returns

true on success, false on failure because of vertex count overflow.

Parameters

Parameter

Description

InModel

The input BSP.

bRemoveExisting

If true, clears any pre-existing collision

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss