ABP_LPSP_FP_PCH

Introduction

The ABP_LPSP_FP_PCH blueprint, also known as the First Person Animation Blueprint, is responsible for managing the playback of all the animations required for the first-person viewmodel to look and function correctly. It works by grabbing data from a set of data tables that contain information about the animation poses and sequences to play for each weapon. These data tables can be found in the Data/Weapons/Animation folder.

The blueprint takes into account the equipped item, the owning character's parameters and states, and updates its displayed poses, loops, and other components to match the required specifications. All the content within this blueprint is specifically designed for the Unreal mannequin, making it easy to retarget to other characters in your game. However, retargeting with Unreal Engine 5 may be more challenging due to changes in the retargeting process.

The First Person Animation Blueprint is intended to be used with the first-person arms that serve as the viewmodel arms in your game. These arms are set up in the asset and can be found assigned to the main character mesh's arms.

If you seek to access the ABP_LPSP_FP_PCH, it is conveniently located at the following path: LowPolyShooterPack/Core/Characters/ABP_LPSP_FP_PCH.

Functionality

The first-person character animation blueprint includes all the functionality seen in the asset's demos, trailers, and other promotional materials. It controls the viewmodel arms, including the posing, loops, transition additives, and actual montages playing. Essentially, everything animation-related is managed in this blueprint.

In addition, there are other features such as procedural recoil, lag, and jumping. There is a lot going on!

Functions

Calculate Lag Values:

This function calculates all the necessary values for applying lag to the ik_hand_gun bone in this blueprint. This effect adds an awesome touch to the overall look.

Get Alpha Breathing:

This function returns the alpha value to be used for the breathing sequence at any given frame.

Get Play Rate Walking:

This function returns the play rate value to be used for the walking animation at any given frame.

Get Alpha Walking:

This function returns the alpha value to be used for the walking sequence at any given frame.

Get Alpha Lag Movement:

This function returns the alpha value to be used for the movement lag at any given frame.

Get Play Rate Running:

This function returns the play rate value to be used for the running animation at any given frame.

Get Alpha Turning:

This function returns the alpha value to be used for the turning animation at any given frame.

Get Alpha Walking Lean:

This function returns the alpha value to be used for the walking lean animation at any given frame.

Get Play Rate Turning:

This function returns the play rate value to be used for the turning animation at any given frame.

Is Not Running:

The Is Not Running function returns true if the owning character is not currently running. This information is very useful and can be used to trigger various events or transitions in the animation blueprint. For example, it can be used to switch from the running animation to the walking animation when the character slows down, or trigger the idle animation when the character stops moving altogether.

Get Play Rate Breathing:

This function returns the play rate value to be used for the breathing animation at any given frame.

Get Aim Blend Time:

Returns the amount of time it takes to transition from the idle state to the aiming state and back.

Get Aim Play Rate:

Returns the play rate of the aiming additive transitions. It is calculated every frame.

Get Play Rate Walking Aiming:

Returns the play rate of the walking animation when the owning character is aiming.

Get Play Rate Walking Crouching:

Returns the play rate of the walking animation while the owning character is crouching.

Update Recoil Values:

This function updates all values related to applying recoil to the weapon bone. It should be called every frame to ensure proper interpolation of the recoil.

Get Lowered Sequence Alpha:

This function returns the alpha value that is used for the lowered sequence animation.

Get Crouched Pose Alpha:

This function returns the alpha value that is used for the crouched pose animation.

Set Sequence Via Sequences Table:

This function sets the value of an animation sequence type variable by retrieving it from the sequences data table.

Get Grip Idle Pose:

This function returns the animation sequence that corresponds to the idle pose that the equipped item's grip attachment would like to use as the main idling pose.

Get Grip Aim Pose:

This function returns the animation sequence that corresponds to the aim pose that the equipped item's grip attachment would like to use as the main aiming pose.

Get Leaning Poses Explicit Time:

This function returns the explicit time to use for the leaning animation, as determined by the leaning alpha value.

Get Crouching Pose Blend Weight:

This function tells us how much we should blend the crouching pose in.

Is Grip Aim Pose Valid:

This function returns a boolean value indicating whether the grip aim pose is valid or not. The grip aim pose is a specific pose that the character's hands take when aiming with their equipped item. If the pose is not valid, it can cause animation issues and unintended behavior. This function can be used to check if the grip aim pose is valid before using it in the animation blueprint.

Is Grip Idle Pose Valid:

Similar to the previous function, this one returns a boolean value indicating whether the grip idle pose is valid or not. The grip idle pose is a specific pose that the character's hands take when they are not aiming with their equipped item, but rather holding it in a relaxed position. If the pose is not valid, it can cause animation issues and unintended behavior. This function can be used to check if the grip idle pose is valid before using it in the animation blueprint.

Get Falling Location:

This returns the location value to add to the ik_hand_gun bone while the character is falling. This helps simulate the equipped item reacting to the character's fall.

Get Falling Rotation:

This returns the rotation value to add to the ik_hand_gun bone while the character is falling. This helps simulate the equipped item reacting to the character's fall.

Get Current Recoil Location:

Recoil is a simulated effect that occurs when a weapon is fired, causing the weapon to move backwards and the view to shake. This function returns the current location value to apply to the ik_hand_gun bone to simulate recoil. This value is constantly changing based on the weapon's firing behavior, and can be used to animate the character's arms and hands appropriately during the recoil.

Get Current Recoil Rotation:

Similar to the previous function, this one returns the current rotation value to apply to the ik_hand_gun bone to simulate recoil. The rotation value is also constantly changing based on the weapon's firing behavior, and can be used to animate the character's arms and hands appropriately during the recoil.

Get Landing Location:

This returns the location value to add to the ik_hand_gun bone while the character is landing. This helps simulate the equipped item reacting to the character's landing.

Get Landing Rotation:

This returns the rotation value to add to the ik_hand_gun bone while the character is landing. This helps simulate the equipped item reacting to the character's landing.

Get Jumping Location:

This returns the location value to add to the ik_hand_gun bone while the character is jumping. This helps simulate the equipped item reacting to the character's jumping.

Get Jumping Rotation:

This returns the rotation value to add to the ik_hand_gun bone while the character is jumping. This helps simulate the equipped item reacting to the character's jumping.

Get Montage Offset Rotation:

This function returns the rotation value required to change the rotation of the ik_hand_gun bone while playing a specific montage.

Get Montage Offset Location:

This function returns the location value required to change the rotation of the ik_hand_gun bone while playing a specific montage.

Get Random Start Position:

This function returns a random start position between zero and one. It can be used for any animation within this context.

Get Aim Blend Times:

Returns the blend times for the aiming transitions, both for the incoming and outgoing transitions.

Get Inverse Standing Offset Location:

This function returns the inverse value of the standing offset location.

Get Inverse Standing Offset Rotation:

This function returns the inverse value of the standing offset rotation.

Get Inverse Standing Offset Scale:

This function returns the inverse value of the standing offset scale.

Get Lowered Additional Offset Location:

This function returns the location value of the lowered addition offset.

Get Lowered Additional Offset Rotation:

This function returns the rotation value of the lowered addition offset.

Get Running Offset Location:

This function returns the location value of the running offset.

Get Running Offset Rotation:

This function returns the rotation value of the running offset.

Can Enter Transition Lowered In:

This function tells us whether we can transition to the Lowered In state.

Can Enter Transition Additive Lowered In To Out:

This function tells us whether we can transition to the Lowered Out state.

Can Enter Transition Additive Leaning In:

This function tells us whether we can transition to the Leaning In state.

Can Enter Transition Additive Leaning In To Out:

This function tells us whether we can transition to the Leaning Out state.

Get Look Offset Rotation:

This returns the Rotator value of the Standing Rotation Lag Look Offset.

Get Standing Offset Location:

This function returns the location value of the standing offset.

Get Standing Offset Rotation:

This function returns the rotation value of the standing offset.

Get Crouching Offset Location:

This function returns the location value of the crouching offset.

Get Crouching Offset Rotation:

This function returns the rotation value of the standing offset.

Get Aiming Offset Location:

This function returns the location value of the aiming offset.

Get Aiming Offset Rotation:

This function returns the location value of the aiming offset.

Update Transition Values:

This function updates all the boolean values that enable fast-path transitions in this blueprint.

Get Play Rate Running Fast:

This function returns the play rate value we are to use for the tactical sprint.

Get Tactical Sprint Offset Location:

This value returns the tactical sprint location offset.

Get Tactical Sprint Offset Rotation:

This value returns the tactical sprint rotation offset.

Get Tactical Sprint Offset Location Inverse:

This value returns the tactical sprint inverse location offset.

Get Tactical Sprint Offset Rotation Inverse:

This value returns the tactical sprint inverse rotation offset.

Private Variables

Velocity:

The owning character’s velocity.

Play Rate Breathing:

This refers to the rate at which the character's breathing animation is played.

Play Rate Walking:

This refers to the rate at which the character's walking animation is played.

Play Rate Running:

This refers to the rate at which the character's running animation is played.

Field Of View Standing:

This refers to the field of view of the character's camera while they are standing.

Field Of View Aiming:

This refers to the field of view of the character's camera while they are aiming.

Field Of View Running:

This refers to the field of view of the character's camera while they are running.

Mapped Speed:

This value ranges from zero to one and represents how fast the owning character is currently moving compared to its maximum speed.

Character:

This refers to the character that the AnimBP is currently on. It refers to the Actor itself, not the component.

Running:

This boolean is true if the owning character is currently running.

Aiming:

This boolean is true if the owning character is currently aiming.

bCrouching:

This boolean is true if the owning character is currently crouching.

Falling:

This boolean is true if the owning character is currently falling.

Aiming Location Lag:

The lag value applied when the character aims. It determines how much the ik_hand_gun bone should sway from side to side.

Aiming Movement Location Lag:

This value determines the amount of sway from side to side of the ik_hand_gun bone when the character aims and moves.

Aiming Rotation Lag:

The lag value applied when the character aims. It determines how much the ik_hand_gun bone should sway from side to side.

Aiming Rotation Lag Rotator:

This is the Rotator version of the Aiming Rotation Lag variable. It is useful because we can use it directly with animation nodes and retain the "fast path" checkmark!

Aiming Movement Rotation Lag:

This value determines the amount of sway from side to side of the ik_hand_gun bone when the character aims and moves.

Aiming Movement Rotation Lag Rotator:

This is the Rotator version of the Aiming Movement Rotation Lag variable. It is useful because we can use it directly with animation nodes and retain the "fast path" checkmark!

Standing Location Lag:

The lag value applied when the character stands around. It determines how much the ik_hand_gun bone should sway from side to side.

Standing Movement Location Lag:

This value determines the amount of sway from side to side of the ik_hand_gun bone when the character moves.

Standing Rotation Lag:

The lag value applied when the character stands around. It determines how much the ik_hand_gun bone should sway from side to side.

Standing Rotation Lag Rotator:

This is the Rotator version of the Standing Rotation Lag variable. It is useful because we can use it directly with animation nodes and retain the "fast path" checkmark!

Standing Movement Rotation Lag:

This value determines the amount of sway from side to side of the ik_hand_gun bone when the character moves.

Standing Movement Rotation Lag Rotator:

This is the Rotator version of the Standing Movement Rotation Lag variable. It is useful because we can use it directly with animation nodes and retain the "fast path" checkmark!

Offset Attachments:

This offset is applied to the ik_hand_gun bone as a result of the attachments equipped on the character's item.

Offset Aiming:

This offset is applied to the "ik_hand_gun" bone while the character is aiming.

Pitch:

This refers to the pitch value of the camera belonging to the owning character.

Turn Rate:

This refers to the rate at which the character is turning, in terms of animation.

Previous Pitch:

This refers to the pitch value of the last frame of the camera owned by the character.

Camera Pitch Acceleration:

This refers to the difference in pitch value of the owning character's camera between the current frame and the previous one.

Character Input Movement:

The owning character’s movement input.

Character Input Movement Smooth:

The owning character’s movement input smoothed.

Character Input Look:

The owning character’s look input.

Pose Idle:

The AnimSequence that represents the pose to be used when the character is idle.

Pose Aim:

The AnimSequence that represents the pose to be used when the character is aiming.

Data Table Animation Poses:

The data table for the equipped item contains all the poses that the character should use while it is equipped.

Equipped Item:

This refers to the item equipped by the owning character. We use this reference to obtain many values from the item.

Settings Scope:

The settings of the scope on the equipped weapon.

Settings Animation:

This variable contains some of the most important settings related to an item's animation settings.

Settings Movement:

This refers to the movement settings of the owning character. We require this information to calculate the play rate for movement animations and adjust them according to the movement speed.

Spring State Standing Lag Location:

This is just another small, random spring state. While these are important, they all serve the same purpose and are just a feature of Unreal Engine, so there is no need for additional information.

Spring State Standing Lag Rotation:

This is just another small, random spring state. While these are important, they all serve the same purpose and are just a feature of Unreal Engine, so there is no need for additional information.

