Jump to content

How to make particles not obey physics


ctmartinez1992
 Share

Recommended Posts

Hi, i have this code that i straight up copied from the the phaser examples:

        //Rain        this.emitter = game.add.emitter(400, 0, 400);        this.emitter.width = this.game.width;        this.emitter.makeParticles('rain');        this.emitter.minParticleScale = 0.1;        this.emitter.maxParticleScale = 0.5;        this.emitter.setYSpeed(300, 500);        this.emitter.setXSpeed(-5, 5);        this.emitter.minRotation = 0;        this.emitter.maxRotation = 0;        this.emitter.start(false, 1600, 5, 0);                //Arcade physics        this.game.physics.arcade.gravity.y = GRAVITY;

Basically, it's just simulating rain. However, it seems that the arcade gravity is also applied to the emitter because if i comment the gravity line, the rain works fine. I can't seem to find a way to apply a custom gravity to rain.

Is there any solution?

 

Thanks in advance.

Link to comment
Share on other sites

You would think so, but changing that property does nothing. I tried put it before starting the emitter, after starting the emitter, on the update, nothing works. I can't find anything relevant on the source code and looking at my code. This is the only time i use gravity parameters and as soon as i comment the arcade gravity line, it works just fine.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...