Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Particle friction


Yora
 Share

Recommended Posts

Hiya, quick question.

 

I'm trying to get some deceleration on my emitter particles, and it looks like the way to do that is with Emitter.particleFriction, which I'm trying to set like this:

emitter = this.game.add.emitter(200, 200 + (i * 16), 1);            emitter.makeParticles('sadf');            emitter.minParticleSpeed.setTo(-90, -20);            emitter.maxParticleSpeed.setTo(90, -300);            emitter.particleFriction = 150;

Though this does nothing.  Just not sure if I'm doing something wrong or if this isn't working currently, thanks!

Link to comment
Share on other sites

  • 2 weeks later...

Hello! 

I tried applying friction in the following ways, but none works:



    this.emitter = this.game.add.emitter(0, 0, 50);

    this.emitter.makeParticles('soul', [0], 10, true, true);

    this.emitter.gravity = emitterGravity;

 

    this.emitter.particleFriction = 0.8; // nothing

    this.emitter.body.particleFriction = 0.8; // error

    this.emitter.cursor.body.particleFriction = 0.8; //nothing

    this.emitter.Body.particleFriction = 0.8; //nothing

 

I must be doing something wrong ...


 


Link to comment
Share on other sites

You tried declaring the emitter as a new var. I have 2 emitters in my game and each has its own var. Eg:

// declare the var

var bleeding;

// create it in create

bleeding = this.add.emitter(bla bla);

So if you try declaring the emitter like I do and then:

//in create still

bleeding.particleFriction = 0.8;

This is a total guess btw because I've not needed friction in my particles but maybe that's the way to declare it. Worth a try.

:)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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