{"id":3401,"date":"2016-08-13T23:37:38","date_gmt":"2016-08-13T22:37:38","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=3401"},"modified":"2016-08-13T23:40:14","modified_gmt":"2016-08-13T22:40:14","slug":"p-152-virtual-world-concept-update-151-planet-sized-terrain-part-30","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p-152-virtual-world-concept-update-151-planet-sized-terrain-part-30\/","title":{"rendered":"P-152: Virtual World Concept Update 151: Planet-sized Terrain: Part 30"},"content":{"rendered":"<p>I have managed to fix the problem that I was having with the 3D gravity\u00a0code. This was caused by some legacy code that I had included as part of a previous attempt to fix the problem, and was not actually related to the new code that I had added.<\/p>\n<p>I also ran\u00a0into another slight problem when integrating the new gravity code with the existing terrain system. The player was being pulled towards the center of the screen, however, I have scaled the node positions from 64-bit coordinates to 32-bit coordinates, so their positions in 10k space do not match the center of the world. This resulted in the player being pulled to the wrong location, essentially.<\/p>\n<p>I hardcoded an offset into the gravity vector, which works fine, but it only works when the player is standing on the Positive Z axis, I will need to come up with a better solution to this at some point.<\/p>\n<p>I also managed to implement raycast-based collision into the terrain. I was surprised that this only took a day, but it turned out to be easier than I thought. I can now perform collision on the current collision list from Players, Aiplayers, and raycasting. I will need to extend this to vehicles and items in the future, but raycast collision alone is enough for now. I will use raycasting to create a simple shape replicator, probably a script based one, so that I can finally start placing some objects on the terrain.<\/p>\n<p>The next goal is to re-implement the first person performance optimisations that I had disabled for testing.<\/p>\n<p><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-07_28_43-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3408\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-07_28_43-PM-300x192.jpg\" alt=\"P152_DEBUG 08\/08\/2016 , 07:28:43 PM Torque 3D MIT - P152\" width=\"300\" height=\"192\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-07_28_43-PM-300x192.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-07_28_43-PM-768x492.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-07_28_43-PM-1024x656.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-07_28_43-PM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>P152_DEBUG<br \/>\n08\/08\/2016 , 07:28:43 PM<br \/>\nTorque 3D MIT &#8211; P152<\/p>\n<figure id=\"attachment_3412\" aria-describedby=\"caption-attachment-3412\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-09_08_2016-04_29_20-AM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3412\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-09_08_2016-04_29_20-AM-300x192.jpg\" alt=\"P152_DEBUG 09\/08\/2016 , 04:29:20 AM Torque 3D MIT - P152\" width=\"300\" height=\"192\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-09_08_2016-04_29_20-AM-300x192.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-09_08_2016-04_29_20-AM-768x492.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-09_08_2016-04_29_20-AM-1024x656.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-09_08_2016-04_29_20-AM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-3412\" class=\"wp-caption-text\">P152_DEBUG<br \/>09\/08\/2016 , 04:29:20 AM<br \/>Torque 3D MIT &#8211; P152<\/figcaption><\/figure>\n<p>I placed this model using a raycast collision check.<\/p>\n<figure id=\"attachment_3411\" aria-describedby=\"caption-attachment-3411\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-11_07_35-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3411\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-11_07_35-PM-300x192.jpg\" alt=\"P152_DEBUG 08\/08\/2016 , 11:07:35 PM Torque 3D MIT - P152\" width=\"300\" height=\"192\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-11_07_35-PM-300x192.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-11_07_35-PM-768x492.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-11_07_35-PM-1024x656.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-11_07_35-PM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-3411\" class=\"wp-caption-text\">P152_DEBUG<br \/>08\/08\/2016 , 11:07:35 PM<br \/>Torque 3D MIT &#8211; P152<\/figcaption><\/figure>\n<p>AiPlayers inherit from the same classes as Players, so the existing collision system works for them too.<\/p>\n<figure id=\"attachment_3403\" aria-describedby=\"caption-attachment-3403\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-11_07_22-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3403\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-11_07_22-PM-300x192.jpg\" alt=\"P152_DEBUG 08\/08\/2016 , 11:07:22 PM Torque 3D MIT - P152\" width=\"300\" height=\"192\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-11_07_22-PM-300x192.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-11_07_22-PM-768x492.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-11_07_22-PM-1024x656.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-11_07_22-PM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-3403\" class=\"wp-caption-text\">P152_DEBUG<br \/>08\/08\/2016 , 11:07:22 PM<br \/>Torque 3D MIT &#8211; P152<\/figcaption><\/figure>\n<figure id=\"attachment_3404\" aria-describedby=\"caption-attachment-3404\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-11_07_05-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3404\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-11_07_05-PM-300x192.jpg\" alt=\"P152_DEBUG 08\/08\/2016 , 11:07:05 PM Torque 3D MIT - P152\" width=\"300\" height=\"192\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-11_07_05-PM-300x192.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-11_07_05-PM-768x492.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-11_07_05-PM-1024x656.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-11_07_05-PM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-3404\" class=\"wp-caption-text\">P152_DEBUG<br \/>08\/08\/2016 , 11:07:05 PM<br \/>Torque 3D MIT &#8211; P152<\/figcaption><\/figure>\n<figure id=\"attachment_3405\" aria-describedby=\"caption-attachment-3405\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-10_27_50-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3405\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-10_27_50-PM-300x192.jpg\" alt=\"P152_DEBUG 08\/08\/2016 , 10:27:50 PM Torque 3D MIT - P152\" width=\"300\" height=\"192\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-10_27_50-PM-300x192.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-10_27_50-PM-768x492.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-10_27_50-PM-1024x656.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-10_27_50-PM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-3405\" class=\"wp-caption-text\">P152_DEBUG<br \/>08\/08\/2016 , 10:27:50 PM<br \/>Torque 3D MIT &#8211; P152<\/figcaption><\/figure>\n<figure id=\"attachment_3406\" aria-describedby=\"caption-attachment-3406\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-10_26_38-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3406\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-10_26_38-PM-300x192.jpg\" alt=\"P152_DEBUG 08\/08\/2016 , 10:26:38 PM Torque 3D MIT - P152\" width=\"300\" height=\"192\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-10_26_38-PM-300x192.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-10_26_38-PM-768x492.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-10_26_38-PM-1024x656.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-10_26_38-PM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-3406\" class=\"wp-caption-text\">P152_DEBUG<br \/>08\/08\/2016 , 10:26:38 PM<br \/>Torque 3D MIT &#8211; P152<\/figcaption><\/figure>\n<figure id=\"attachment_3407\" aria-describedby=\"caption-attachment-3407\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-10_26_32-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3407\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-10_26_32-PM-300x192.jpg\" alt=\"P152_DEBUG 08\/08\/2016 , 10:26:32 PM Torque 3D MIT - P152\" width=\"300\" height=\"192\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-10_26_32-PM-300x192.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-10_26_32-PM-768x492.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-10_26_32-PM-1024x656.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/08\/PhoenixGameDevelopment-08_08_2016-10_26_32-PM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-3407\" class=\"wp-caption-text\">P152_DEBUG<br \/>08\/08\/2016 , 10:26:32 PM<br \/>Torque 3D MIT &#8211; P152<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>I have managed to fix the problem that I was having with the 3D gravity\u00a0code. This was caused by some legacy code that I had included as part of a previous attempt to fix the problem, and was not actually related to the new code that I had added. I also ran\u00a0into another slight problem [&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-3401","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\/3401"}],"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=3401"}],"version-history":[{"count":5,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/3401\/revisions"}],"predecessor-version":[{"id":3417,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/3401\/revisions\/3417"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=3401"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=3401"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=3401"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}