How to combine Custom Effect and Spritesheet Animation in Particle System?

Ack, should have searched a little harder, when combining spritesheet animation and custom effects you need to add some more code (wasn’t mentioned in docs):

    let defines = [];
    ps.fillDefines(defines, ps.blendMode);
    let effect = engine.createEffectForParticles("myParticle", [], [], defines.join('\n'), null, null, null, ps);
    ps.setCustomEffect(effect);

Here is the fixed sanbox:

2 Likes