SpawnActor failed because the given transform is invalid

I got this warning when I tried to spawn actor with GetWorld()->SpawnActor method

SpawnActor failed because the given transform is invalid

So, I used custom FActorSpawnParameters for specifiy the actor must be spawned always:

FActorSpawnParameters spawnParams;
spawnParams.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn;
GetWorld()->SpawnActor<AActor>(ThrustActor, HitResult.Location, {}, spawnParams);

And this gives no any results!

Hey, I just ran into this problem too, i had FRotator() in for my rotation.

LogSpawn:Warning: SpawnActor failed because the given transform (-3381.800781,17154.839844,150.000000|-90.000000,0.000000,-nan(ind)|1.000000,1.000000,1.000000) is invalid

I’m guessing that is the issue, since the transform part thats broke is (-90,0,-nan(ind))

Try shove in some actual values for the rotation

Worked for me, Thanks!

Glad to hear!