3 - Implementing the Aim Offset

In this step, we add the Aim Offset to our Animation Blueprint and hook it up to our existing Anim Graph.

On this page

In this step, we add the Aim Offset to our Animation Blueprint and hook it up to our existing Anim Graph.


  1. In the Content/AnimStarterPack folder, open the UE4ASP_HeroTPP_AnimBlueprint and Double-click the AnimGraph in the MyBlueprint panel.


  2. From the Asset Browser tab, drag in your Aim Offset asset.


  3. Connect the Aim Offset as shown below, then Right-click on the Yaw and Pitch pins and Promote to Variable and name them Aim Yaw and Aim Pitch.


    These two variables will be populated by where the player is aiming using their mouse and will drive the pose in our Aim Offset.

  4. In the MyBlueprint panel, jump over to the EventGraph.


  5. In the EventGraph, locate the Sequence node within the Movement portion of the script.


    Click the Add pin button on the Sequence node.


  6. From the MyBlueprint panel, hold down Alt and drag in both the Aim Yaw and Aim Pitch and connect to Sequence node.


  7. Drag off the Cast To Ue4ASP_Character node and add the Get Control Rotation and Get Actor Rotation nodes.


  8. Drag off the Get Control Rotation node and add a Delta(Rotator) node.


  9. Connect the Get Actor Rotation to the Delta(Rotator) B Pin, then off the Return Value add an RInterp To node (and swap the connection from Current to Target).


    You can hold Ctrl and Left-click on the Current pin to drag its connection to the Target pin.

  10. Drag off the Current pin of the RInterp To node and select Make Rotator.


  11. From the MyBlueprint panel, hold Ctrl and drag in the Aim Pitch and Aim Yaw variables and connect them to the Make Rotator node's Pitch and Yaw.


  12. At the start of the Movement script, find the Event Blueprint Update Animation node and promote Delta Time X to a variable called Time and connect as shown.


  13. Back on the RInterp To node, connect the new Time variable and set the Interp Speed to 15.


    We are going to use the rotation of the character and the rotation of the player's input to create a new rotator that will limit how much the character can turn in a direction.

  14. Off the RInterp To node, add a Break Rotator and Clamp Angle of Pitch and Yaw with min/max angles set to -90 and 90 respectively.


  15. Connect the Clamp Angle from the Pitch to Aim Pitch and the Yaw to Aim Yaw.


    The Aim Yaw and Aim Pitch values that drive our Aim Offset now take into account the character's rotation, the player's current controller rotation and are clamped to prevent the character from turning too far in one direction. Without clamping the angle degrees, the character's legs could be pointed forwards while the character turns all the way around and points in the opposite direction which is probably something we want to avoid.

We are just about done with our setup, in the next step, we will tie everything together and test out our character's ability to aim.

Select Skin

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback