Generate burst by script? Is this the normal behaviour in Burst mode? - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Fluid (https://obi.virtualmethodstudio.com/forum/forum-3.html) +--- Thread: Generate burst by script? Is this the normal behaviour in Burst mode? (/thread-2268.html) |
Generate burst by script? Is this the normal behaviour in Burst mode? - emz06 - 27-05-2020 Hi, I've tried out settings in Burst mode to simulate shampoo coming out of the bottle. But it seems I can use the emitter's speed the same way as with Stream. -How can I generate a burst via script, without waiting for current particles to disappear? I tried ObiEmitter.EmitParticle, but it only emits one particle. I'd like to emit the entire capacity of one Burst. I want to be able to generate many bursts in a row from script, and have the fluid accumulate underneath. Also, even when I set emitter's speed to 0, particles are still flowing, and are generated every "lifespan" seconds. Is this the normal behaviour in Burst mode? Thanks RE: Generate burst by script? Is this the normal behaviour in Burst mode? - josemendez - 27-05-2020 Hi there, The emitter speed is used in both modes, as it defines the speed of the particles being emitted. To emit a single burst by code, you can call EmitParticle() as many times as distribution points there are in your shape: Quote:int emissionPoints = GetDistributionPointsCount(); unsurprisingly, this is exactly the same that Burst emission does internally (BeginStep() method of ObiEmitter.cs). The only difference is that Burst mode waits until the amount of active particles is 0 (all particles are dead) before emitting again. So, the behavior you describe is the intended one: burst, wait for all particles to die, then burst again. |