[{"data":1,"prerenderedAt":68},["ShallowReactive",2],{"blog-\u002Fblog\u002Fweapon-handling-101":3,"blog-neighbors-\u002Fblog\u002Fweapon-handling-101":61},{"id":4,"title":5,"body":6,"date":51,"description":52,"draft":53,"extension":54,"meta":55,"navigation":56,"path":57,"seo":58,"stem":59,"__hash__":60},"blog\u002Fblog\u002Fweapon-handling-101.md","Weapon Handling 101",{"type":7,"value":8,"toc":47},"minimark",[9,13,16,27,36,41,44],[10,11,12],"p",{},"Happy New Year,",[10,14,15],{},"Spent most of my time over the last few weeks improving how the gun handles for the player. I created animations for what the gun does when the player is reloading or running. At first I was worried that I wasn't going to be able to make compelling animations, but I found that it's pretty easy to get a simple reload or \"weapon bob\" animation created, and I'm pretty pleased with the results.",[10,17,18,19,26],{},"The running and reloading are done with animations, but I decided that for the player \"lowering his gun\" when approaching a wall, I would instead lerp the rotation of the weapon. I used a ",[20,21,25],"a",{"href":22,"rel":23},"https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=bax-xjlfMPs",[24],"nofollow","great tutorial by BuffaLou"," as a starting point, and I was able to make the adjustments needed to fit my vision for this game. Between these different animations and mechanisms, it took me a good bit of thinking to figure out how to properly trigger each one - i.e. handling things like \"you shouldn't be able to shoot while near a wall\" and \"you should cancel your reload if you start running during the animation\". I'm pretty happy with where it's at now, and I think I've laid solid groundwork to move on to other parts of the game.",[10,28,29,30,35],{},"Speaking of other parts, I have a shootable NPC in my game, which I got from the ",[20,31,34],{"href":32,"rel":33},"https:\u002F\u002Fassetstore.unity.com\u002Fpackages\u002F3d\u002Fcharacters\u002Fhumanoids\u002Flow-poly-animated-people-156748",[24],"Low Poly Animated People pack by polyperfect"," . As you can see below, you can now shoot and kill Santa in my video game. I plan on building on this affront to Christmas by playing around with the other characters in this pack, and hopefully will get some basic enemies and levels designed soon.",[37,38],"clip",{"alt":39,"src-path":40},"Handling","\u002Fimages\u002Fhandling.mp4",[10,42,43],{},"Stay tuned!",[10,45,46],{},"—Josh",{"title":48,"searchDepth":49,"depth":49,"links":50},"",2,[],"2023-01-14","Spent most of my time over the last few weeks improving how the gun handles for the player.",false,"md",{},true,"\u002Fblog\u002Fweapon-handling-101",{"title":5,"description":52},"blog\u002Fweapon-handling-101","yMUdZGeA67CxbFMg5chCnRDq9iqRXWUUNEATwEjpUDc",{"newer":62,"older":65},{"path":63,"title":64},"\u002Fblog\u002Fgun-sounds-and-enemy-ai","Gun Sounds and Enemy AI",{"path":66,"title":67},"\u002Fblog\u002Frecoil-and-particle-effects","Recoil and Particle Effects",1789352072298]