{"id":915,"date":"2025-04-22T07:25:26","date_gmt":"2025-04-22T11:25:26","guid":{"rendered":"https:\/\/willkolb.com\/?p=915"},"modified":"2025-04-22T07:28:12","modified_gmt":"2025-04-22T11:28:12","slug":"hud-rework-and-physics-noodlin","status":"publish","type":"post","link":"https:\/\/willkolb.com\/?p=915","title":{"rendered":"HUD Rework and Physics noodlin&#8217;"},"content":{"rendered":"\n<p>The old hud was starting to bother me so I leaned more into a simplier hud that I can expand upon later.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"553\" src=\"https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-5-1024x553.png\" alt=\"\" class=\"wp-image-432\" srcset=\"https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-5-1024x553.png 1024w, https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-5-300x162.png 300w, https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-5-768x414.png 768w, https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-5-1536x829.png 1536w, https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-5-500x270.png 500w, https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-5.png 1894w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The original hud I was going for a kind of skewed look as if you were wearing a helmet and the information was displayed on these green dots on the screen. While a cool concept I think it was too janky and looked like mspaint levels of cleanliness. Also you can see here if I have a non-standar resolution the alignment would always be misaligned to the screen. The new hud (which I would say is still a developer hud) I went for a cleaner approach:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"706\" height=\"435\" src=\"https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-45.png\" alt=\"\" class=\"wp-image-916\" srcset=\"https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-45.png 706w, https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-45-300x185.png 300w, https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-45-487x300.png 487w\" sizes=\"auto, (max-width: 706px) 100vw, 706px\" \/><\/figure>\n\n\n\n<p>Nothing too crazy just a health bar and some text on the corners. But the best part:<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"1080\" style=\"aspect-ratio: 1920 \/ 1080;\" width=\"1920\" controls src=\"https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/2025-04-22_06-20-49.mp4\"><\/video><\/figure>\n\n\n\n<p>The positioning stays consistent regardless of dpi\/resolution.<\/p>\n\n\n\n<p>I achieved this by avoiding the &#8220;scaleBoxes&#8221; I was using before and just used horizontal\/vertical boxes with spacers in between:<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"461\" height=\"434\" src=\"https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-46.png\" alt=\"\" class=\"wp-image-918\" srcset=\"https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-46.png 461w, https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-46-300x282.png 300w, https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-46-319x300.png 319w\" sizes=\"auto, (max-width: 461px) 100vw, 461px\" \/><\/figure>\n\n\n\n<p>I also adjusted my dpi scaling rules:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"386\" src=\"https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-47-1024x386.png\" alt=\"\" class=\"wp-image-919\" srcset=\"https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-47-1024x386.png 1024w, https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-47-300x113.png 300w, https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-47-768x289.png 768w, https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-47-1536x579.png 1536w, https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-47-500x188.png 500w, https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-47.png 1664w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>I also found out I had a bad strand in my blueprint spaghetti from months ago:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"471\" src=\"https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-48-1024x471.png\" alt=\"\" class=\"wp-image-920\" srcset=\"https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-48-1024x471.png 1024w, https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-48-300x138.png 300w, https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-48-768x353.png 768w, https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-48-500x230.png 500w, https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-48.png 1148w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"470\" src=\"https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-49-1024x470.png\" alt=\"\" class=\"wp-image-921\" srcset=\"https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-49-1024x470.png 1024w, https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-49-300x138.png 300w, https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-49-768x352.png 768w, https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-49-500x229.png 500w, https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-49.png 1157w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>That circled red block is what determined the direction of damage when a bullet was fired. I was doing StartVector &#8211; EndVector instead of doing EndVector  &#8211; StartVector which was inverting the direction of damage as the &#8220;direction Of Damage&#8221; was relative to the attacked instead of the attacker.<\/p>\n\n\n\n<p>Why does this matter? Unreal has a damage type system which makes it easier to set impulses from different types of damage. I have a bullet type that I wanted to push objects, when the vectors are swapped:<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"1080\" style=\"aspect-ratio: 1920 \/ 1080;\" width=\"1920\" controls src=\"https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/2025-04-22_06-38-25.mp4\"><\/video><\/figure>\n\n\n\n<p>When the math is correct:<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"1080\" style=\"aspect-ratio: 1920 \/ 1080;\" width=\"1920\" controls src=\"https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/2025-04-22_06-39-33.mp4\"><\/video><\/figure>\n\n\n\n<p>(I realize the window is awkwardly small in these videos&#8230;)<\/p>\n\n\n\n<p>I also wanted to touch up bot &#8220;death&#8221; (destruction? Disassembly?) and I saw I never made a physics asset for the Assault rifle with no stock, after that fix plus the impulse fix things start to look much nicer.<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"1080\" style=\"aspect-ratio: 1920 \/ 1080;\" width=\"1920\" controls src=\"https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/2025-04-22_07-16-06.mp4\"><\/video><\/figure>\n\n\n\n<p>The legs spawning detached is still a bit annoying. That issues comes from the physics asset which I spent so much time with a month or two ago I eventually gave up and kept it a &#8220;this just works so don&#8217;t touch it&#8221; kinda stasis. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"637\" src=\"https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-50-1024x637.png\" alt=\"\" class=\"wp-image-925\" srcset=\"https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-50-1024x637.png 1024w, https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-50-300x187.png 300w, https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-50-768x478.png 768w, https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-50-482x300.png 482w, https:\/\/willkolb.com\/wp-content\/uploads\/2025\/04\/image-50.png 1449w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>If you look at the tree to the left you can see there&#8217;s a &#8220;Body&#8221; bone which holds the main collision box then there&#8217;s &#8220;BackLegXX&#8221; bones which I have attached to the body bone and to the bottom legs. However, there&#8217;s nothing in between for the thighs of the bot, which is why in the video above you see the legs swinging free. I&#8217;d need to remake this guy by going through each leg and adding a box, connecting it to the body or previous leg and ensuring everything doesn&#8217;t collide with itself. There&#8217;s an &#8220;auto-generation&#8221; feature which I&#8217;ve had little success with so this will end up just being a big time sink.<\/p>\n\n\n\n<p>Eventually I want bots to have a chance to detonate in a electrical fireshow which I think would add to the dynamic nature of fights. Also I need to do a re-write of the AI to add:<br>&#8211; AI Teams<br>&#8211; Team Positioning Coordination (so the bots don&#8217;t just all choose the same spot)<br>&#8211; Goal Zones (for some other ideas I&#8217;m working to add a meta level to gameplay)<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The old hud was starting to bother me so I leaned more into a simplier hud that I can expand upon later. The original hud I was going for a kind of skewed look as if you were wearing a helmet and the information was displayed on these green dots on the screen. While a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":921,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,9],"tags":[],"class_list":["post-915","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gamedev","category-unreal"],"_links":{"self":[{"href":"https:\/\/willkolb.com\/index.php?rest_route=\/wp\/v2\/posts\/915","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/willkolb.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/willkolb.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/willkolb.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/willkolb.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=915"}],"version-history":[{"count":1,"href":"https:\/\/willkolb.com\/index.php?rest_route=\/wp\/v2\/posts\/915\/revisions"}],"predecessor-version":[{"id":926,"href":"https:\/\/willkolb.com\/index.php?rest_route=\/wp\/v2\/posts\/915\/revisions\/926"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/willkolb.com\/index.php?rest_route=\/wp\/v2\/media\/921"}],"wp:attachment":[{"href":"https:\/\/willkolb.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=915"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/willkolb.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=915"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/willkolb.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=915"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}