BPSC_LPSP_CH_Viewmode_Handler

Introduction

The Viewmode Handler Actor Component (BPAC_IG_Viewmodel_Helper) is responsible for all tasks related to updating a character's view from first-person to third-person, and potentially any other modes that could be added.

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

Functions

Get Inventory Attach Component Pure:

This function returns the component to which we're supposed to attach the Owning Pawn's Inventory component at any given time. This changes based on the Viewmode, which is why we have it here.

Get Viewmode Pure:

This function returns the current value of Viewmode.

Get Previous Viewmode Pure:

This function returns the current value of Prev Viewmode.

Get Owning Pawn Pure:

This function returns a reference to the owning pawn, whether it is the variable itself or, if it is null, it will find the actual reference and set it to the variable.

Get Inventory Pure:

This function returns a reference to the owning pawn's inventory component, whether it is the variable itself or, if it is null, it will find the actual reference and set it to the variable.

Get Animated Viewmodel Arms:

The "Get Animated Viewmodel Arms" function returns a reference to the owning pawn's animated viewmodel arms component, whether it is the variable itself or, if it is null, it will find the actual reference and set it to the variable.

Get Animated Full-Body Character:

The "Get Animated Full-Body Character" function returns a reference to the owning pawn's animated full-body character component, whether it is the variable itself or, if it is null, it will find the actual reference and set it to the variable.

Update Owner Spring Arm Settings:

This function takes care of updating the pawn owner's Spring Arm settings. It is very specific to the way we handle third-person, so it is likely not necessary for every game. However, it works quite well like this, so it's all good.

Is Owner AI:

This function checks whether the owner of the component is an AI or not. It is used to determine the appropriate actions and responses based on whether the owner is player-controlled or AI-controlled.

Editable Variables

Starting Viewmode:

This variable determines the view mode that we're going to start the game with. It will be applied to the owner of this component.

Private Variables

Viewmode:

This variable represents the current view mode being used by this component's owner.

Prev Viewmode:

This variable represents the previous view mode used by this component's owner.

Owning Pawn:

This variable holds a reference to the pawn that owns this component.


Last updated

Was this helpful?