{"id":380,"date":"2009-08-15T05:33:58","date_gmt":"2009-08-15T12:33:58","guid":{"rendered":"https:\/\/actionsnippet.com\/?p=2004"},"modified":"2009-08-15T05:33:58","modified_gmt":"2009-08-15T12:33:58","slug":"quickbox2d-prismatic-joint-2","status":"publish","type":"post","link":"https:\/\/actionsnippet.com\/?p=380","title":{"rendered":"QuickBox2D Prismatic Joint"},"content":{"rendered":"<pre class=\"brush: as3; title: ; notranslate\" title=\"\">\r\nimport com.actionsnippet.qbox.*;\r\nimport Box2D.Common.Math.*;\r\n\r\n&#x5B;SWF (backgroundColor=0x000000, width=700, height=600, frameRate=60)]\r\n\r\nvar sim:QuickBox2D = new QuickBox2D(this);\r\n\r\nsim.setDefault({fillColor:0xCCCCCC, lineColor:0x3355AA});\r\n\r\nsim.createStageWalls();\r\n\r\nvar box:QuickObject = sim.addBox({x:10, y:10, density:0});\r\nvar circle:QuickObject = sim.addCircle({x:10, y:13});\r\n\r\nsim.addJoint({type:&quot;prismatic&quot;, a:box.body, b:circle.body, axis:new b2Vec2(1, 0), upperTranslation:3, lowerTranslation:-3, enableLimit:true, motorSpeed:10, maxMotorForce:10, enableMotor:true});\r\n\r\nsim.start();\r\nsim.mouseDrag();\r\n<\/pre>\n<p>Simple prismatic joint demo. Prismatic joints are odd, it took me awhile to realize how to use them and what they can be used for&#8230; Plan on using them in the creation of some Box2D machines in the near futrure&#8230;<br \/>\n<a data-asruffle-linked=\"true\" href=\"http:\/\/www.actionsnippet.com\/swfs\/prismatic.html\" target=\"blank\" ><br \/>\nCheck out the swf<\/a> <span class=\"asruffle-link\" data-swf=\"{&quot;url&quot;:&quot;https:\\\/\\\/actionsnippet.com\\\/swfs\\\/demoPrismatic.swf&quot;,&quot;title&quot;:&quot;demoPrismatic&quot;,&quot;width&quot;:700,&quot;height&quot;:600,&quot;missing&quot;:false,&quot;allowScriptAccess&quot;:false,&quot;backgroundColor&quot;:&quot;#000000&quot;}\"><button type=\"button\" hidden aria-expanded=\"false\">Play demo<span class=\"screen-reader-text\">: demoPrismatic<\/span><\/button><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>import com.actionsnippet.qbox.*; import Box2D.Common.Math.*; &#x5B;SWF (backgroundColor=0x000000, width=700, height=600, frameRate=60)] var sim:QuickBox2D = new QuickBox2D(this); sim.setDefault({fillColor:0xCCCCCC, lineColor:0x3355AA}); sim.createStageWalls(); var box:QuickObject = sim.addBox({x:10, y:10, density:0}); var circle:QuickObject = sim.addCircle({x:10, y:13}); sim.addJoint({type:&quot;prismatic&quot;, a:box.body, b:circle.body, axis:new b2Vec2(1, 0), upperTranslation:3, lowerTranslation:-3, enableLimit:true, motorSpeed:10, maxMotorForce:10, enableMotor:true}); sim.start(); sim.mouseDrag(); Simple prismatic joint demo. Prismatic joints are odd, it took me awhile to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,13,12],"tags":[3,14,15,4,16],"class_list":["post-380","post","type-post","status-publish","format-standard","hentry","category-box2d","category-motion","category-quickbox2d","tag-actionscript","tag-as3","tag-box2d","tag-flash","tag-quickbox2d"],"_links":{"self":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts\/380","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=380"}],"version-history":[{"count":0,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts\/380\/revisions"}],"wp:attachment":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=380"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=380"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}