You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a particle emitter manager has a rotation set, and the camera has been moved, the particle emitter will orbit the origin (I think it's the origin anyway), as opposed to rotating in place.
Example Test Code
I quickly cobbled this together using a few examples from the labs. If the last line which changes the angle of the particles is commented out, the particles will emit from the correct position.
I pulled down the code and attempted to find a fix myself. I think there might be a systemic issue with the way a particle gets the position in the Fire (or FireAt, I forget what it is called exactly) method. By the time the ParticleManager renderers run, the emitter manager has no position, so when the matrix is built, only the rotation is used, and not the position, as the position is baked into the child's x,y.
I couldn't see a fix without divorcing the position of the systems internally, and only applying them in the render pipeline. I wasn't really sure if there was a more ideal way, so I figured it was time to just create a bug report and let someone with more domain knowledge tackle it.
I also wasn't sure if the setFollow should be removed from the emitter and to the emitter manager, or if that was just my own bias sneaking in.
Thanks for looking at this, and for making a great engine!
The text was updated successfully, but these errors were encountered:
…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
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.
Version
Description
When a particle emitter manager has a rotation set, and the camera has been moved, the particle emitter will orbit the origin (I think it's the origin anyway), as opposed to rotating in place.
Example Test Code
I quickly cobbled this together using a few examples from the labs. If the last line which changes the angle of the particles is commented out, the particles will emit from the correct position.
https://codepen.io/anon/pen/ZgvYmN
Additional Information
I pulled down the code and attempted to find a fix myself. I think there might be a systemic issue with the way a particle gets the position in the Fire (or FireAt, I forget what it is called exactly) method. By the time the ParticleManager renderers run, the emitter manager has no position, so when the matrix is built, only the rotation is used, and not the position, as the position is baked into the child's x,y.
I couldn't see a fix without divorcing the position of the systems internally, and only applying them in the render pipeline. I wasn't really sure if there was a more ideal way, so I figured it was time to just create a bug report and let someone with more domain knowledge tackle it.
I also wasn't sure if the setFollow should be removed from the emitter and to the emitter manager, or if that was just my own bias sneaking in.
Thanks for looking at this, and for making a great engine!
The text was updated successfully, but these errors were encountered: