How to pass a position array from blueprint to niagara system, and generate particles at given position?
The idea is simple, pass a position array from blueprint to niagara system, and use them to set position to particles.
I can read the array length at Emitter Spawn stage and use it to set the spawn rate.
Problem is in particle spawn stage, get position from the position array always returns zero.
Here is what I did.
- Define a position array as user exposed variable.
- Set it’s value in level blueprint.
- Define a position array at system attribute, bind it’s value to user exposed var at System Spawn stage.
- Define a int var named “SpawnRate” at emitter attribute, and set it’s value by the length of “positions” defined in system attribute.
- Bind SpawnRate to Spawn Burst Instantaneous’s Spawn Count.
- Set “Require Persistent ID” to true for the emitter.
- In particle spawn stage, use particle ID as index to get position from position array, and set it to particles position.
What did I do wrong here?
I’m stocked for few days, any hint?
Or is there any tutorial available about passing an array from blueprint to niagara system?