Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Everything About Weapons

A topic by McRae-Alex created Dec 02, 2023 Views: 26
Viewing posts 1 to 1

Hey guys, while this week has been a bit of a fiasco due to Thanksgiving, I have been working on firearms. I started the week by migrating the last of the functionality from our old PlayerBase code (which we are deprecating because we have switched to a new player input set thanks to Rob). This took much longer than I would like to admit, but it is done now and so I should not have to mess with anything from their again going forward.

The next two things I worked on were weapon recoil and ADS. Before I get to the recoil, which has some things that I think are problems, I would like to first state that Rob and I got the ADS to work like a charm and I'm super happy with it although it feels really weird to implement it with actors and not actual cameras.

Now, the recoil functionality was not to difficult to implement once I wrapped my head around it, but I was overthinking the hell out of it for a while. Thankfully it works now, but I am still worried that the implementation is too jarring as it automatically switches from the current X & Y to the updated X & Y. I could just be overthinking this and it works just fine, but any recommendations on how I could make it feel less jarring would be appreciated. 


The second thing that currently has me worried with the recoil is that it does not currently "snap back" to an idle rotation after you are done firing. It probably is going to be super easy to implement, but I am having trouble wrapping my head around implementing it. Again, any advice is appreciated.

Next I made a Sidearm object and started working on the functionality. Thankfully we found an asset for the sidearm that looks great, but I am a bit worried that it is angled strange. With where it is currently angled, the forward (red) arrow is to the side, the sideways (green) is downward and at an angle, and the upwards (blue) is forwards and downward at an angle. The images below show it better. The only reason I am worried about this is that I think it will affect the bullet shooting when I finally implement the sidearm, but I don't know for sure if it will until I finish the Animation Blueprint for the player to go with the sidearm. 


The final thing that has me REALLY stressed is trying to implement weapon switching. No matter how I try to do this, it all seems weird and I am just having trouble wrapping my head around it. I first tried to implement it with the scroll wheel but I could not get the inputs to work. After several hours of trying that, I decided to scrap it and switch to just using the "1" and "2" buttons for equipping the first and second weapon. But now I'm trying to find a way to switch the ChildActorComponent to the new weapon after switching. I feel like there is a way to do this but I may not be searching for it correctly.