Kenney will be releasing a particle fx pack tomorrow. There seems to be some really nice looking stuff in there.
The pack will contain ready to use particle fx for Unity. I’d like to challenge the Defold community to try and replicate them using Defold, preferably in a way that could be easily shared, and who knows, maybe we can get Kenney himself to include them in the pack?
Think I found a bug while trying to make a certain effect? If .particlefx files are parented to a GO they inherit initial rotation set in the editor of the chain of parents they are associated with. But once in engine they no longer get extra rotation applied, this is evident if a sprite is also added and rotation is done around z. Or did I do something wrong?
Are euler.z runtime rotations not applied to particlefx components?
Ah, the problem is that individual particles inherit the current rotation but do not get the rotation applied to them over their lifetimes. So some effects are impossible without using raw GOs.
Another issue is that modifiers appear to operate in non-rotated space only so no matter how a GO is rotated the modifier of a .particlefx will always work as if there was no parent rotation and mess up effects.
There’s a rendering technique called “blend-add” which would be useful to get working in Defold to keep the screen from getting blown out from too many simple add effects.
Once Defold gets better multi texture support, some of the other techniques mentioned in the video will be possible too.
The default value is world space meaning that when a particle spawns it will get its transform from the parent GO but will live out the rest of its life in world space.
Setting emitter space will transform spawned particles according to the emitter transform (which in turn is dictated by the owning parent GO transform).
The editor uses the same code as the runtime for particle simulation (through a lib) so there shouldn’t be any difference there. One thing that can differ is of course the setup of the collection and the game object that owns the particlefx in runtime.
Does the owning gameobject for example rotate or have a uniform scale applied?
Hmm yes I even get the same behaviour when playing the particlefx from inside the collection in the editor (select the particlefx in the outline and hit space). It seems to be related to the scale on the parent GO. Setting the scale to (1, 1, 1) instead of (30, 30, 30) and zooming in gives the same visual result as the playback in the particlefx editor.
I think the scale should only affect the rendering and not in any way mess with the simulation. Might be we have a bug!
EDIT it looks like the GO scale gets applied to modifier magnitudes, the vortex in this case. Added ticket DEF-3355.
Would a “Life Modifier” property be possible? So make a curve to define how much any associated modifiers modify particles over the particle’s lifetime.