{"id":4426,"date":"2016-12-11T23:45:56","date_gmt":"2016-12-11T23:45:56","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=4426"},"modified":"2016-12-11T23:45:56","modified_gmt":"2016-12-11T23:45:56","slug":"p0-p-172-part-63-vehicles","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p0-p-172-part-63-vehicles\/","title":{"rendered":"P0-P-172: Part 63: Vehicles"},"content":{"rendered":"<p>Getting the vehicles working was relatively easy. The critical part was to use &#8220;Wheel Colliders&#8221; for collision. I copied the scripts from the Unity Standard Assets vehicle, and modified those.<\/p>\n<p>I had a few issues with collision, setting up the wheels properly, and controlling the vehicle, but they have all been worked out now. The vehicle physics is very advanced, the wheels actually move independent of the vehicle itself, to simulate a suspension system, and they rotate automatically too, there is no need to manually play any animations.<\/p>\n<p>I eventually decided to simply mount my player onto the vehicle, and use their camera as the main camera. Initially I had planned to use a separate camera for the vehicle, similar to what I did for the shuttle, but this caused issues with the Space Exploration Engine&#8217;s camera setup.<\/p>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_4407\" aria-describedby=\"caption-attachment-4407\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-08_12_2016-02_38_13-AM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4407\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-08_12_2016-02_38_13-AM-300x163.jpg\" alt=\"Unity 08\/12\/2016 , 02:38:13 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-08_12_2016-02_38_13-AM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-08_12_2016-02_38_13-AM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-08_12_2016-02_38_13-AM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-08_12_2016-02_38_13-AM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4407\" class=\"wp-caption-text\">Unity<br \/>08\/12\/2016 , 02:38:13 AM<br \/>Unity Personal (64bit) &#8211; P0Main.unity &#8211; New Unity Project &#8211; PC, Mac &amp; Linux Standalone<\/figcaption><\/figure>\n<figure id=\"attachment_4408\" aria-describedby=\"caption-attachment-4408\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-08_12_2016-02_51_16-AM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4408\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-08_12_2016-02_51_16-AM-300x163.jpg\" alt=\"Unity 08\/12\/2016 , 02:51:16 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-08_12_2016-02_51_16-AM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-08_12_2016-02_51_16-AM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-08_12_2016-02_51_16-AM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-08_12_2016-02_51_16-AM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4408\" class=\"wp-caption-text\">Unity<br \/>08\/12\/2016 , 02:51:16 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>Getting the vehicles working was relatively easy. The critical part was to use &#8220;Wheel Colliders&#8221; for collision. I copied the scripts from the Unity Standard Assets vehicle, and modified those. I had a few issues with collision, setting up the wheels properly, and controlling the vehicle, but they have all been worked out now. The [&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-4426","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\/4426"}],"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=4426"}],"version-history":[{"count":1,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/4426\/revisions"}],"predecessor-version":[{"id":4427,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/4426\/revisions\/4427"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=4426"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=4426"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=4426"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}