If the static mesh has UseSimpleCollisionAsComplex and does not have any SimpleCollision shapes, The physics actor will be destroyed immediately in FInitBodiesHelperBase::CreateShapesAndActors, but since it is before the scene is added, the PhysicsActor will be delayed until the persistent level is destroyed.
This can be fatal for titles which use switching sublevels repeatedly without changing persistent level.
Here's a fix
// Takes actor ref arrays. // #PHYS2 this used to return arrays of low-level physics bodies, which would be added to scene in InitBodies. Should it still do that, rather then later iterate over BodyInstances to get phys actor refs? bool FInitBodiesHelperBase::CreateShapesAndActors() { ...omitted... CreateActor_AssumesLocked(Instance, Transform); const bool bInitFail = CreateShapes_AssumesLocked(Instance); if (bInitFail) { #if WITH_EDITOR //In the editor we may have ended up here because of world trace ignoring our EnableCollision. Since we can't get at the data in that function we check for it here if(!PrimitiveComp || PrimitiveComp->IsCollisionEnabled()) #endif { UE_LOG(LogPhysics, Log, TEXT("Init Instance %d of Primitive Component %s failed. Does it have collision data available?"), BodyIdx, *PrimitiveComp->GetReadableName()); } #if 0 FPhysicsInterface::ReleaseActor(Instance->ActorHandle, PhysScene ); #else // this is the workaround FPhysicsInterface::ReleaseActor(Instance->ActorHandle, PhysScene, true/*bNeverDeferRelease*/ ); #endif Instance->OwnerComponent = nullptr; Instance->BodySetup = nullptr; Instance->ExternalCollisionProfileBodySetup = nullptr; continue; } FPhysicsInterface::SetActorUserData_AssumesLocked(Instance->ActorHandle, &Instance->PhysicsUserData); } return true; }
Each time displaying the sublevel increase PhysX memory by around 10 KBytes.
[Link Removed]
i have this problem UE4CC-Windows-58DC12AF4B97F057BD108FBFF569B2E9_0000
I am not able to find world outliner how to enable it?
How does UMG set overlapping layouts?
How to achieve HLSL Multiple Render Target in Material blueprints?
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
What property of the Slider is the image used when dragging?
What properties of the progress bar can be used for drag and drop highlighting?
What method is used to fill polygonal regions when drawing spline mesh at run time?
When I open UE4 4.24.3 it appears that. Does anyone know how to solve?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-113811 in the post.
1 |
Component | UE - Simulation - Physics |
---|---|
Affects Versions | 4.25 |
Created | Apr 19, 2021 |
---|---|
Updated | Feb 1, 2023 |