Jump to content

Setting emitter scale to a constant, rather than a range


jflowers45
 Share

Recommended Posts

I've observed (both from trying it, and then looking in the code - the check comparing the min to max is there) that  if you try to set an emitter's scale's min to the same value as the max,  it ignores the request.

 

I can hack around this by doing something like

 

emitter.minParticleScale = 0.05;
emitter.maxParticleScale = 0.0501;
 
but that seems goofy.  Is there a 'proper' way to set the scale as a constant?  

 

Also, as an fyi, I used to do this when I created the emitter to set scale - which no longer works in 2.0.3 ... not sure if that's intended, just passing it along as a heads up.

 

emitter.forEach(function(item) {
  //this doesn't work anymore in 2.0.3
  item.scale.x=0.05;
  item.scale.y=0.05;
})
Link to comment
Share on other sites

True this comparison breaks backwards compatibility, so I've changed how it works and it'll be pushed to dev shortly, allowing you to just set minParticleScale/maxParticleScale to the same value - so long as that value isn't 1 it should work fine.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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