[Particle] Rotate particle system's emitter

I want rotate this particle system’s circle.

It is not camera rotating.

Target of ‘.minInitialRotation’ is per particle.
I want system or emitter’s rotating.

Thank you and Please! :pray:

https://www.babylonjs-playground.com/#MRRGXL#24

You can simply set the emitter to a TransformNode and then rotate it:

https://www.babylonjs-playground.com/#MRRGXL#25

1 Like

Sorry. linked PG was wrong(#24). New example is #26.
https://www.babylonjs-playground.com/#MRRGXL#26

And referenced your code. I saw ‘Red line’.
(Type ‘TransformNode’ is not assignable to type ‘Nullable<Vector3 | AbstractMesh>’.)
But Mission cleared.

Thank you! :+1:

@Deltakosh Does this code still work?

I have a particle system with createCylinderEmitter and I wish to rotate it to another orientation. This code breaks when I attempt to apply an x rotation to a cylinder emitter (the x property is missing). I haven’t found any information on rotating a cylinder emitter.

Do you mind sharing a repro in the Playground?

I managed to solve it! But I made a quick example to show my solution: https://playground.babylonjs.com/#0K3AQ2#2335

My confusion arose from the function createCylinderEmitter(). I kept thinking that what it returned could be put in the “emitter” property, or that it replaced that property somehow, because of the “emitter” name in the function. By seeing that the emitter component takes only either a Vector3 or an AbstractMesh, I just made a separate mesh using meshbuilder, then had that be the emitter property. By doing that, I was able to rotate the cylinder mesh and the particles updated accordingly.

I was hoping I’d be able to use something like TransformNode as the emitter, instead of relying on an empty mesh. Is there something inherent to the “emitter” property that would make allowing the usage of TransformNode problematic?

Actually I wonder if this would not work directly with a transformnode, I see no reason why it would not