The shooting mechanic isn’t over complicated. You can only shoot when you are aiming simple bool check to see if the player is aiming the aim button needs to behold down when you press the aim button the character draws an arrow. On release the arrow is put back in the quivers holding the shoot button will put more power in the arrow.
update arrow transform
For this project I needed to make use of animation triggers, I need them on two different occasions once to reparent the bow and one to spawn/kill the arrow. In the timeline where the hand of the character reaches to its back when it’s about to reverse the animation, I placed the trigger. From there on trigger parent to the socket in the hand. For the other scenarios exactly the same.
To update the arrow rotation I needed to get the bone location of the string and arrow point on the bow and draw a vector between them using the direction of the vector and make a rotation. Using the right hand for the location I can update the arrow to stay on the bow.
The player can only aim when the bow is equipped as soon as the player starts aiming movement speed is limited and an arrow is drawn and at the same time camera view switch to a first-person view. As the camera switch start, I set a transition camera to the location and rotation of the current camera. Using a timeline and a lerp to move the transition camera to the other camera position and activate that camera.
Firing the arrow happens as soon as the player lets go of the power/shoot button. Setting the power to the projectile velocity and the gravity back to its original value the arrow is fired.