UBodySetup::CreatePhysicsMeshesAsync

Create Physics meshes (ConvexMeshes, TriMesh & TriMeshNegX) from cooked data async (useful for runtime cooking as it can go wide off the game thread) Release Physics meshes (ConvexMeshes, TriMesh & TriMeshNegX).

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/BodySetup.cpp

Syntax

void CreatePhysicsMeshesAsync
(
    FOnAsyncPhysicsCookFinished OnAsyncPhysicsCookFinished
)

Remarks

Create Physics meshes (ConvexMeshes, TriMesh & TriMeshNegX) from cooked data async (useful for runtime cooking as it can go wide off the game thread) Release Physics meshes (ConvexMeshes, TriMesh & TriMeshNegX). Must be called before the BodySetup is destroyed

You cannot use the body setup until this operation is done. You must create the physics state (call CreatePhysicsState, or InitBody, etc..) , this does not automatically update the BodyInstance state for you

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