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
letparticles=this.add.particles(300,300,"flares",{lifespan: 1500,alpha: {start: 0,end: 1},scale: 0.2,quantity: 20,emitting: false,})// emit zone position is in local emitter space (as expected)letemitZone=newPhaser.Geom.Circle(0,0,200)particles.addEmitZone({source: emitZone,type: "random",quantity: -1,})// deathZone position is in global spaceletdeathZone=newPhaser.Geom.Circle(0,0,100)// you need to manually calculate the offset to put it in the right place// let deathZone = new Phaser.Geom.Circle(particles.x, particles.y, 100)particles.addDeathZone({source: deathZone,type: "onEnter",})particles.start(1500)
The text was updated successfully, but these errors were encountered:
I am having this issue as well. Clearly coordinates should be in emitter-space or this does not work using existing geometries. I am trying to get this to work by passing the center point but this is clearly an unacceptable hack.
The death zones collisions have been corrected to check local coordinates instead of global coordinates to ensure it aligns with the local emitter space.
Version
Phaser 3.60 beta 18
Description
Emitter death zones are positioned in global space which is unexpected.
Was it an intentional change? It is quite confusing IMO because of the 2 reasons:
Example Test Code
https://codesandbox.io/s/particles-death-zone-qpmvhn
The text was updated successfully, but these errors were encountered: