{"id":5902,"date":"2014-10-27T18:44:12","date_gmt":"2014-10-27T18:44:12","guid":{"rendered":"http:\/\/www.west-racing.com\/mf\/?page_id=5902"},"modified":"2014-11-04T10:04:25","modified_gmt":"2014-11-04T10:04:25","slug":"megaflow-smokegun","status":"publish","type":"page","link":"http:\/\/www.west-racing.com\/mf\/?page_id=5902","title":{"rendered":"MegaFlow SmokeGun"},"content":{"rendered":"<p><a href=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2014\/10\/megaflowobj.jpg\"><img loading=\"lazy\" src=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2014\/10\/megaflowobj-1024x470.jpg\" alt=\"MegaFlow Objects\" width=\"640\" height=\"293\" class=\"aligncenter size-large wp-image-5965 fancy\" srcset=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2014\/10\/megaflowobj-1024x470.jpg 1024w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2014\/10\/megaflowobj-300x137.jpg 300w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2014\/10\/megaflowobj-680x312.jpg 680w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2014\/10\/megaflowobj.jpg 1391w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><br \/>\nThe 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.<\/p>\n<p>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.<\/p>\n<p><a href=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2014\/10\/megaflowsmokegun.jpg\"><img loading=\"lazy\" src=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2014\/10\/megaflowsmokegun.jpg\" alt=\"MegaFlow SmokeGun\" width=\"258\" height=\"383\" class=\"alignright size-full wp-image-5977 fancy\" srcset=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2014\/10\/megaflowsmokegun.jpg 258w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2014\/10\/megaflowsmokegun-202x300.jpg 202w\" sizes=\"(max-width: 258px) 100vw, 258px\" \/><\/a><\/p>\n<h3>MegaFlow Smoke Gun Params<\/h3>\n<p>The following params control the behaviour of the object spawning and the movement of those objects through the flow.<\/p>\n<h4><strong>Source<\/strong><\/h4>\n<p>The MegaFlow source to use to control the flow of the spawned objects.<\/p>\n<h4><strong>Framenum<\/strong><\/h4>\n<p>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.<\/p>\n<h4><strong>Flow rate<\/strong><\/h4>\n<p>The time gap between spawning objects, the lower the value the faster objects will be spawned.<\/p>\n<h4><strong>Count<\/strong><\/h4>\n<p>How many object will be spawned each time.<\/p>\n<h4><strong>Vel<\/strong><\/h4>\n<p>The starting velocity of the new objects.<\/p>\n<h4><strong>Scale<\/strong><\/h4>\n<p>A multiplier for the effective force of the flow field on the objects.<\/p>\n<h4><strong>Mass<\/strong><\/h4>\n<p>The mass of each object spawned. The lower this value the more effect the flow field will have on the movement of the object.<\/p>\n<h4><strong>Area<\/strong><\/h4>\n<p>The area value for the objects spawned, the larger this value the greater the influence of the flow field on the objects movement.<\/p>\n<h4><strong>Gravity<\/strong><\/h4>\n<p>Gravity value to use in the physics.<\/p>\n<h4><strong>Lifetime<\/strong><\/h4>\n<p>The life span of the object in the scene, the higher this value the longer the objects will exist in the flow.<\/p>\n<h4><strong>Width<\/strong><\/h4>\n<p>The width of the emitter. Objects are spawned randomly within the limits of the width and height values.<\/p>\n<h4><strong>Height<\/strong><\/h4>\n<p>The height of the emitter. Objects are spawned randomly within the limits of the width and height values.<\/p>\n<h4><strong>Pool Size<\/strong><\/h4>\n<p>The starting pool size for objects to use by this component.<\/p>\n<h4><strong>X Speed<\/strong><\/h4>\n<p>The sensitivity of the mouse movement in the x direction.<\/p>\n<h4><strong>Y Speed<\/strong><\/h4>\n<p>The sensitivity of the mouse movement in the y direction.<\/p>\n<h4><strong>Add Object<\/strong><\/h4>\n<p>Click this button to add a new object to the spawn list.<\/p>\n<h4><strong>Object<\/strong><\/h4>\n<p>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.<\/p>\n<h3>MegaFlow Smoke Gun Video<\/h3>\n<p>Video showing the Smoke Gun system spawning cube objects into the scene.<br \/>\n<a class=\"fancybox-youtube\" href=\"http:\/\/www.youtube.com\/watch?v=11xAqLnSgy4&amp;hd=1&amp;fs=1&amp;autoplay=1\"><img loading=\"lazy\" src=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2014\/10\/ytfumefx1.jpg\" alt=\"ytfumefx1\" width=\"680\" height=\"406\" class=\"aligncenter size-full wp-image-6044 fancy\" srcset=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2014\/10\/ytfumefx1.jpg 680w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2014\/10\/ytfumefx1-300x179.jpg 300w\" sizes=\"(max-width: 680px) 100vw, 680px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":5892,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/5902"}],"collection":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5902"}],"version-history":[{"count":7,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/5902\/revisions"}],"predecessor-version":[{"id":6047,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/5902\/revisions\/6047"}],"up":[{"embeddable":true,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/5892"}],"wp:attachment":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5902"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}