Spring State Aiming Movement Lag Location:

This is just another small, random spring state. While these are important, they all serve the same purpose and are just a feature of Unreal Engine, so there is no need for additional information.

Spring State Aiming Movement Lag Rotation:

This is just another small, random spring state. While these are important, they all serve the same purpose and are just a feature of Unreal Engine, so there is no need for additional information.

Spring State Aiming Lag Location:

This is just another small, random spring state. While these are important, they all serve the same purpose and are just a feature of Unreal Engine, so there is no need for additional information.

Spring State Aiming Lag Rotation:

This is just another small, random spring state. While these are important, they all serve the same purpose and are just a feature of Unreal Engine, so there is no need for additional information.

Spring State Standing Movement Lag Location:

This is just another small, random spring state. While these are important, they all serve the same purpose and are just a feature of Unreal Engine, so there is no need for additional information.

Spring State Standing Movement Lag Rotation:

This is just another small, random spring state. While these are important, they all serve the same purpose and are just a feature of Unreal Engine, so there is no need for additional information.

World Space Location Scope:

This is the World Space location value to which we move the ik_hand_gun bone when aiming.

Component Offset Location Scope:

Location value that we should account for when aiming.

Component Offset Rotation Scope:

Rotation value that we should account for when aiming.

Replace Aiming Pose:

This value is set to true whenever we need to calculate procedurally how to move the equipped item to aim, as opposed to just using the aiming pose.

Blend Space Walking:

This Animation Blendspace is applied when the owning character is walking. It is the source of all our walking animations.

Blend Space Leaning:

This Animation Blendspace is applied when the owning character leans. It causes the equipped item to rotate and appear as if it is leaning.

Sequence Turning:

This animation sequence is played when the character is turning.

Sequence Running:

This animation sequence is played when the character is running. This is the main running loop.

Sequence Breathing Standing:

This animation sequence is played when the character is standing around breathing.

Sequence Breathing Aiming:

This animation sequence is played when the character is aiming breathing.

Sequence Walking Aiming:

This animation sequence is played when the character is aiming and walking.

Aim Blend Time:

This refers to the amount of time it takes to transition from the idling state to the aiming state and back.

Alpha Walking:

This is the alpha value used when playing the walking animation.

Play Rate Walking Aiming:

This refers to the play rate of the walking animation when the owning character is aiming.

Alpha Lag Movement:

This is the alpha value used when playing the movement lag.

Alpha Turning:

Alpha value of the turning animation.

Play Rate Turning:

This refers to the play rate of the turning animation.

Alpha Walking Lean:

Represents the alpha value used for the walking leaning blendspace.

Play Rate Walking Crouching:

This value represents the play rate of the walking animation while the owning character is crouching.

Alpha Breathing:

This is the alpha value used when playing the breathing animation.

Play Rate Aim:

This represents the play rate of the aiming additive transitions. It is calculated every frame.

Aim Offset By Ironsights:

This value will be true if the character's equipped weapon has iron sights but no scope, requiring them to aim through the iron sights.

Socket Name Scope:

This refers to the name of the socket on the equipped weapon's body where the scope is attached. This value is crucial because it allows for proper calculation of automatic aim offsets.

Settings Weapon:

The owning character’s equipped weapon’s settings.

Spring State Recoil Location:

This is just another small, random spring state. While these are important, they all serve the same purpose and are just a feature of Unreal Engine, so there is no need for additional information.

Current Recoil Location:

Current location value to apply to the ik_hand_gun bone to simulate recoil.

Current Recoil Rotation:

Current rotation value to apply to the ik_hand_gun bone to simulate recoil.

Spring State Recoil Rotation:

This is just another small, random spring state. While these are important, they all serve the same purpose and are just a feature of Unreal Engine, so there is no need for additional information.

Shot Count:

This represents the number of consecutive shots that the owning character has fired.

The Shot Count variable is used to track the number of consecutive shots fired by the character. This information can be used to trigger various events, such as reloading the weapon or applying recoil to the viewmodel arms.

In the context of the ABP_LPSP_FP_PCH blueprint, the Shot Count variable is likely used to determine when to play the recoil animation, which simulates the kickback of the weapon after firing.

Overall, the Shot Count variable is an important component of the animation and gameplay systems in the First Person Animation Blueprint.

Leaning Alpha:

The owner's "leaning alpha" determines how far the character is leaning to one side.

