i created a simple destructible mesh and wrote this code, why is it not ticking?
AMyDestructibleActor::AMyDestructibleActor(const class FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer)
{
PrimaryActorTick.bCanEverTick = true;
}
void AMyDestructibleActor::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
UE_LOG(LogTemp, Warning, TEXT(“GG init!!!”));
//Draw All Centers to the screen!
#if WITH_PHYSX
ScreenMsg(“Got into PhysX!!!”);
uint32 ChunkCount = DestructibleComponent->ApexDestructibleActor->getNumVisibleChunks();
const uint16* ChunkIndices = DestructibleComponent->ApexDestructibleActor->getVisibleChunks();
for (uint32 c = 0; c < ChunkCount; c++)
{
PxRigidDynamic* PActor = DestructibleComponent->ApexDestructibleActor->getChunkPhysXActor(ChunkIndices[c]);
check(PActor);
PxTransform Trans = PActor->getGlobalPose();
PxVec3& PxLoc = Trans.p;
FVector Location(PxLoc.x, PxLoc.y, PxLoc.z);
DrawPoint(Location);
ScreenMsg("physx loc", Location.ToString());
}
}
#endif // WITH_PHYSX