engine icon indicating copy to clipboard operation
engine copied to clipboard

Particle Emitter Circle Shape

Open sakidev opened this issue 5 years ago • 0 comments

Hi guys, here I come with a new feature request por the particle emitter.

It's basically a Circle Shape, which means Y axis is capped to 0, particles would spawn on the x&z axis but not on the vertical one. This can be sorta done by using a box/shape shape with the emitter extents/radius set to 0 and just increment the particles velocity on x&z, but when you need to use the emitterRadiusInner to make particles spawn away from the center, they are allowed to spawn along the vertical axis as well, so if you want to prevent them from doing so, it's not possible.

This would be useful to create many effects that need to show up at "ground" level, imagine an explosion shockwave, or a rocket before it takes off, etc.

I've tweaked around with the engine code but I've got stuck as even though i've been capable of restricting the vertical position & velocity with a new circle shape, for some reason the particle emitter gets rotated when the camera changes orientation, something to do with the matrices.

Here's a modified snow particle example showcasing the thing: http://sakigames.com/playcanvas/examples/graphics/particles-snow-circle.html

sakidev avatar Jul 11 '20 04:07 sakidev