MegaFlow SmokeGun

MegaFlow Objects
The smoke gun component is an simple example script. It simply spawns set objects into the scene but if those objects have a MegaFlow component attached then they will interact with the selected MegaFlow source and be moved around the scene. This is a simple way to test a flow source with set objects. The physics values for this component will be applied to each object spawned into the scene so you can quickly adjust the settings and see the result. You can select multiple objects to be spawned and those objects could have either the MegaFlow RBody component attached or the MegaFlow Effect component. If you select an object which does not have either of those components attached then the object will just be spawned into the scene and not move.

This script also allows the emitter object to be controlled by a mouse, when the scene is run holding down the left mouse button and moving the mouse will move the emitter, you can adjust the mouse sensitivity by changing the x and y speed values in the inspector.

MegaFlow SmokeGun

MegaFlow Smoke Gun Params

The following params control the behaviour of the object spawning and the movement of those objects through the flow.

Source

The MegaFlow source to use to control the flow of the spawned objects.

Framenum

If the flow source has multiple frames for fluid data then you can select the frame to use here. Changing this value at runtime will only effect newly spawned objects, existing objects will continue to use the frame they were spawned with until their life runs out.

Flow rate

The time gap between spawning objects, the lower the value the faster objects will be spawned.

Count

How many object will be spawned each time.

Vel

The starting velocity of the new objects.

Scale

A multiplier for the effective force of the flow field on the objects.

Mass

The mass of each object spawned. The lower this value the more effect the flow field will have on the movement of the object.

Area

The area value for the objects spawned, the larger this value the greater the influence of the flow field on the objects movement.

Gravity

Gravity value to use in the physics.

Lifetime

The life span of the object in the scene, the higher this value the longer the objects will exist in the flow.

Width

The width of the emitter. Objects are spawned randomly within the limits of the width and height values.

Height

The height of the emitter. Objects are spawned randomly within the limits of the width and height values.

Pool Size

The starting pool size for objects to use by this component.

X Speed

The sensitivity of the mouse movement in the x direction.

Y Speed

The sensitivity of the mouse movement in the y direction.

Add Object

Click this button to add a new object to the spawn list.

Object

Selects the object to be spawned. This object should have either a MegaFlow Effect or MegaFlow RBody component attached to it. Click the D button to remove an object from the list.

MegaFlow Smoke Gun Video

Video showing the Smoke Gun system spawning cube objects into the scene.
ytfumefx1