Dynamic Actor with transformation that doesn't crahs on SetActorLocation?

I am creating characters dynamically, those characters have references to ctors as IK targets.
So in addition to creating characters dynamically, I try to create an IK target for each character and set it in it’s reference for IK actor.

I found that only actors with a mesh have a transformation. The issue is that when I create an actor of class AStaticMeshActor, when I set the location with SetActorLocation it randomly crash.

What am I doing wrong?
I am spawning the AStaticMeshActor like so:

AActor * IKActor1 = (AActor*)(GetWorld()->SpawnActor<AStaticMeshActor>());
	spawnedActor1->IKLeftHandTarget = IKActor1;

And then checking if IKLeftHandTarget is not null before setting it’s new location with SetActorLocation.
Then it crash.
Actually sometimes it might run a few frames before crashing there.

How do I spawn a moveable actor target for my IK dynamically?


We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.