Help with Particle Emitter rotation

Hello everyone,

I’m new to this forum and new to Phaser, I have some experience with Unity and I’m now using Phaser 3.

How can I set a specific rotation to the emitted Particle without speed ?
I’ve tried setting the emitter’s rotation or even trying to set to Particle rotation in a callback of onParticleEmit.

Basically what I’m trying to achieve is a dashed line along a path of a Gameobject, so I’m attaching an event emitter that emits the dash sprite, and everything works after some trials and failures expect for the rotation.

Thanks

1 Like

Finally found the solution, so I’m posting it for anyone interested.

the rotate property of ParticleEmitter can be a callback and it’s demonstrated in this lab snippet.

3 Likes

Seems broken again with the latest Phaser

edit, this works:
rotate: {
onEmit: (particle) => {
return 0
},
onUpdate: (particle) => {
return particle.angle + 1
},
},

3 Likes