{"id":2522,"date":"2016-03-27T23:44:33","date_gmt":"2016-03-27T22:44:33","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=2522"},"modified":"2016-03-27T23:44:33","modified_gmt":"2016-03-27T22:44:33","slug":"p-167-paranoia-oculus-rift-horror-game-world-constructor-8-working-doors-and-item-collision","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p-167-paranoia-oculus-rift-horror-game-world-constructor-8-working-doors-and-item-collision\/","title":{"rendered":"P-167: Paranoia: Oculus Rift Horror Game: World Constructor 8: Working Doors and Item collision"},"content":{"rendered":"<p>I have finished the door implementation in T3D. I ended up having to use two objects for each door, the animated door object itself (with no collision) and another Tstatic with collision that I would move using script as the door opens and closes.<\/p>\n<p>This is obviously not an ideal solution, but it works quite well, and using the correct naming conventions, I can dynamically create doors and open and close them without having to make any changes in the editor at all.<\/p>\n<p>I have also learned the T3D doesn&#8217;t support player collisions against items by default, only raycasts. I spent more time than I would have liked trying to figure out why my collision meshes weren&#8217;t working before I realised this! To enable player collision against items, simply add &#8221;\u00a0ItemObjectType&#8221; to the &#8220;sCollisionMoveMask&#8221; variable at line 109 of player.cpp.<\/p>\n<p>Items can now block the players path, requiring them to &#8220;Push&#8221; them using applyimpulse(), which will produce a sound, giving away the players position.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2525\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/03\/PhoenixGameDevelopment-23_03_2016-03_47_46-AM-300x238.png\" alt=\"PhoenixGameDevelopment - 23_03_2016 , 03_47_46 AM\" width=\"300\" height=\"238\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/03\/PhoenixGameDevelopment-23_03_2016-03_47_46-AM-300x238.png 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/03\/PhoenixGameDevelopment-23_03_2016-03_47_46-AM-768x610.png 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/03\/PhoenixGameDevelopment-23_03_2016-03_47_46-AM-1024x813.png 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/03\/PhoenixGameDevelopment-23_03_2016-03_47_46-AM.png 1026w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/> <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2524\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/03\/PhoenixGameDevelopment-23_03_2016-03_47_48-AM-300x238.png\" alt=\"PhoenixGameDevelopment - 23_03_2016 , 03_47_48 AM\" width=\"300\" height=\"238\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/03\/PhoenixGameDevelopment-23_03_2016-03_47_48-AM-300x238.png 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/03\/PhoenixGameDevelopment-23_03_2016-03_47_48-AM-768x610.png 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/03\/PhoenixGameDevelopment-23_03_2016-03_47_48-AM-1024x813.png 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/03\/PhoenixGameDevelopment-23_03_2016-03_47_48-AM.png 1026w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/> <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2523\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/03\/PhoenixGameDevelopment-23_03_2016-03_47_50-AM-300x238.png\" alt=\"PhoenixGameDevelopment - 23_03_2016 , 03_47_50 AM\" width=\"300\" height=\"238\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/03\/PhoenixGameDevelopment-23_03_2016-03_47_50-AM-300x238.png 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/03\/PhoenixGameDevelopment-23_03_2016-03_47_50-AM-768x610.png 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/03\/PhoenixGameDevelopment-23_03_2016-03_47_50-AM-1024x813.png 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/03\/PhoenixGameDevelopment-23_03_2016-03_47_50-AM.png 1026w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have finished the door implementation in T3D. I ended up having to use two objects for each door, the animated door object itself (with no collision) and another Tstatic with collision that I would move using script as the door opens and closes. This is obviously not an ideal solution, but it works quite [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,10],"tags":[],"class_list":["post-2522","post","type-post","status-publish","format-standard","hentry","category-p-0","category-software-and-games","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""],"aioseo_notices":[],"builder_content":"","_links":{"self":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/2522"}],"collection":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/comments?post=2522"}],"version-history":[{"count":1,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/2522\/revisions"}],"predecessor-version":[{"id":2535,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/2522\/revisions\/2535"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=2522"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=2522"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=2522"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}