WBP_LPSP_Crosshair

Introduction

The WBP_LPSP_Crosshair widget blueprint is the parent class for all the crosshairs in the asset. It contains functionality to adjust the crosshair's visibility and size based on the player character's parameters, making it easy to reuse across multiple crosshair widgets.

If you seek to access the WBP_LPSP_Crosshair, it is conveniently located at the following path: InfimaGames/LowPolyShooterPack/Core/Widgets/Crosshairs/WBP_LPSP_Crosshair.

Editable Variables

Default Size:

This option specifies the default size at which the crosshair will remain.

Minimum Size:

This option sets the minimum size that the crosshair can have.

Maximum Size:

This option sets the maximum size that the crosshair can have.

Size Multiplier Falling:

This option sets the value by which the size of the crosshair is multiplied when the character jumps.

Size Multiplier Running:

This option sets the value by which the size of the crosshair is multiplied when the character is running.

Size Multiplier Lowered:

This option sets the value by which the size of the crosshair is multiplied when the character has its weapon lowered.

Size Multiplier Crouching:

This option sets the value by which the size of the crosshair is multiplied when the character is crouching.

Interp Speed Size:

This option sets the interpolation speed for the crosshair size.

Interp Speed Visibility:

This option sets the interpolation speed for the crosshair visibility.

Visibility Running:

Visibility of the crosshair while the character is running.

Visibility Lowered:

Visibility of the crosshair while the character's weapon is lowered.

Visibility Holstered:

Visibility of the crosshair while the character's weapon is holstered.

Visibility Holding Fire:

Visibility of the crosshair while the character's weapon is being fired.

Size Multiplier Third Person:

Value to multiply the size of the crosshair by when the character is in third-person.

Private Variables

Target Size:

This is the size that the crosshair attempts to reach at any given frame.

Current Size:

This is the current size of the crosshair.

Target Visibility:

This is the visibility that the crosshair attempts to reach at any given frame.

Current Visibility:

This is the current visibility of the crosshair.

Panel Widget:

This is a reference to the panel where you can adjust the scale and visibility of the crosshair.

Lowered:

This is true if the player character's equipped item is lowered.

Running:

This value is true when the player character is running.

Aiming:

This value is true when the player character is aiming.

Holster State:

This value represents the player character’s holster state.

Holding Fire:

This value is true when the player character is holding fire.

Third Person:

This value is true when the player character is in third person.

Is Crouching:

This value is true when the player character is crouching.

Is Falling:

This value is true when the player character is falling.

Functions

Set Panel:

This sets the panel that we will increase in size and change the visibility for.

Update Panel:

Updates all properties of the panel.

Update Color:

This function updates the color of the crosshair to match its intended use. For example, it can be colored differently when the player is aiming at an AI.

Get Visibility By Holster State:

This function returns a float value for the player’s current holster state.


Last updated

Was this helpful?