Weapon Wheel

 Author: Cameron Taylor

The weapon wheel needed to be in the game since month two but it was constantly pushed because we ended up adding debug keys to switch weapons. The first issue I ran into was that the assets that use transparency would cut off other assets when covering them. Then I needed to use the greyscale value from before to either have them with a blue outline or a grey outline dependent on highlighting a certain weapon. There was also trouble with dot products for determining which slice the mouse is closest to so that you could select a slice from anywhere on the screen for quick weapon swapping. 

To fix the assets covering each other I had to space them out and give them a big gap so that you could read all the assets. I then told every slice to be a greyscale value unless I specifically told it otherwise. This allowed be to highlight a green slice whenever I wanted to. For using the dot product to figure out which slice the mouse was closest to I needed to convert all positions to NDC coordinates and then use those to dot product so that the math is based from the center of the screen instead of the top left where 0,0 is normally.



Comments

Popular posts from this blog

Adding assets to every enemy -- Owen Meyers

Sphere to AABB collision