Hello Everyone!
I am a bit new to Unreal, and I wanted to create a scene with a large number of potential NPCs, with their own meshes, and arbitrary movement data. In my research I found that one could use the Niagara Data Channel, there each write (or particle) would have its own behavior (Like its movement, its own mesh, its own position, and they can change arbitrarily and individually), and in this way you could have thousands of independent NPCs without much performance hit.
Now I ran into a problem here, I’d like to batch spawn “particles” because in some cases NPCs might spawn on the same frame, or NPCs might shoot things, and some of those guns might shoot particles that would spawn at the same time, there’s all sorts of things that a batch spawning system would be a lot more ideal.
However when I run the batch spawn node, it doesn’t seem like you have any way of indexing through each write and configuring them properly. It seems like they all get configured based on the first write [variable] type node, and spawn in the position of the “first” write.
In the below instance, is my logic for spawning particles from the default Pawn BP.
The NDC write handler is implemented exactly the same as it is in the NDC Tutorial
And here below is an example of what it looks like on play, (im using a low polly brown rock as the example mesh of the particle)
And this is where the log messages I’m printing from the BP, which is the exact same thing I’m passing to the write nodes, show the values are indeed 500 apart on the y axis for position. But the position all these particles are at is only represented by the first log message (-830, 0 , -200).
It could be very will the case I just completely misunderstood what the “Batch” node is actually meant for, and that I’m not really “indexing” into anything on the write nodes. But I’m at a loss and there doesn’t seem to be a way to debug the NDC in a way that would help me.
If anyone has a solution, or even better, how does one properly debug this kind of thing, that would be awesome!
Thank you everyone.