4.8 Transition Guide

//PhysX changes

“physx::PxRigidDynamic* Actor”
Has been removed from, struct FDestructibleChunkInfo.

If you need to access the PxRigidDynamic Actors a thread safe way is:



	FPhysScene* PhysScene = GetWorld()->GetPhysicsScene();
	const uint32 SceneType = BodyInstance.UseAsyncScene(PhysScene) ? PST_Async : PST_Sync;
	PxScene* PScene = PhysScene->GetPhysXScene(SceneType);

	SCOPED_SCENE_WRITE_LOCK(PScene);
	{
		uint32 ChunkCount = ApexDestructibleActor->getNumVisibleChunks();
		const uint16* ChunkIndices = ApexDestructibleActor->getVisibleChunks();
		for (uint32 c = 0; c < ChunkCount; c++)
		{
			PxRigidDynamic* Actor = ApexDestructibleActor->getChunkPhysXActor(ChunkIndices[c]);
			check(Actor);
                        Actor->dostuff...
                 }
          }