misfit Posted March 2, 2017 Report Share Posted March 2, 2017 Hello, I have been using phaser 2.6.2 and this emitter worked fine: var emitter = this.game.add.emitter(hitMeteor.body.x+hitMeteor.body.width/2, hitMeteor.body.y+hitMeteor.body.height/2, 6); emitter.makeParticles('meteorPiece'); emitter.minParticleSpeed.setTo(hitMeteor.body.width/2,-hitMeteor.body.height/2); emitter.maxParticleSpeed.setTo(70,hitMeteor.body.height/2); emitter.gravity = 0; emitter.start(true,1000,null,100); Today I have copied a new version (phaser 2.7.3) and the particles just stay in place rotating like their speed was equal to 0. In the docs I did not find any of those functions deleted so I am not sure what is wrong here. Thanks for all the help! *** OK. Deleting emitter.gravity = 0; helped. Quote Link to comment Share on other sites More sharing options...
samme Posted March 2, 2017 Report Share Posted March 2, 2017 Emitter#gravity changed to a Point in 2.7.3. Unfortunately not backwards-compatible. :/ Mario and Larzan 2 Quote Link to comment Share on other sites More sharing options...
stupot Posted March 3, 2017 Report Share Posted March 3, 2017 You'll have to do something like this. It'll works with 2.7.3 and before. if (typeof winEmitter.gravity == "number" )) { winEmitter.gravity = 200; } else { winEmitter.gravity.set(0, 200); } Befive.Info and Mario 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.