{"id":295,"date":"2010-10-07T21:18:26","date_gmt":"2010-10-08T04:18:26","guid":{"rendered":"http:\/\/www.rodgreen.com\/?p=295"},"modified":"2010-10-07T21:18:26","modified_gmt":"2010-10-08T04:18:26","slug":"galcon-unity-visualization-second-pass","status":"publish","type":"post","link":"https:\/\/www.rodgreen.com\/?p=295","title":{"rendered":"Galcon Unity Visualization (second pass)"},"content":{"rendered":"<p>Added GUI text components for the planets and the fleets. I tried with 3D text but the results are true 1:1 pixel ratio for the text rendering so you get aliasing artifacts.<\/p>\n<p>To get the GUI text in the right position I had to do a double transform. Once to Camera pixel space and then to camera viewport space (basically 0,0 to 1,1 extents representation of the viewport)<\/p>\n<pre><span class=\"Apple-style-span\" style=\"font-family: monospace; \">Vector3 screenPos = gameCamera.ScreenToViewportPoint(gameCamera.WorldToScreenPoint(pos));<\/span><\/pre>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center; \"><a href=\"https:\/\/www.rodgreen.com\/wp-content\/uploads\/phase2Galcon.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" alt=\"second pass\" height=\"270\" src=\"https:\/\/www.rodgreen.com\/wp-content\/uploads\/phase2Galcon.png\" width=\"480\" \/><\/a><\/p>\n<p>Oh and I whipped up a quick ship model to use rather than the capsule I was using before<\/p>\n<p style=\"text-align: center; \"><img loading=\"lazy\" decoding=\"async\" alt=\"ship\" height=\"102\" src=\"https:\/\/www.rodgreen.com\/wp-content\/uploads\/theShip.png\" width=\"256\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Added GUI text components for the planets and the fleets. I tried with 3D text but the results are true 1:1 pixel ratio for the text rendering so you get aliasing artifacts. To get the GUI text in the right position I had to do a double transform. Once to Camera pixel space and then [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,4,6,8,10,11,12],"tags":[24,26,51,53,31,32,40,59],"class_list":["post-295","post","type-post","status-publish","format-standard","hentry","category-art","category-development","category-games","category-project","category-site","category-technical-art","category-technology","tag-ai","tag-artificial-intelligence","tag-development","tag-games","tag-google","tag-google-ai-challenge-sequence","tag-planet-wars","tag-unity"],"_links":{"self":[{"href":"https:\/\/www.rodgreen.com\/index.php?rest_route=\/wp\/v2\/posts\/295","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rodgreen.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rodgreen.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rodgreen.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rodgreen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=295"}],"version-history":[{"count":0,"href":"https:\/\/www.rodgreen.com\/index.php?rest_route=\/wp\/v2\/posts\/295\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rodgreen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rodgreen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rodgreen.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}