Question by
richardzzzarnold · Dec 01, 2016 at 01:50 PM ·
particlesystememissionrate
ParticleSystem emission rate is incomprehensible.
I really don't get this new method of controlling particle emission rate. I have just spent 3+ hours looking at dozens of page describing variations of ways of controlling particle emission rate. And yet....I am still no closer to getting it to work.
All i want to do is adjust ONE variable over gameplay . The emission rate. And yet this is proving to be almost impossible to achieve. How can something so basic and vital to gameplay be turned into something so horrendous to use?.
currently using Unity 5.3.5f1
current code:
var SmokeParticles : ParticleSystem;
var em : ParticleSystem.EmissionModule;
var emitRate : float;
function Start(){
em=SmokeParticles.emission;
em.rate.mode = ParticleSystemCurveMode.Constant;
}
function FixedUpdate () {
var rate = SmokeParticles.emission.rate;
rate.mode = ParticleSystemCurveMode.Constant;
rate.constantMin = emitRate;
rate.constantMax = emitRate;
em.rate = rate;
}
Comment