{"id":4720,"date":"2017-02-12T23:53:11","date_gmt":"2017-02-12T23:53:11","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=4720"},"modified":"2017-02-13T00:00:39","modified_gmt":"2017-02-13T00:00:39","slug":"p0-p-172-part-105-ship-control","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p0-p-172-part-105-ship-control\/","title":{"rendered":"P0-P-172: Part 105: Ship Control"},"content":{"rendered":"<p>The next goal is important, it is one of the core mechanics of the game.<\/p>\n<p>I need to add support for controlling large starships\/space stations, etc, with complex interiors.<\/p>\n<p>I have chosen to rotate and translate the world, and keep the ship at the origin, to prevent having to perform many translations and rotations (for each interior object) per tick.<\/p>\n<p>As it turns out, translating the world is quite simple, I can use the existing floating origin system to do it.<\/p>\n<p>Rotation objects is also fine, but the Space Exploration Engine doesn&#8217;t seem to have any support for rotating planets. This is causing a problem. I have tried various ideas to rotate the planet, and I got reasonably close by simply rotating all of the visible terrain chunks, but once rotated, the chunks don&#8217;t subdivide properly.<\/p>\n<p>I will need to dig deeper into the code to implement rotation of planets, but it does look like the general concept is sound.<\/p>\n<figure id=\"attachment_4709\" aria-describedby=\"caption-attachment-4709\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-07_02_2017-06_46_04-AM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4709\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-07_02_2017-06_46_04-AM-300x163.jpg\" alt=\"Unity 07\/02\/2017 , 06:46:04 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\/02\/PhoenixGameDevelopment-07_02_2017-06_46_04-AM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-07_02_2017-06_46_04-AM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-07_02_2017-06_46_04-AM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-07_02_2017-06_46_04-AM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4709\" class=\"wp-caption-text\">Unity<br \/>07\/02\/2017 , 06:46:04 AM<br \/>Unity Personal (64bit) &#8211; P0Main.unity &#8211; New Unity Project &#8211; PC, Mac &amp; Linux Standalone*<\/figcaption><\/figure>\n<figure id=\"attachment_4710\" aria-describedby=\"caption-attachment-4710\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-08_02_2017-02_28_10-AM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4710\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-08_02_2017-02_28_10-AM-300x163.jpg\" alt=\"Unity 08\/02\/2017 , 02:28:10 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\/02\/PhoenixGameDevelopment-08_02_2017-02_28_10-AM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-08_02_2017-02_28_10-AM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-08_02_2017-02_28_10-AM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-08_02_2017-02_28_10-AM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4710\" class=\"wp-caption-text\">Unity<br \/>08\/02\/2017 , 02:28:10 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 next goal is important, it is one of the core mechanics of the game. I need to add support for controlling large starships\/space stations, etc, with complex interiors. I have chosen to rotate and translate the world, and keep the ship at the origin, to prevent having to perform many translations and rotations (for [&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-4720","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\/4720"}],"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=4720"}],"version-history":[{"count":3,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/4720\/revisions"}],"predecessor-version":[{"id":4729,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/4720\/revisions\/4729"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=4720"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=4720"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=4720"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}