scale parameter?

The preset = “burn” effect is really cool but I need fire in other size. 

I tried to use: scale = 0.5 or scale = 2 or even 0.9 but effect changes totally. Why?

How to scale “burn” effect correctly?

This is fixed in the next version, which isn’t out yet. If you want to fix it yourself, it’s a quick fix:

  1. Find the line that sets the vent’s physics gravity:

[lua]

vent.pPhysics.setGravity(vent.gravX, vent.gravY)

[/lua]

  1. Change it to:

[lua]

vent.pPhysics.setGravity(vent.gravX * vent.scale, vent.gravY * vent.scale)

[/lua]

  1. Find the line that set’s each particle’s damping:

[lua]

vent.particle[e]._particlephysics.xDamping = getValue(vent.xDamping) * vent.scale

vent.particle[e]._particlephysics.yDamping = getValue(vent.yDamping) * vent.scale

[/lua]

  1. Change it to:

[lua]

vent.particle[e]._particlephysics.xDamping = getValue(vent.xDamping)

vent.particle[e]._particlephysics.yDamping = getValue(vent.yDamping)

[/lua]

  1. Add this in below the damping lines:

[lua]

if not vent.pPhysics.useDivisionDamping then

  vent.particle[e]._particlephysics.xDamping = vent.particle[e]._particlephysics.xDamping * vent.scaleX

  vent.particle[e]._particlephysics.yDamping = vent.particle[e]._particlephysics.yDamping * vent.scaleY

end

[/lua]

Coming up in the next version (that has to do with scale): X/Y independent scaling - “scaleX” and “scaleY”. They work exactly like linearDamping vs. xDamping vs. yDamping - you can just set “scale” and it’ll set both of them, but if you also set scaleX, scaleX’ll be set to what you specified, while scaleY will be set to your “scale” parameter.

  • Caleb

Thank you! It works great :slight_smile:

But if you prepare a next version you should test it for “smoke” too.  If scale <> 1 there is a problem with vent’s position defined by positionType = “alongLine”.

This is fixed in the next version, which isn’t out yet. If you want to fix it yourself, it’s a quick fix:

  1. Find the line that sets the vent’s physics gravity:

[lua]

vent.pPhysics.setGravity(vent.gravX, vent.gravY)

[/lua]

  1. Change it to:

[lua]

vent.pPhysics.setGravity(vent.gravX * vent.scale, vent.gravY * vent.scale)

[/lua]

  1. Find the line that set’s each particle’s damping:

[lua]

vent.particle[e]._particlephysics.xDamping = getValue(vent.xDamping) * vent.scale

vent.particle[e]._particlephysics.yDamping = getValue(vent.yDamping) * vent.scale

[/lua]

  1. Change it to:

[lua]

vent.particle[e]._particlephysics.xDamping = getValue(vent.xDamping)

vent.particle[e]._particlephysics.yDamping = getValue(vent.yDamping)

[/lua]

  1. Add this in below the damping lines:

[lua]

if not vent.pPhysics.useDivisionDamping then

  vent.particle[e]._particlephysics.xDamping = vent.particle[e]._particlephysics.xDamping * vent.scaleX

  vent.particle[e]._particlephysics.yDamping = vent.particle[e]._particlephysics.yDamping * vent.scaleY

end

[/lua]

Coming up in the next version (that has to do with scale): X/Y independent scaling - “scaleX” and “scaleY”. They work exactly like linearDamping vs. xDamping vs. yDamping - you can just set “scale” and it’ll set both of them, but if you also set scaleX, scaleX’ll be set to what you specified, while scaleY will be set to your “scale” parameter.

  • Caleb

Thank you! It works great :slight_smile:

But if you prepare a next version you should test it for “smoke” too.  If scale <> 1 there is a problem with vent’s position defined by positionType = “alongLine”.