Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Update to use lifetime to visually disable/enable particle systems #52
Update to use lifetime to visually disable/enable particle systems
There is currently two ways in armory for dynamically affect particle systems (sorry if there other ways that I do not realize):
Limit the lifetime of an article object and re - spawn it
So this patch is try to introduce a third approach, instead of spawning a complete new object, it set the lifetime of each particle to be 0, so all of them will disappear immediately at that exact disable comment.
It may not be the most ideal approach (as the ideal approach will some how let all the current particles finish, and then not spawn new one). But seem to be more easier to manage then spawning a new object with new particle system every time.
Implement result can be found at here (where the brake moment used this mechanism):
For each tire object, there is an object attachment, during brake at high speed, will produce the particle and disable otherwise