{"id":4640,"date":"2013-12-05T16:32:47","date_gmt":"2013-12-05T16:32:47","guid":{"rendered":"http:\/\/www.west-racing.com\/mf\/?page_id=4640"},"modified":"2014-04-08T22:35:32","modified_gmt":"2014-04-08T22:35:32","slug":"megawires-attach","status":"publish","type":"page","link":"http:\/\/www.west-racing.com\/mf\/?page_id=4640","title":{"rendered":"MegaWires Attach"},"content":{"rendered":"<p><a href=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2013\/12\/attachcrow1.jpg\"><img loading=\"lazy\" src=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2013\/12\/attachcrow1-1024x367.jpg\" alt=\"Attached Bird\" width=\"640\" height=\"229\" class=\"aligncenter size-large wp-image-4663 fancy\" srcset=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2013\/12\/attachcrow1-1024x367.jpg 1024w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2013\/12\/attachcrow1-300x107.jpg 300w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2013\/12\/attachcrow1-680x244.jpg 680w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2013\/12\/attachcrow1.jpg 1323w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><br \/>\nThe Attach component allows you to attach objects to any wire in your scene, useful for adding say birds to your dynamic wires.<\/p>\n<p>To use just add the MegaWireAttach component to the object you want to hang on a wire and then select the wire object in the scene. The Alpha value will control the position along the wire.<\/p>\n<p><a href=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2013\/12\/megawireattach.jpg\"><img loading=\"lazy\" src=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2013\/12\/megawireattach.jpg\" alt=\"Attach Params\" width=\"260\" height=\"175\" class=\"alignright size-full wp-image-4664 fancy\" \/><\/a><\/p>\n<h3>Attach Params<\/h3>\n<h4><strong>Wire<\/strong><\/h4>\n<p>The MegaWire object in the scene you want to hang this object on.<\/p>\n<h4><strong>Alpha<\/strong><\/h4>\n<p>How far along the length of the wire object you want to hang your object, 0 is the very start, 1 the very end.<\/p>\n<h4><strong>Strand<\/strong><\/h4>\n<p>If your selected wire object has multiple strands you can choose the right strand by changing this value.<\/p>\n<h4><strong>Offset<\/strong><\/h4>\n<p>An offset value to use to help position your object correctly.<\/p>\n<h4><strong>Align<\/strong><\/h4>\n<p>Ask the system to align the object along the wire, if your wire sags a lot then you may want to turn this on.<\/p>\n<h4><strong>Rotate<\/strong><\/h4>\n<p>An extra rotation value to help you orientate your object as you need it.<\/p>\n<h3>Attach Video<\/h3>\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=q29KGRQOhw0&#038;hd=1&#038;autoplay=1\" class=\"fancybox-youtube\"><img loading=\"lazy\" src=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2013\/12\/ythanger.jpg\" alt=\"Interaction &amp; Hanging Objects\" width=\"680\" height=\"406\" class=\"aligncenter size-full wp-image-4758 fancy\" srcset=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2013\/12\/ythanger.jpg 680w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2013\/12\/ythanger-300x179.jpg 300w\" sizes=\"(max-width: 680px) 100vw, 680px\" \/><\/a><\/p>\n<h3>Attach Class<\/h3>\n<p>Below are the public members of the MegaWireAttach class that you can control from script or via the Unity Animation system etc.<br \/>\n[cc lang=&#8221;c#&#8221;]public class MegaWireAttach : MonoBehaviour<br \/>\n{<br \/>\n\tpublic MegaWire\twire;<br \/>\n\tpublic float\talpha;<br \/>\n\tpublic int\t\tstrand;<br \/>\n\tpublic float\toffset;<br \/>\n\tpublic bool\t\talign;<br \/>\n\tpublic Vector3\trotate;<br \/>\n}[\/cc]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Attach component allows you to attach objects to any wire in your scene, useful for adding say birds to your dynamic wires. To use just add the MegaWireAttach component [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":4638,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":[],"_links":{"self":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/4640"}],"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=4640"}],"version-history":[{"count":3,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/4640\/revisions"}],"predecessor-version":[{"id":5325,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/4640\/revisions\/5325"}],"up":[{"embeddable":true,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/4638"}],"wp:attachment":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4640"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}