I have a C++ actor class where I attach a mesh collider component to it:
// Root collider capsule
rootCollider = CreateDefaultSubobject<UCapsuleComponent>(TEXT("RootCollider"));
rootCollider->SetRelativeRotation(FQuat(0, 1, 0, FMath::DegreesToRadians(90)));
rootCollider->AttachParent = RootComponent;
rootCollider->SetCollisionResponseToAllChannels(ECollisionResponse::ECR_Overlap);
rootCollider->SetCollisionEnabled(ECollisionEnabled::Type::QueryAndPhysics);
This all works. I the convert this actor to Blueprints and go into the Blueprints editor and it looks fine. However, when I try to Set Collision Presets on this collider component, I get a crash in the editor
Here is the stack of where it is crashing:
UE4Editor-Engine.dll!FLatentActionManager::ProcessLatentActions(UObject * InObject, float DeltaTime) Line 49 C++
UE4Editor-Engine.dll!AActor::Tick(float DeltaSeconds) Line 684 C++
And here is where it is exactly complaining:
void FLatentActionManager::ProcessLatentActions(UObject* InObject, float DeltaTime)
{
for (FActionsForObject::TIterator It(ActionsToRemoveMap); It; ++It)
{
auto ActionList = GetActionListForObject(InObject);
auto ActionToRemoveListPtr = It.Value();
if (ActionToRemoveListPtr.IsValid() && ActionList)
{
for (auto PendingActionToKill : *ActionToRemoveListPtr)
{
const int32 RemovedNum = ActionList->RemoveSingle(PendingActionToKill.Key, PendingActionToKill.Value);
auto Action = PendingActionToKill.Value;
if (RemovedNum && Action)
{
Action->NotifyActionAborted();
delete Action;
}
}
}
}
.....
Is there anything I am missing here? It seems to me that the editor is having issues retrieving actions for the object?
Here is my declaration of the object in header:
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = Collision)
UCapsuleComponent * rootCollider;
Please let me know how I can resolve this issue. Thanks!