Hi, I have a function for spawning AI bots in my project & it uses random transforms from a list of cached spawn transforms every time it’s spawning a bot. I noticed that the bots sometimes teleport around once or twice extremely rapidly when spawning them. After going through my code as well as the collision many times, I finally realized the ‘Spawn Actor from Class’ node gets triggered multiple times, even though the actor itself is spawned only once. But one issue that I’m guessing is possibly due to this is that when you use random spawn transforms each time, the spawned bot might be teleporting between these multiple random transforms, everytime the breakpoint is triggered.
Just to make sure that my blueprint didn’t get corrupted, I tried setting a breakpoint at a spawn actor node in a new blueprint project & noticed that the node gets triggered twice, even though the actor is spawned only once. I just want to know if this is an intended behavior or something that might have to be taken to the bug reports section. So it would be great if someone from Epic could clarify this matter. Thanks.
[A temporary solution to prevent this spawn distortion when using random spawn transforms, is to store the transform in a local variable first and then pass it to the spawn actor node. This way, even if the spawn actor is getting executed in multiple stages, only the same transform gets passed into it everytime during a single spawn event]