{"id":465,"date":"2010-03-25T22:56:28","date_gmt":"2010-03-26T02:56:28","guid":{"rendered":"http:\/\/oztalay.com\/matt\/?page_id=465"},"modified":"2012-04-03T01:17:13","modified_gmt":"2012-04-03T05:17:13","slug":"kactor-physics-doors","status":"publish","type":"page","link":"http:\/\/www.oztalay.com\/matt\/tutorials\/kactor-physics-doors\/","title":{"rendered":"kActor Physics Doors &#8211; UDK"},"content":{"rendered":"<p>\/\/UPDATE: The level posted below takes place in a subtractive level. It can be pasted into an additive level, but you need to give it a CSG base first.<\/p>\n<p>Tired of animating a door to open and close in Matinee when a player touches a trigger? Wish your player could take a little more ownership over their door opening? Want no longer, here&#8217;s some instructions on making a dynamic physics door.<\/p>\n<p>Add your door asset as a RigidBodyActor<\/p>\n<p>Add a RB_HingeActor<\/p>\n<p>Select your RB_HingeActor and click the &#8220;lock&#8221; button in the top right-hand corner of the properties window<\/p>\n<p>Select your door asset<\/p>\n<p>Click the green arrow next to &#8220;Constraint Actor 1&#8221;. This tells the RB_HingeActor to constrain your door<\/p>\n<p>The picture below shows what settings go where, the settings outlined below are the same.<\/p>\n<p>When you set Swing 1LimitAngle a green hemisphere will form around the middle of the RB_HingeActor. This shows the range of motion of your asset. Since all Actors in Unreal have a direction, you may need to rotate your RB_HingeActor so its range of motion matches the desired effect.<\/p>\n<p>Your door will pivot based on where you put your RB_HingeActor. Be careful not to put it too far away or your door will look rather odd indeed.<\/p>\n<p>Source code is below the picture for the sample level.<\/p>\n<p>\/this section tells the RB_HingeActor which kActor it acts upon<br \/>\nConstraint Actor 1 = The kActor in question<\/p>\n<p>\/\/this section sets its range of motion<br \/>\nSwing 1Limit Angle = 90<br \/>\nSwing Limited = TRUE<br \/>\nTwist Limit Angle = FALSE<br \/>\nTwist Limited = TRUE<\/p>\n<p>\/\/this section prevents it from moving around<br \/>\nLinear Limit Stiffness = 100<br \/>\nLinear XSetup<br \/>\n-b Limited = TRUE<br \/>\nLinear YSetup<br \/>\n-b Limited = TRUE<br \/>\nLinear ZSetup<br \/>\n-b Limited = TRUE<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/oztalay.com\/matt\/wp-content\/uploads\/2010\/03\/physicsDoor.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-474\" title=\"physicsDoor\" src=\"http:\/\/oztalay.com\/matt\/wp-content\/uploads\/2010\/03\/physicsDoor-300x122.jpg\" alt=\"\" width=\"300\" height=\"122\" srcset=\"https:\/\/www.oztalay.com\/matt\/wp-content\/uploads\/2010\/03\/physicsDoor-300x122.jpg 300w, https:\/\/www.oztalay.com\/matt\/wp-content\/uploads\/2010\/03\/physicsDoor-1024x418.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Pop open this level in UDK for a demonstration:<\/p>\n<p><a href=\"http:\/\/www.oztalay.com\/matt\/kActorDoorDemo.udk\">kActorDoorDemo.udk<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/\/UPDATE: The level posted below takes place in a subtractive level. It can be pasted into an additive level, but you need to give it a CSG base first. Tired of animating a door to open and close in Matinee when a player touches a trigger? Wish your player could take a little more ownership [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":407,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-465","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/www.oztalay.com\/matt\/wp-json\/wp\/v2\/pages\/465","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.oztalay.com\/matt\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.oztalay.com\/matt\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.oztalay.com\/matt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.oztalay.com\/matt\/wp-json\/wp\/v2\/comments?post=465"}],"version-history":[{"count":10,"href":"http:\/\/www.oztalay.com\/matt\/wp-json\/wp\/v2\/pages\/465\/revisions"}],"predecessor-version":[{"id":472,"href":"http:\/\/www.oztalay.com\/matt\/wp-json\/wp\/v2\/pages\/465\/revisions\/472"}],"up":[{"embeddable":true,"href":"http:\/\/www.oztalay.com\/matt\/wp-json\/wp\/v2\/pages\/407"}],"wp:attachment":[{"href":"http:\/\/www.oztalay.com\/matt\/wp-json\/wp\/v2\/media?parent=465"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}