-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Phaser v3.23.0 issue when adding ParticleEmitterManager (with multiple emitters) to Container #5195
Description
Hi. I want to report the following issue:
- Create a Phaser.GameObjects.Particles.ParticleEmitterManager in position x=0, y=0
- Create a Phaser.GameObjects.Container in position x=100, y=0
- Add the particle manager from step 1 in the container of step 2
- Add multiple emitters (in position x=0, y=0) to the manager of step 1
The expected result is to see all the emitters in the same position relative to the manager, BUT the actual incorrect result is that all emitters (except the first one) are spaced by 100 in its X position. Unfortunately, the x and y properties of each emitter are still 0 even though they are placed in different positions along X in the screen. This issue also happens for the Y coordinate.
You can easily reproduce such issue if you edit this example (please comment the tween line to easily reproduce the issue): https://labs.phaser.io/edit.html?src=src/game%20objects/container/add%20emitter%20to%20container.js&v=3.23.0
Also, if the second emitter has more lifetime than the first emitter, if you invoke explode(count, x, y) on both of them (set them as radial=true), you will see that the second emitter starts exploding in an incorrect position but as soon as the first emitter has finished exploding (its lifetime expired), the second one warps to the correct expected position during its explosion
If the container position is 0, 0 the issue does not happen and all emitters are correctly positioned