Aim the pistol up and down using blend trees

There may not be an animation available, but we’re going to aim up and down by copying animations

In the down and up animations, adjust the right and left arm keyframes setting them to the initial pose and adjust from there — you may need to come back and re-adjust.

Now replace the aiming of the pistol single state to a blend tree and place the aim values inside the blend tree.

Next, let’s get some script to communicate to our float value. In our first person controller, let’s grab the cinemachine camera target x value. Convert this to a float and pass that to the custom control aimingpitch function.

Next, let’s create a function that adjusts the aiming pitch. As the aim amount changes, we will adjust the float value of aim pitch. Now the arm moves up and down as we look up and down.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Al Heck

Unity Developer and Software Engineer who loves making games with GameDevHQ