Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phaser v3.23.0 issue when adding ParticleEmitterManager (with multiple emitters) to Container #5195

Closed
condeagustin opened this issue Jun 17, 2020 · 1 comment

Comments

@condeagustin
Copy link

condeagustin commented Jun 17, 2020

Hi. I want to report the following issue:

  1. Create a Phaser.GameObjects.Particles.ParticleEmitterManager in position x=0, y=0
  2. Create a Phaser.GameObjects.Container in position x=100, y=0
  3. Add the particle manager from step 1 in the container of step 2
  4. 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

photonstorm added a commit that referenced this issue Sep 23, 2020
…x differently, splitting out the parent matrix and factoring in follow offsets separately. This fixes numerous issues with particle emitters being incorrectly offset when added to Containers. Fix #5319 #5195 #4739 #4691
@photonstorm
Copy link
Collaborator

Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants