I have a particle system that emits meshes (i.e. the ‘mesh data’ module) and have it setup satisfactorily, but I’d like to change the mesh used at run-time depending on certain game conditions.
Most properties in Cascade have some option or the other for parameters so I can simply call ‘set parameter by type’ in Blueprints however I don’t see any option to parametrize the mesh used in any way. Is this possible at all?
I have a couple of workarounds in mind (multiple mesh data emitters whose individual rates/lifespans are parametrized to turn them on/off at will) or duplicate particle systems setup identically except for the mesh used. Obviously these solutions are not scalable at all. I just need to switch between two meshes for now but eventually this number will increase to as many as six or seven so I’m eager to build it right the first time.
I think I managed to find a reasonable workaround:
I took the first mesh emitter in Cascade, hit right-click, Emitter -> ‘Duplicate and Share Emitter’. At this point you can override only the ‘Mesh Data’ module and select your custom mesh. The final trick is to override the spawn rate for each emitter and parametrize the spawn rate (or spawn rate scale) to a unique parameter for each emitter that you can control from Blueprints. So to simulate changing the mesh you’ll have to set the spawn rate to zero in one and set the other to a non-zero value.
WRT performance this workaround is contingent on the assumption that emitters with zero spawn rate do not cost anything - My game needs a large number of these emitters (~100) scattered across a small map so I’m running with the hope that this is true!
7 months later how is this working? I’m also looking for a way to parameterize the mesh.