Hi, I have a problem with difference between spawning physical actor in C++ and with place actor directly on level.
I spawn it using the following construction:
AEnemy* Enemy = GetWorld()->SpawnActor(EnemyBP, Position * 100, Orientation);
position is 100% outside of any colliders in scene.
I compared every line of the both actors physical properties and they are 100% the same (mass, collision, hits, overlaps, advanced properties)
Hi again, for some reason I completely forgot to specify what difference I saw…
It was a difference in physical behavior - in C++ it was flying away right after spawn, when placed on scene - no issues.
But I’ve managed to get consistent results with a following steps:
Update all physical properties in PostActorCreated() instead of OnConstruction
Turn off physics in PostActorCreated() and enable it in BeginPlay
That solved the issues for me, hope it can be helpful for anyone faced the same problem