Is Leaning:

If this is true, it means that the character who owns this component is currently leaning.

Leaning Switched:

If true, the character who owns this component has either just changed the side they are leaning towards, or has started leaning in general.

Lowered:

If true, the character that owns this blueprint currently has their equipped item lowered.

Alpha Lag Look:

Alpha value used to blend out the ik_hand_gun bone lag that gets applied every frame. We use this to get rid of all lag while using free look, for example.

Standing Rotation Lag Look Offset:

Updates the rotation of the character’s ik_hand_gun bone as the character looks up and down to simulate it shifting. This looks really cool!

Spring State Lag Look Offset:

This is just another small, random spring state. While these are important, they all serve the same purpose and are just a feature of Unreal Engine, so there is no need for additional information.

Spring Data Look Offset Rotation:

Spring interpolation data used to interpolate the Standing Rotation Lag Look Offset value to its target.

Current Look Offset Location:

Updates the location of the character’s ik_hand_gun bone as the character looks up and down to simulate it shifting. This looks really cool!

Spring State Look Offset Location:

This is just another small, random spring state. While these are important, they all serve the same purpose and are just a feature of Unreal Engine, so there is no need for additional information.

Spring Data Look Offset Location:

Spring interpolation data used to interpolate the Current Look Offset Location value to its target.

Target Recoil Location:

Specify the target value to which the current recoil location value will be interpolated.

Target Recoil Rotation:

Specify the target value to which the current recoil rotation value will be interpolated.

Recoil State Weapon:

This refers to the current recoil state of the weapon. It determines the recoil values that should be applied at any given time.

Viewmodel Animated Offsets:

Animation offsets applied to the weapon bone.

Field Of View Viewmodel:

This setting determines the field of view for the first-person view model while idling or running, and so on. However, it does not apply while aiming, as there are specific values for that within scopes.

Settings Grip:

This variable contains all the settings that the grip of the owner's equipped weapon provides.

Using Gamepad:

This variable is set to true when the player controlling the character that is using this animation blueprint is using a gamepad instead of a keyboard and mouse for input.

Sequence Aim In Additive:

The AnimSequence to play in the "Aim In" state.

Sequence Aim Out Additive:

The AnimSequence to play in the "Aim Out" state.

Sequence Pose Lowered:

This animation sequence represents the pose used when the character lowers their equipped item.

Sequence Pose Crouched:

This animation sequence represents the pose used when the character is crouched.

Sequence Run In Additive:

The AnimSequence to play in the "Run In" state.

Sequence Run Out Additive:

The AnimSequence to play in the "Run Out" state.

Sequence Crouch In Additive:

The AnimSequence to play in the "Crouch In" state.

Sequence Crouch Out Additive:

The AnimSequence to play in the "Crouch Out" state.

Sequence Leaning In Additive:

The AnimSequence to play in the "Lean In" state.

Sequence Leaning Out Additive:

The AnimSequence to play in the "Lean Out" state.

Sequence Lowered In Additive:

The AnimSequence to play in the "Lowered In" state.

Sequence Lowered Out Additive:

The AnimSequence to play in the "Lowered Out" state.

Sequence Walking Crouched:

This animation sequence plays when the character is moving while crouching. We use a separate animation for walking while crouching because directional walking doesn't look great for some reason.

Sequence Leaning Poses:

This animation sequence represents the possible leaning poses for the character's equipped item. The item can be in a left-leaning position at 0, a centered position at 0.5, and a right-leaning position at 1.

Lowered In→Out:

Transition value.

Lowered In:

Transition value.

Leaning In→Out:

Transition value.

Leaning In:

Transition value.

Alive:

This variable is set to true whenever the owning character is alive, and false when it dies.

Tactical Sprinting:

This variable is set to true whenever the owning character is tactical sprinting.

Field Of View Tactical Sprinting:

This refers to the field of view of the character's camera while they are tactical sprinting.

Tactical Sprint:

This variable stores a reference to the tactical sprinting animation sequence that we're looking to play for the equipped item.

Uses Normal Tactical Sprint:

This variable is set to whatever value the item has for this. This lets us know if we need to play the pure tactical sprint or if we need to adjust in a super weird way to get the desired result, which is what we do for all of the LPSP weapons, for example.

Unarmed:

We have this variable to determine whether we’re meant to be playing unarmed animations or not. It gets automatically set to true if there’s no equipped weapon.


Last updated

Was this helpful?