{"id":4428,"date":"2016-12-11T23:54:04","date_gmt":"2016-12-11T23:54:04","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=4428"},"modified":"2016-12-11T23:54:04","modified_gmt":"2016-12-11T23:54:04","slug":"p0-p-172-part-64-vehicles","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p0-p-172-part-64-vehicles\/","title":{"rendered":"P0-P-172: Part 64: Vehicles"},"content":{"rendered":"<p>The vehicles can now be loaded and unloaded successfully. This took longer than I thought it would, since I had problems with the vehicles collision hull interacting with the shuttles collision hull as it was being added.<\/p>\n<p>I could disable the collision hulls, but then there would be nothing to raycast against, so I couldn&#8217;t select the vehicle for unloading. I also discovered that raycasting to a child object in unity returns the transform of its parent, which would be the ship, not the vehicle.<\/p>\n<p>I got all of this sorted out, and I can now carry vehicles in the cargo bay of the shuttle, and load and unload them successfully. This is a pretty major step forward, I have wanted to add this feature for some time.<\/p>\n<p>I have also added the ability for the ai to enter and leave the vehicle if they are currently following the player. This was easier than I thought, since I could just copy code that I had already written for other actions.<\/p>\n<p>The only other thing that I need to do is texture the vehicle.<\/p>\n<figure id=\"attachment_4413\" aria-describedby=\"caption-attachment-4413\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-09_12_2016-09_38_52-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4413\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-09_12_2016-09_38_52-PM-300x163.jpg\" alt=\"Unity 09\/12\/2016 , 09:38:52 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\/2016\/12\/PhoenixGameDevelopment-09_12_2016-09_38_52-PM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-09_12_2016-09_38_52-PM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-09_12_2016-09_38_52-PM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-09_12_2016-09_38_52-PM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4413\" class=\"wp-caption-text\">Unity<br \/>09\/12\/2016 , 09:38:52 PM<br \/>Unity Personal (64bit) &#8211; P0Main.unity &#8211; New Unity Project &#8211; PC, Mac &amp; Linux Standalone<\/figcaption><\/figure>\n<figure id=\"attachment_4409\" aria-describedby=\"caption-attachment-4409\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-09_12_2016-02_46_46-AM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4409\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-09_12_2016-02_46_46-AM-300x163.jpg\" alt=\"Unity 09\/12\/2016 , 02:46:46 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\/2016\/12\/PhoenixGameDevelopment-09_12_2016-02_46_46-AM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-09_12_2016-02_46_46-AM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-09_12_2016-02_46_46-AM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-09_12_2016-02_46_46-AM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4409\" class=\"wp-caption-text\">Unity<br \/>09\/12\/2016 , 02:46:46 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>The vehicles can now be loaded and unloaded successfully. This took longer than I thought it would, since I had problems with the vehicles collision hull interacting with the shuttles collision hull as it was being added. I could disable the collision hulls, but then there would be nothing to raycast against, so I couldn&#8217;t [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,17,10,11],"tags":[],"class_list":["post-4428","post","type-post","status-publish","format-standard","hentry","category-astral-realms","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\/4428"}],"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=4428"}],"version-history":[{"count":1,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/4428\/revisions"}],"predecessor-version":[{"id":4439,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/4428\/revisions\/4439"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=4428"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=4428"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=4428"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}