Let the particles to shoot at the camera straightly

I want to let the particles to shoot at the camera straightly.
Can the particles rotate around the z axis ?

Adding @PatrickRyan the master of particles.

@heyefeng229, from what I understand of your question, you want the particles to rotate so that the long dimension of the particle in your example points along the path of emission. By default, the orientation of particles in Babylon.js when billboard is turned off is perpendicular to the direction of emission:

This means that any scale you do to X or Y, or any rotation on the particle is done on the same axis that the particle moves. What you are asking for is a worldRotationOffset so that the particle can be rotated to not align with the axis of emission. Unfortunately, we don’t have that as a feature for particle systems right now. We do have the ability to set a worldOffset on the particle to make the particles emit at a specific offset from the origin. This is helpful in aligning particles to emit from one edge like we see below:


However, I’m not sure if adding a worldRotationOffset to the particle system would be more costly than worldOffset or if there may be a perf hit that is too much for a large particle system. @sebavan, what do you think about that?


Yup I an kind of afraid of the perf impact. In this case @heyefeng229 you might be able to rely on the custom update instead ?

Hum. Sry to intervene but I find this interesting. I’d like to understand how by update you could have the particles rotate X to Z and facing the camera, knowing that the particle is a sprite? At the extreme, if the particle was really rotated to face the edge only (correct me if I’m wrong) but then you wouldn’t see anything anymore, since there is no volume. May be you could demonstrate?

Yes but I think that is what the OP wants ?