{"id":4542,"date":"2017-01-01T22:42:29","date_gmt":"2017-01-01T22:42:29","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=4542"},"modified":"2017-01-01T22:42:29","modified_gmt":"2017-01-01T22:42:29","slug":"p0-p-172-part-79-oculus-touch-roomscale-vr-demo-guns-and-cloth-simulation","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p0-p-172-part-79-oculus-touch-roomscale-vr-demo-guns-and-cloth-simulation\/","title":{"rendered":"P0-P-172: Part 79: Oculus Touch Roomscale VR Demo: Guns, and Cloth Simulation"},"content":{"rendered":"<p>I have added guns to the VR demo. The hardest part was making the guns fit into the hands properly, actually getting them to fire was quite easy.<\/p>\n<p>I also fixed some issues with the guns, such as spend cases not being ejected properly, and odd lighting issues on the muzzle flash texture at certain angles. The player can only fire one gun for now, I am not sure if I want to add support to fire two guns at once, since I am not really building a shooter game, so it is unlikely the player would need to fire two guns at once.<\/p>\n<p>The game can now be played either with a VR headset and controller, or with a conventional mouse and keyboard.<\/p>\n<p>Unity has a built in cloth simulation system, which is very easy to use. I was able to use it to create some banners with very realistic movement, physics, and collision. The only downsides are that the simulation is very expensive performance wise, and the mesh used for the banner needs to be relatively high poly, so having many cloth objects in a scene would rapidly lead to performance problems.<\/p>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_4521\" aria-describedby=\"caption-attachment-4521\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-27_12_2016-11_59_07-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4521\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-27_12_2016-11_59_07-PM-300x163.jpg\" alt=\"Unity 27\/12\/2016 , 11:59:07 PM Unity Personal (64bit) - P0-HomeDemo.unity - New Unity Project - PC, Mac &amp; Linux Standalone* \" width=\"300\" height=\"163\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-27_12_2016-11_59_07-PM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-27_12_2016-11_59_07-PM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-27_12_2016-11_59_07-PM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-27_12_2016-11_59_07-PM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4521\" class=\"wp-caption-text\">Unity<br \/>27\/12\/2016 , 11:59:07 PM<br \/>Unity Personal (64bit) &#8211; P0-HomeDemo.unity &#8211; New Unity Project &#8211; PC, Mac &amp; Linux Standalone*<\/figcaption><\/figure>\n<figure id=\"attachment_4522\" aria-describedby=\"caption-attachment-4522\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-28_12_2016-06_23_37-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4522\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-28_12_2016-06_23_37-PM-300x163.jpg\" alt=\"Unity 28\/12\/2016 , 06:23:37 PM Unity Personal (64bit) - P0Main.unity - New Unity Project - PC, Mac &amp; Linux Standalone \" width=\"300\" height=\"163\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-28_12_2016-06_23_37-PM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-28_12_2016-06_23_37-PM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-28_12_2016-06_23_37-PM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-28_12_2016-06_23_37-PM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4522\" class=\"wp-caption-text\">Unity<br \/>28\/12\/2016 , 06:23:37 PM<br \/>Unity Personal (64bit) &#8211; P0Main.unity &#8211; New Unity Project &#8211; PC, Mac &amp; Linux Standalone<\/figcaption><\/figure>\n<figure id=\"attachment_4523\" aria-describedby=\"caption-attachment-4523\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-28_12_2016-06_27_13-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4523\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-28_12_2016-06_27_13-PM-300x163.jpg\" alt=\"Unity 28\/12\/2016 , 06:27:13 PM Unity Personal (64bit) - P0Main.unity - New Unity Project - PC, Mac &amp; Linux Standalone* \" width=\"300\" height=\"163\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-28_12_2016-06_27_13-PM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-28_12_2016-06_27_13-PM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-28_12_2016-06_27_13-PM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-28_12_2016-06_27_13-PM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4523\" class=\"wp-caption-text\">Unity<br \/>28\/12\/2016 , 06:27:13 PM<br \/>Unity Personal (64bit) &#8211; P0Main.unity &#8211; New Unity Project &#8211; PC, Mac &amp; Linux Standalone*<\/figcaption><\/figure>\n<figure id=\"attachment_4524\" aria-describedby=\"caption-attachment-4524\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-28_12_2016-10_05_18-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4524\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-28_12_2016-10_05_18-PM-300x163.jpg\" alt=\"Unity 28\/12\/2016 , 10:05:18 PM Unity Personal (64bit) - P0Main.unity - New Unity Project - PC, Mac &amp; Linux Standalone \" width=\"300\" height=\"163\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-28_12_2016-10_05_18-PM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-28_12_2016-10_05_18-PM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-28_12_2016-10_05_18-PM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-28_12_2016-10_05_18-PM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4524\" class=\"wp-caption-text\">Unity<br \/>28\/12\/2016 , 10:05:18 PM<br \/>Unity Personal (64bit) &#8211; P0Main.unity &#8211; New Unity Project &#8211; PC, Mac &amp; Linux Standalone<\/figcaption><\/figure>\n<figure id=\"attachment_4525\" aria-describedby=\"caption-attachment-4525\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-28_12_2016-10_06_12-PM-002.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4525\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-28_12_2016-10_06_12-PM-002-300x163.jpg\" alt=\"Unity 28\/12\/2016 , 10:06:12 PM Unity Personal (64bit) - P0Main.unity - New Unity Project - PC, Mac &amp; Linux Standalone \" width=\"300\" height=\"163\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-28_12_2016-10_06_12-PM-002-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-28_12_2016-10_06_12-PM-002-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-28_12_2016-10_06_12-PM-002-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-28_12_2016-10_06_12-PM-002.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4525\" class=\"wp-caption-text\">Unity<br \/>28\/12\/2016 , 10:06:12 PM<br \/>Unity Personal (64bit) &#8211; P0Main.unity &#8211; New Unity Project &#8211; PC, Mac &amp; Linux Standalone<\/figcaption><\/figure>\n<figure id=\"attachment_4526\" aria-describedby=\"caption-attachment-4526\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-29_12_2016-12_27_42-AM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4526\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-29_12_2016-12_27_42-AM-300x163.jpg\" alt=\"Unity 29\/12\/2016 , 12:27:42 AM Unity Personal (64bit) - P0Main.unity - New Unity Project - PC, Mac &amp; Linux Standalone \" width=\"300\" height=\"163\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-29_12_2016-12_27_42-AM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-29_12_2016-12_27_42-AM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-29_12_2016-12_27_42-AM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-29_12_2016-12_27_42-AM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4526\" class=\"wp-caption-text\">Unity<br \/>29\/12\/2016 , 12:27:42 AM<br \/>Unity Personal (64bit) &#8211; P0Main.unity &#8211; New Unity Project &#8211; PC, Mac &amp; Linux Standalone<\/figcaption><\/figure>\n<figure id=\"attachment_4527\" aria-describedby=\"caption-attachment-4527\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-29_12_2016-12_55_45-AM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4527\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-29_12_2016-12_55_45-AM-300x163.jpg\" alt=\"Unity 29\/12\/2016 , 12:55:45 AM Unity Personal (64bit) - P0Main.unity - New Unity Project - PC, Mac &amp; Linux Standalone \" width=\"300\" height=\"163\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-29_12_2016-12_55_45-AM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-29_12_2016-12_55_45-AM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-29_12_2016-12_55_45-AM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/01\/PhoenixGameDevelopment-29_12_2016-12_55_45-AM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4527\" class=\"wp-caption-text\">Unity<br \/>29\/12\/2016 , 12:55:45 AM<br \/>Unity Personal (64bit) &#8211; P0Main.unity &#8211; New Unity Project &#8211; PC, Mac &amp; Linux Standalone<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>I have added guns to the VR demo. The hardest part was making the guns fit into the hands properly, actually getting them to fire was quite easy. I also fixed some issues with the guns, such as spend cases not being ejected properly, and odd lighting issues on the muzzle flash texture at certain [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,17,10,11],"tags":[],"class_list":["post-4542","post","type-post","status-publish","format-standard","hentry","category-art-and-designs","category-p-0","category-software-and-games","category-spiritus-astrum","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\/4542"}],"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=4542"}],"version-history":[{"count":1,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/4542\/revisions"}],"predecessor-version":[{"id":4543,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/4542\/revisions\/4543"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=4542"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=4542"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=4542"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}