BPSC_LPSP_TP_Looks
Introduction
The Third Person Looks Component Blueprint (BPSC_LPSP_TP_Looks) is an asset blueprint that calculates the correct rotation and look direction for the third-person (or replicated) character's skeletal mesh. This component exists separately from the AnimBP to facilitate replication and to make it more modular and easier to modify.
If you seek to access the BPSC_LPSP_TP_Looks, it is conveniently located at the following path: LowPolyShooterPack/Core/Characters/BPSC_LPSP_TP_Looks.
Functions
Get Spine Added Rotation:
This function returns the rotation value that needs to be added to the character's spine when an actor obstructs the camera's view. By doing so, the character turns towards the obstacle and improves aiming instead of just pointing towards infinity.
Get Look Impact:
This function returns a vector representing the impact point of a line trace from the camera to the environment. It is used to calculate the character's looking direction.
Get Look:
This function returns a vector representing the character's looking direction.
Get Camera Look Spine Added:
This function returns the camera's looking direction, with the addition of any spine rotation due to obstructions.
Set Impact:
This function sets the value of the impact vector.
Get Owner Values:
This function retrieves all the necessary values for the component to work from its owner, using the character interface.
Update Root Yaw Moving:
This function updates the root yaw moving variable, which is used to smooth the character's movement.
Local Update:
This function helps us finalize the final rotation value for the character's yaw. It runs every frame, which is why we're calling it this.
AI Update:
This method takes care of updating the owning character's rotation. The difference from the other method that does this, which is the Local Update one, is that this assumes the owning character is an AI agent and takes measures to adjust for that.
AI Update Rotation For Velocity:
This method updates the AI's rotation to match the direction it is moving toward.
AI Update Look:
This method takes care of updating the agent's appearance to face the target it is chasing.
Editable Variables
Look Interpolation:
The rate at which the character's looking direction interpolates towards the target looking direction.
Procedural Component Interpolation:
This parameter determines the rate at which the procedural actor detection's added spine rotation is interpolated. It is useful for smoothing out only that specific rotation without affecting the normal look.
Maximum Trace Range:
The maximum distance of the line trace used to calculate the character's looking direction.
Private Variables
Root Yaw Moving:
Rotate the skeletal mesh character's yaw based on where they need to look.
Is Moving:
Indicates whether the character is currently moving.
Movement:
The character's movement vector.
Root Yaw Moving Smooth:
The smoothed value of the root yaw moving variable, used to make the character's movement appear more natural and less jarring.
Third Person:
This boolean is true if the owning character is currently in third person.
Look Moving:
This refers to the rotation value for the character's gaze.
Impact:
The impact point of a line trace from the camera to the environment.
Spine Added Rotation:
The rotation value that needs to be added to the character's spine when an actor obstructs the camera's view.
Camera Look Smooth:
The camera's looking direction, without the addition of any spine rotation due to obstructions.
Owner Forward:
The character's forward vector.
Aiming:
Indicates if the character is currently aiming.
Running:
Indicates if the character is currently running.
Holding Fire:
Indicated if the owning character is currently holding fire.
Normalized Yaw Time:
This value is used by the TP Anim BP to set the normalized time of the unarmed aim offset. This basically means where on the horizontal axis we are looking.
Fully Holstered Pitch:
This value is used by the TP Anim BP to set the pitch of the unarmed aim offset.
Unarmed:
This value is true when the character is unarmed.
Last updated
Was this helpful?
