top of page
Search

Dev Log 9# Shoot functionality for the weapon, Sorting out visuals for when the gun is fired.

So I have now moved onto the shoot functionality like with all input actions, I started by creating the action mapping and binding the input in the character's set up player input function. Sorting out the animation was pretty quick for this part as I learnt that you can simply call play animation in C++ if you want a certain animation to play during an action event by including AnimationAsset.h, I set this animation as the fire animation that came with one of the free animation packs in unreal engine's marketplace. I also learnt about shoot montages which is another type of animation blueprint.


For shoot montages you want an additive animation for both hip firing and aiming. You also want to create a slot in the montage as this will help for hooking up the animations to the animation blueprint.

As you'll see from these images the equipped pose is hooked up to all the animation functionality that is responsible for when the player is holding a gun, by hooking this up to the weapon slot that we created in the shoot montage and having that as the base pose for the aim offset allows for the player to have visual recoil when firing, which will greatly help the immersion.




 
 
 

Comments


bottom of page