Is there a Spawn actor limit?
Been trying FOREVER to get a particle shotgun system to work.
see: https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/1484346-limit-on-spawn-actor-shotgun-not-spawning-all-projectiles and https://answers.unrealengine.com/questions/796225/how-to-make-a-shotgun-spread.html if interested
I cleaned up the blueprint finally to something much better, and found if there was ANY delay in the script before the next loop (.01) each particle would fully spawn with everything it was supposed to have. Yet upon removal the FINAL actor would spawn and nothing else.
Just fiddling, I turned off the mesh for the pellet's effect on lighting, shadows, reflection etc (that are all automatically on) deciding I didnt need them and it might improve performance in the end. The result was an increase in spawns of 1-2 to about 6-8.
Realizing that this meant it was probably a performance limitation of some kind i attempted to clear the material from the mesh (turns out that's kind of hard) and ultimately just changed the mesh to the 1x1x1 cube with no collisions generated for it. and it worked perfectly When I dropped in a mesh that was a same size cube with pre-generated collisions the spawn once again dropped It seems that while the system generates the collisions the rest of the loop is operated and the variable used to exit the loop (which also feeds into the maths I set up for altering the angle) finish, causing the pellet to spawn towards the end of the angles. And then the loop exits before spawning the final
Can anyone explain why this happens and possibly elaberate on the limitations of spawning actors inside loops like this? Is there any way to cause them to all still spawn with collisions?
just updating in case anyone comes across this needing help, or about to waste time answering.
I made the projectiles have simple collisions.
The 1x1x1 cube I was using isnt the basic one. It's one in the engine files, it's name includes xyzpiviot or something. When I tried more complex objects without Primatives they would spawn. I GOT COMPLEX too. I was Spawning 40 trees at a time with full materials, lighting and shadows.
playing around I found anything without primatives would spawn just fine, while it seemed that anything i tried (think they were all imported from blender) what had convex primatives would only spawn up to 4.
I copied the little cube that had almost nothing to it and moved it into a different file, renamed it. At the top i choose collisions and "simple box". figured it would be the easiest to calculate.
Works great. Generates hit events, bounces (I might attempt to use sphere as the bounces are admittedly very strange in behavior at this time)
My theory on this is: Using such things as a quadproccesor there can be data being added/calculated etc in the different cores.
Attempting to calculate a primative for a really small UV Sphere with all that it entails might just take a fraction of a fraction of a second, but if one of the other cores has now processed the loop iterations.....the actor spawns in the wrong place. Then when it checks the loop again it's already completed.
if anyone knows anything about this i would love more detail. And if there is a way to solve it as it was, such as setting a processing order
answered Jun 06 '18 at 07:38 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here