Head Mounted VR 2.0
Loading...
Searching...
No Matches
AVR_Player Class Reference

Player class. More...

#include <VR_Player.h>

+ Inheritance diagram for AVR_Player:

Public Member Functions

 AVR_Player ()
 
virtual void OnConstruction (const FTransform &Transform) override
 
virtual void BeginPlay () override
 
virtual void EndPlay (EEndPlayReason::Type EndPlayReason) override
 
virtual void PostInitializeComponents ()
 
virtual void Tick (float DeltaTime) override
 
virtual void SetupPlayerInputComponent (class UInputComponent *PlayerInputComponent) override
 
void PlayerMeshTick (float DeltaTime)
 
bool CheckHandPtrExist (bool Hand)
 
void OnResetVR ()
 Resets HMD orientation and position in VR.
 
void GrabActor_Left ()
 Grip button pressed (Left Motion controller)
 
void ReleaseActor_Left ()
 Grip button released (Left Motion controller)
 
void GrabActor_Right ()
 Grip button pressed (Right Motion controller)
 
void ReleaseActor_Right ()
 Grip button released (Right Motion controller)
 
void GrabActor_Server (bool Hand)
 
bool GrabActor_Server_Validate (bool Hand)
 
void GrabActor_Server_Implementation (bool Hand)
 
void GrabActor_Multycast (bool Hand)
 
bool GrabActor_Multycast_Validate (bool Hand)
 
void GrabActor_Multycast_Implementation (bool Hand)
 
void ReleaseActor_Server (bool Hand)
 
bool ReleaseActor_Server_Validate (bool Hand)
 
void ReleaseActor_Server_Implementation (bool Hand)
 
void ReleaseActor_Multycast (bool Hand)
 
bool ReleaseActor_Multycast_Validate (bool Hand)
 
void ReleaseActor_Multycast_Implementation (bool Hand)
 
void Index_Press_Left ()
 Trigger button pressed (Left Motion controller)
 
void ReleaseIndex_Press_Left ()
 Trigger button released (Left Motion controller)
 
void Index_Press_Server (bool Hand, bool Pressed)
 
bool Index_Press_Server_Validate (bool Hand, bool Pressed)
 
void Index_Press_Server_Implementation (bool Hand, bool Pressed)
 
void Index_Press_Multycast (bool Hand, bool Pressed)
 
bool Index_Press_Multycast_Validate (bool Hand, bool Pressed)
 
void Index_Press_Multycast_Implementation (bool Hand, bool Pressed)
 
void Index_Touch_Left ()
 Trigger button touched , used for Oculus (Left Motion controller)
 
void ReleaseIndex_Touch_Left ()
 Trigger button untouched , used for Oculus (Left Motion controller)
 
void Index_Touch_Right ()
 Trigger button touched , used for Oculus (Right Motion controller)
 
void ReleaseIndex_Touch_Right ()
 Trigger button untouched , used for Oculus (Right Motion controller)
 
void Index_Press_Right ()
 Trigger button pressed (Right Motion controller)
 
void ReleaseIndex_Press_Right ()
 Trigger button released (Right Motion controller)
 
void Thumb_Press_Left ()
 Trigger button pressed (Right Motion controller)
 
void ReleaseThumb_Press_Left ()
 Trigger button pressed (Right Motion controller)
 
void Thumb_Press_Right ()
 Used for Oculus HMD Indetify when player toches upper buttons.
 
void ReleaseThumb_Press_Right ()
 Used for Oculus HMD Indetify when player untoches upper buttons.
 
void Thumb_Press_Server (bool Hand, bool Pressed)
 
bool Thumb_Press_Server_Validate (bool Hand, bool Pressed)
 
void Thumb_Press_Server_Implementation (bool Hand, bool Pressed)
 
void Thumb_Press_Multycast (bool Hand, bool Pressed)
 
bool Thumb_Press_Multycast_Validate (bool Hand, bool Pressed)
 
void Thumb_Press_Multycast_Implementation (bool Hand, bool Pressed)
 
void TeleportPressed_Left ()
 Trigger button pressed (Left Motion controller)
 
void TeleportReleased_Left ()
 Trigger button released (Left Motion controller)
 
void A_Press_Server (bool Hand, bool Pressed)
 
bool A_Press_Server_Validate (bool Hand, bool Pressed)
 
void A_Press_Server_Implementation (bool Hand, bool Pressed)
 
void A_Press_Multycast (bool Hand, bool Pressed)
 
bool A_Press_Multycast_Validate (bool Hand, bool Pressed)
 
void A_Press_Multycast_Implementation (bool Hand, bool Pressed)
 
void A_Press_R ()
 Rightg A Button beeing pressed.
 
void A_Released_R ()
 Rightg A Button beeing released.
 
void A_Press_L ()
 Left A Button beeing pressed.
 
void A_Released_L ()
 Left A Button beeing released.
 
void B_Press_Server (bool Hand, bool Pressed)
 
bool B_Press_Server_Validate (bool Hand, bool Pressed)
 
void B_Press_Server_Implementation (bool Hand, bool Pressed)
 
void B_Press_Multycast (bool Hand, bool Pressed)
 
bool B_Press_Multycast_Validate (bool Hand, bool Pressed)
 
void B_Press_Multycast_Implementation (bool Hand, bool Pressed)
 
void B_Press_R ()
 Rightg b Button beeing pressed.
 
void B_Released_R ()
 Rightg b Button beeing released.
 
void B_Press_L ()
 Left b Button beeing pressed.
 
void B_Released_L ()
 Left b Button beeing released.
 
void R_Trackpad_Touch ()
 Rightg Trackpad beeing Touch.
 
void R_Trackpad_UnTouch ()
 Rightg Trackpad beeing Untouch.
 
void ThumbsticRightXAxis (const FInputActionValue &Value)
 Player rotation on right thubmstick.
 
void ThumbsticRightYAxis (const FInputActionValue &Value)
 Updates camera pitch in Developer Mode and crouch in VR.
 
void ThumbsticLeftXAxis (float Value)
 Player rotation on right thubmstick.
 
void ThumbsticLeftYAxis (float Value)
 Updates camera pitch in Developer Mode and crouch in VR.
 
void UpdateMovment (const FInputActionValue &Value)
 Moves player in direction.
 
void MoveForward (float Value)
 Used for thumbstick bind.
 
void MoveRight (float Value)
 Used for thumbstick bind.
 
void RightTriggerAxis (const FInputActionValue &Value)
 
void LeftTriggerAxis (const FInputActionValue &Value)
 
void RightGripAxis (const FInputActionValue &Value)
 
void LeftGripAxis (const FInputActionValue &Value)
 
void ThumbTrackpadAxis (float Value)
 Used for Weapons hammer(Pistols)
 
void E_Press ()
 E Button press(Works only in Non-VR)
 
void E_Released ()
 E Button released(Works only in Non-VR)
 
void E_Press_Server (bool Released)
 
bool E_Press_Server_Validate (bool Released)
 
void E_Press_Server_Implementation (bool Released)
 
void E_Press_Multycast (bool Released)
 
bool E_Press_Multycast_Validate (bool Released)
 
void E_Press_Multycast_Implementation (bool Released)
 
void Execute_E_Press (bool Released)
 
void TurnWidgetDev ()
 
void AddHeight ()
 
void RemoveHeight ()
 
void CheckUpdatePlayerPostion ()
 
void CheckCollisionSeperation ()
 
void CheckClimbing ()
 
FVector GetCurrentClimbLocation ()
 
void RealignCollison ()
 
void UpdateRoomScalePosition ()
 Moves GetCapsuleComponent() to the camera by adding world offset.
 
void UpdatePlayerPostion (FVector CurrentCameraPosition, FRotator DeviceRotation)
 Updates Actor location to the GetCapsuleComponent() location.
 
void UpdateCollisionHeight (FVector DevicePosition)
 Updates GetCapsuleComponent() Height.
 
void SetMaxSeperationDist (float NewDist)
 Sets MaxSeperationDist(float)
 
void CameraFade ()
 Fades camera if overlaps objects.
 
void UpdateVariables ()
 Updates variables , atm only LastCollisionLocation variable.
 
void UpdateFidelityLevel ()
 
void ChangeFidelity (uint8 Level)
 
FRotator GetRotationFromInput (float UpAxis, float RightAxis, class AVR_Hands *MotionController)
 Returns rotation for the teleport.
 
void ExecuteTeleportation (class AVR_Hands *MotionController)
 Handle Teleportation.
 
void TeleportActor (class AVR_Hands *MotionController)
 Teleport Player.
 
FORCEINLINE UCapsuleComponent * GetCollision () const
 
FORCEINLINE float GetPlayerMaxHeight () const
 
FORCEINLINE float GetPlayerCurrentHeight () const
 
float GetTargetMS (float DisplayHRZ)
 
FVector GetCameraLocation ()
 
FVector GetForwardVector ()
 
FVector GetComponentDirection (class USceneComponent *Component)
 
FORCEINLINE class UMotionControllerComponent * GetLeftMotionController () const
 
FORCEINLINE class UMotionControllerComponent * GetRightMotionController () const
 
void OnCameraCollisionOverlapBegin (class UPrimitiveComponent *OverlappedComp, class AActor *OtherActor, class UPrimitiveComponent *OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult &SweepResult)
 On camera GetCapsuleComponent() Overlap begin.
 
void OnCameraCollisionOverlapEnd (class UPrimitiveComponent *OverlappedComp, class AActor *OtherActor, class UPrimitiveComponent *OtherComp, int32 OtherBodyIndex)
 On camera GetCapsuleComponent() Overlap end.
 
virtual void OnAmmoBoxOverlap (class UPrimitiveComponent *OverlappedComp, class AActor *OtherActor, class UPrimitiveComponent *OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult &SweepResult)
 On Ammo Box Overlap begin.
 
virtual void OnAmmoBoxOverlapEnd (class UPrimitiveComponent *OverlappedComp, class AActor *OtherActor, class UPrimitiveComponent *OtherComp, int32 OtherBodyIndex)
 On Ammo Box Overlap Overlap end.
 
void OnCollisionOverlapBegin (class UPrimitiveComponent *OverlappedComp, class AActor *OtherActor, class UPrimitiveComponent *OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult &SweepResult)
 On GetCapsuleComponent() Box Overlap begin.
 
void OnCollisionOverlapEnd (class UPrimitiveComponent *OverlappedComp, class AActor *OtherActor, class UPrimitiveComponent *OtherComp, int32 OtherBodyIndex)
 On GetCapsuleComponent() Box Overlap Overlap end.
 
int GetAmmo (uint8 &Caliber)
 Returns ammo of choosen caliber.
 
virtual void CheckPutInInventory ()
 Check if object is in the inventory box.
 
void CheckStepDistance ()
 Check when to play step sound.
 
void CheckForStandableOBJ ()
 Check if player has pickup standable object.
 
void UpdateClimbingStatus ()
 
void PlayFootstepsSound (bool bHasFallen)
 Plays footsteps sound.
 
void EnableMovment (bool enable)
 
void CallPauseMenu ()
 
FORCEINLINE bool GetPauseMenuOpened () const
 
FORCEINLINE bool GetMenuStatus () const
 
FORCEINLINE AVR_HandsGetRightHand () const
 
FORCEINLINE AVR_HandsGetLeftHand () const
 
FORCEINLINE int GetHealth () const
 
FORCEINLINE int GetMaxHealth () const
 
FORCEINLINE bool GetInLoadingRoom () const
 
FORCEINLINE TArray< int > GetAmmoArray () const
 
FORCEINLINE bool IsInLoadingRoom () const
 
FORCEINLINE FTransform GetLeftHandTransform () const
 
FORCEINLINE FTransform GetRightHandTransform () const
 
FORCEINLINE FTransform GetAvatarWorldTransform () const
 
FORCEINLINE USkeletalMeshComponent * GetAvatarMesh () const
 
FORCEINLINE FTransform GetCameraTransform () const
 
FORCEINLINE FVector GetCameraDirection () const
 
FORCEINLINE float GetPlayerSpeed () const
 
FORCEINLINE float GetPlayerDirectionValue () const
 
FORCEINLINE EVRAvatarMode GetAvatarMode () const
 
FORCEINLINE FName GetVRHelmetName () const
 
FORCEINLINE bool IsSprinting () const
 
FORCEINLINE bool CanSptint () const
 
FORCEINLINE bool HasStamina () const
 
FORCEINLINE float GetStamina () const
 
float GetDistanceMoved (FVector CurrentCameraPosition)
 
float GetDistanceRotation (FRotator CurrentCameraRotation)
 
FORCEINLINE FVector GetFloorPoint () const
 
float GetMovementDirection (FTransform CurrentCameraWorldTransform)
 
float PlayVoiceLine (USoundWave *SoundWave)
 Play voice line.
 
void EnableCameraFadeOnObj (bool Enable)
 
void EnableLoadingRoom (bool Enable)
 
void TeleportPlayerPawn (FVector DestLocation, FRotator DestRotation)
 
void ReciveDamage (int Damage)
 
void Heal (int HealthToAdd)
 
void SetInventory (TArray< TSubclassOf< class AActor > > InventoryActors, TArray< UStaticMesh * > InventoryMeshes, TArray< int > NewAmmo)
 
void SetUserMode (bool VRMode)
 
void SendUserMode_Server (APawn *Player, bool VRMode)
 
bool SendUserMode_Server_Validate (APawn *Player, bool VRMode)
 
void SendUserMode_Server_Implementation (APawn *Player, bool VRMode)
 
void SendUserMode_Multicast (APawn *Player, bool VRMode)
 
bool SendUserMode_Multicast_Validate (APawn *Player, bool VRMode)
 
void SendUserMode_Multicast_Implementation (APawn *Player, bool VRMode)
 

Public Attributes

FVector LastCameraPosition
 
bool bWeaponInInventory
 
TSubclassOf< class AActor > WeaponInInventory
 

Protected Attributes

USceneComponent * RootScene
 Default scene root.
 
USceneComponent * FloorOrigin
 Players camera scene root.
 
USceneComponent * CameraOrigin
 
UVR_CameraComponentVRCamera
 Players camera.
 
class USkeletalMeshComponent * PlayerMesh
 Players GetCapsuleComponent()
 
USphereComponent * CameraCollision
 Players camera Collision.
 
UBoxComponent * AmmoBox
 Ammo box in which player can put ammo.
 
UAudioComponent * FootstepsAudioComponent
 
UAudioComponent * VoiceAudioComponent
 
UVR_MotionControllerComponentLeftMotionController
 
UVR_MotionControllerComponentRightMotionController
 
UChildActorComponent * LeftHandComponent
 
UChildActorComponent * RightHandComponent
 
UPhysicsHandleComponent * NonVRPhysicsHandleComponent
 
AVR_HandsLeftHand
 Left Motion Controller.
 
AVR_HandsRightHand
 Right Motion Controller ///.
 
USoundCue * Footsteps_SoundCue
 
USoundCue * Voice_SoundCue
 
class UInputMappingContext * DefaultMappingContext
 
class UInputAction * IA_ThumbsticRightXAxis
 
class UInputAction * IA_ThumbsticRightYAxis
 
class UInputAction * IA_Move
 
class UInputAction * IA_IndexCurl_Right
 
class UInputAction * IA_IndexCurl_Left
 
class UInputAction * IA_GrabRight
 
class UInputAction * IA_GrabLeft
 
class UInputAction * IA_BPressRight
 
class UInputAction * IA_BPressLeft
 
class UInputAction * IA_APressRight
 
class UInputAction * IA_APressLeft
 
class UInputAction * IA_Hand_ThumbStickPress_Right
 
class UInputAction * IA_Hand_ThumbStickPress_Left
 
class UInputAction * IA_EPress
 
class UInputAction * IA_Dev_Debug_MinusHeight
 
class UInputAction * IA_Dev_Debug_PlusHeight
 
class UInputAction * IA_Dev_Debug_WidgetInteraction
 

Detailed Description

Player class.

See also
AVR_Hands
Note
Movement was written from scratch

Constructor & Destructor Documentation

◆ AVR_Player()

AVR_Player::AVR_Player ( )

Member Function Documentation

◆ A_Press_L()

void AVR_Player::A_Press_L ( )

Left A Button beeing pressed.

◆ A_Press_Multycast()

void AVR_Player::A_Press_Multycast ( bool Hand,
bool Pressed )

◆ A_Press_Multycast_Implementation()

void AVR_Player::A_Press_Multycast_Implementation ( bool Hand,
bool Pressed )

◆ A_Press_Multycast_Validate()

bool AVR_Player::A_Press_Multycast_Validate ( bool Hand,
bool Pressed )

◆ A_Press_R()

void AVR_Player::A_Press_R ( )

Rightg A Button beeing pressed.

◆ A_Press_Server()

void AVR_Player::A_Press_Server ( bool Hand,
bool Pressed )

◆ A_Press_Server_Implementation()

void AVR_Player::A_Press_Server_Implementation ( bool Hand,
bool Pressed )

◆ A_Press_Server_Validate()

bool AVR_Player::A_Press_Server_Validate ( bool Hand,
bool Pressed )

◆ A_Released_L()

void AVR_Player::A_Released_L ( )

Left A Button beeing released.

◆ A_Released_R()

void AVR_Player::A_Released_R ( )

Rightg A Button beeing released.

◆ AddHeight()

void AVR_Player::AddHeight ( )

◆ B_Press_L()

void AVR_Player::B_Press_L ( )

Left b Button beeing pressed.

◆ B_Press_Multycast()

void AVR_Player::B_Press_Multycast ( bool Hand,
bool Pressed )

◆ B_Press_Multycast_Implementation()

void AVR_Player::B_Press_Multycast_Implementation ( bool Hand,
bool Pressed )

◆ B_Press_Multycast_Validate()

bool AVR_Player::B_Press_Multycast_Validate ( bool Hand,
bool Pressed )

◆ B_Press_R()

void AVR_Player::B_Press_R ( )

Rightg b Button beeing pressed.

◆ B_Press_Server()

void AVR_Player::B_Press_Server ( bool Hand,
bool Pressed )

◆ B_Press_Server_Implementation()

void AVR_Player::B_Press_Server_Implementation ( bool Hand,
bool Pressed )

◆ B_Press_Server_Validate()

bool AVR_Player::B_Press_Server_Validate ( bool Hand,
bool Pressed )

◆ B_Released_L()

void AVR_Player::B_Released_L ( )

Left b Button beeing released.

◆ B_Released_R()

void AVR_Player::B_Released_R ( )

Rightg b Button beeing released.

◆ BeginPlay()

void AVR_Player::BeginPlay ( )
overridevirtual

◆ CallPauseMenu()

void AVR_Player::CallPauseMenu ( )

◆ CameraFade()

void AVR_Player::CameraFade ( )

Fades camera if overlaps objects.

◆ CanSptint()

FORCEINLINE bool AVR_Player::CanSptint ( ) const
inline

◆ ChangeFidelity()

void AVR_Player::ChangeFidelity ( uint8 Level)

◆ CheckClimbing()

void AVR_Player::CheckClimbing ( )

◆ CheckCollisionSeperation()

void AVR_Player::CheckCollisionSeperation ( )

Checks if GetCapsuleComponent() is hit by something static. If hit , then GetCapsuleComponent() doesn't update the position and checks the distance betwen camera and GetCapsuleComponent(). If distance too big -> move camera back to the GetCapsuleComponent().

See also
RealignCollison()

◆ CheckForStandableOBJ()

void AVR_Player::CheckForStandableOBJ ( )

Check if player has pickup standable object.

◆ CheckHandPtrExist()

bool AVR_Player::CheckHandPtrExist ( bool Hand)

◆ CheckPutInInventory()

void AVR_Player::CheckPutInInventory ( )
virtual

Check if object is in the inventory box.

◆ CheckStepDistance()

void AVR_Player::CheckStepDistance ( )

Check when to play step sound.

◆ CheckUpdatePlayerPostion()

void AVR_Player::CheckUpdatePlayerPostion ( )

Checks if possiable to update GetCapsuleComponent() position.

See also
UpdatePlayerPostion(FVector CurrentCameraPosition, FRotator DeviceRotation) UpdateRoomScalePosition()

◆ E_Press()

void AVR_Player::E_Press ( )

E Button press(Works only in Non-VR)

◆ E_Press_Multycast()

void AVR_Player::E_Press_Multycast ( bool Released)

◆ E_Press_Multycast_Implementation()

void AVR_Player::E_Press_Multycast_Implementation ( bool Released)

◆ E_Press_Multycast_Validate()

bool AVR_Player::E_Press_Multycast_Validate ( bool Released)

◆ E_Press_Server()

void AVR_Player::E_Press_Server ( bool Released)

◆ E_Press_Server_Implementation()

void AVR_Player::E_Press_Server_Implementation ( bool Released)

◆ E_Press_Server_Validate()

bool AVR_Player::E_Press_Server_Validate ( bool Released)

◆ E_Released()

void AVR_Player::E_Released ( )

E Button released(Works only in Non-VR)

◆ EnableCameraFadeOnObj()

void AVR_Player::EnableCameraFadeOnObj ( bool Enable)

◆ EnableLoadingRoom()

void AVR_Player::EnableLoadingRoom ( bool Enable)

◆ EnableMovment()

void AVR_Player::EnableMovment ( bool enable)

◆ EndPlay()

void AVR_Player::EndPlay ( EEndPlayReason::Type EndPlayReason)
overridevirtual

◆ Execute_E_Press()

void AVR_Player::Execute_E_Press ( bool Released)

◆ ExecuteTeleportation()

void AVR_Player::ExecuteTeleportation ( class AVR_Hands * MotionController)

Handle Teleportation.

Parameters
MotionControllerCurrent MotionController , where teleport button was pressed

◆ GetAmmo()

int AVR_Player::GetAmmo ( uint8 & Caliber)

Returns ammo of choosen caliber.

◆ GetAmmoArray()

FORCEINLINE TArray< int > AVR_Player::GetAmmoArray ( ) const
inline

◆ GetAvatarMesh()

FORCEINLINE USkeletalMeshComponent * AVR_Player::GetAvatarMesh ( ) const
inline

◆ GetAvatarMode()

FORCEINLINE EVRAvatarMode AVR_Player::GetAvatarMode ( ) const
inline

◆ GetAvatarWorldTransform()

FORCEINLINE FTransform AVR_Player::GetAvatarWorldTransform ( ) const
inline

◆ GetCameraDirection()

FORCEINLINE FVector AVR_Player::GetCameraDirection ( ) const
inline

◆ GetCameraLocation()

FVector AVR_Player::GetCameraLocation ( )

◆ GetCameraTransform()

FORCEINLINE FTransform AVR_Player::GetCameraTransform ( ) const
inline

◆ GetCollision()

FORCEINLINE UCapsuleComponent * AVR_Player::GetCollision ( ) const
inline

◆ GetComponentDirection()

FVector AVR_Player::GetComponentDirection ( class USceneComponent * Component)

◆ GetCurrentClimbLocation()

FVector AVR_Player::GetCurrentClimbLocation ( )

◆ GetDistanceMoved()

float AVR_Player::GetDistanceMoved ( FVector CurrentCameraPosition)

◆ GetDistanceRotation()

float AVR_Player::GetDistanceRotation ( FRotator CurrentCameraRotation)

◆ GetFloorPoint()

FORCEINLINE FVector AVR_Player::GetFloorPoint ( ) const
inline

◆ GetForwardVector()

FVector AVR_Player::GetForwardVector ( )

◆ GetHealth()

FORCEINLINE int AVR_Player::GetHealth ( ) const
inline

◆ GetInLoadingRoom()

FORCEINLINE bool AVR_Player::GetInLoadingRoom ( ) const
inline

◆ GetLeftHand()

FORCEINLINE AVR_Hands * AVR_Player::GetLeftHand ( ) const
inline

◆ GetLeftHandTransform()

FORCEINLINE FTransform AVR_Player::GetLeftHandTransform ( ) const
inline

◆ GetLeftMotionController()

FORCEINLINE class UMotionControllerComponent * AVR_Player::GetLeftMotionController ( ) const
inline

◆ GetMaxHealth()

FORCEINLINE int AVR_Player::GetMaxHealth ( ) const
inline

◆ GetMenuStatus()

FORCEINLINE bool AVR_Player::GetMenuStatus ( ) const
inline

◆ GetMovementDirection()

float AVR_Player::GetMovementDirection ( FTransform CurrentCameraWorldTransform)

◆ GetPauseMenuOpened()

FORCEINLINE bool AVR_Player::GetPauseMenuOpened ( ) const
inline

◆ GetPlayerCurrentHeight()

FORCEINLINE float AVR_Player::GetPlayerCurrentHeight ( ) const
inline

◆ GetPlayerDirectionValue()

FORCEINLINE float AVR_Player::GetPlayerDirectionValue ( ) const
inline

◆ GetPlayerMaxHeight()

FORCEINLINE float AVR_Player::GetPlayerMaxHeight ( ) const
inline

◆ GetPlayerSpeed()

FORCEINLINE float AVR_Player::GetPlayerSpeed ( ) const
inline

◆ GetRightHand()

FORCEINLINE AVR_Hands * AVR_Player::GetRightHand ( ) const
inline

◆ GetRightHandTransform()

FORCEINLINE FTransform AVR_Player::GetRightHandTransform ( ) const
inline

◆ GetRightMotionController()

FORCEINLINE class UMotionControllerComponent * AVR_Player::GetRightMotionController ( ) const
inline

◆ GetRotationFromInput()

FRotator AVR_Player::GetRotationFromInput ( float UpAxis,
float RightAxis,
class AVR_Hands * MotionController )

Returns rotation for the teleport.

Parameters
UpAxis
RightAxis
MotionControllercurrent MotionController
Returns
Returns rotation for the teleport

◆ GetStamina()

FORCEINLINE float AVR_Player::GetStamina ( ) const
inline

◆ GetTargetMS()

float AVR_Player::GetTargetMS ( float DisplayHRZ)

◆ GetVRHelmetName()

FORCEINLINE FName AVR_Player::GetVRHelmetName ( ) const
inline

◆ GrabActor_Left()

void AVR_Player::GrabActor_Left ( )

Grip button pressed (Left Motion controller)

◆ GrabActor_Multycast()

void AVR_Player::GrabActor_Multycast ( bool Hand)

◆ GrabActor_Multycast_Implementation()

void AVR_Player::GrabActor_Multycast_Implementation ( bool Hand)

◆ GrabActor_Multycast_Validate()

bool AVR_Player::GrabActor_Multycast_Validate ( bool Hand)

◆ GrabActor_Right()

void AVR_Player::GrabActor_Right ( )

Grip button pressed (Right Motion controller)

◆ GrabActor_Server()

void AVR_Player::GrabActor_Server ( bool Hand)

◆ GrabActor_Server_Implementation()

void AVR_Player::GrabActor_Server_Implementation ( bool Hand)

◆ GrabActor_Server_Validate()

bool AVR_Player::GrabActor_Server_Validate ( bool Hand)

◆ HasStamina()

FORCEINLINE bool AVR_Player::HasStamina ( ) const
inline

◆ Heal()

void AVR_Player::Heal ( int HealthToAdd)

◆ Index_Press_Left()

void AVR_Player::Index_Press_Left ( )

Trigger button pressed (Left Motion controller)

◆ Index_Press_Multycast()

void AVR_Player::Index_Press_Multycast ( bool Hand,
bool Pressed )

◆ Index_Press_Multycast_Implementation()

void AVR_Player::Index_Press_Multycast_Implementation ( bool Hand,
bool Pressed )

◆ Index_Press_Multycast_Validate()

bool AVR_Player::Index_Press_Multycast_Validate ( bool Hand,
bool Pressed )

◆ Index_Press_Right()

void AVR_Player::Index_Press_Right ( )

Trigger button pressed (Right Motion controller)

◆ Index_Press_Server()

void AVR_Player::Index_Press_Server ( bool Hand,
bool Pressed )

◆ Index_Press_Server_Implementation()

void AVR_Player::Index_Press_Server_Implementation ( bool Hand,
bool Pressed )

◆ Index_Press_Server_Validate()

bool AVR_Player::Index_Press_Server_Validate ( bool Hand,
bool Pressed )

◆ Index_Touch_Left()

void AVR_Player::Index_Touch_Left ( )

Trigger button touched , used for Oculus (Left Motion controller)

◆ Index_Touch_Right()

void AVR_Player::Index_Touch_Right ( )

Trigger button touched , used for Oculus (Right Motion controller)

◆ IsInLoadingRoom()

FORCEINLINE bool AVR_Player::IsInLoadingRoom ( ) const
inline

◆ IsSprinting()

FORCEINLINE bool AVR_Player::IsSprinting ( ) const
inline

◆ LeftGripAxis()

void AVR_Player::LeftGripAxis ( const FInputActionValue & Value)

◆ LeftTriggerAxis()

void AVR_Player::LeftTriggerAxis ( const FInputActionValue & Value)
Parameters
Value
Note
do not delete

◆ MoveForward()

void AVR_Player::MoveForward ( float Value)

Used for thumbstick bind.

Parameters
Value
Note
do not delete

◆ MoveRight()

void AVR_Player::MoveRight ( float Value)

Used for thumbstick bind.

Parameters
Value
Note
do not delete

◆ OnAmmoBoxOverlap()

void AVR_Player::OnAmmoBoxOverlap ( class UPrimitiveComponent * OverlappedComp,
class AActor * OtherActor,
class UPrimitiveComponent * OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult & SweepResult )
virtual

On Ammo Box Overlap begin.

◆ OnAmmoBoxOverlapEnd()

void AVR_Player::OnAmmoBoxOverlapEnd ( class UPrimitiveComponent * OverlappedComp,
class AActor * OtherActor,
class UPrimitiveComponent * OtherComp,
int32 OtherBodyIndex )
virtual

On Ammo Box Overlap Overlap end.

◆ OnCameraCollisionOverlapBegin()

void AVR_Player::OnCameraCollisionOverlapBegin ( class UPrimitiveComponent * OverlappedComp,
class AActor * OtherActor,
class UPrimitiveComponent * OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult & SweepResult )

On camera GetCapsuleComponent() Overlap begin.

◆ OnCameraCollisionOverlapEnd()

void AVR_Player::OnCameraCollisionOverlapEnd ( class UPrimitiveComponent * OverlappedComp,
class AActor * OtherActor,
class UPrimitiveComponent * OtherComp,
int32 OtherBodyIndex )

On camera GetCapsuleComponent() Overlap end.

◆ OnCollisionOverlapBegin()

void AVR_Player::OnCollisionOverlapBegin ( class UPrimitiveComponent * OverlappedComp,
class AActor * OtherActor,
class UPrimitiveComponent * OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult & SweepResult )

On GetCapsuleComponent() Box Overlap begin.

◆ OnCollisionOverlapEnd()

void AVR_Player::OnCollisionOverlapEnd ( class UPrimitiveComponent * OverlappedComp,
class AActor * OtherActor,
class UPrimitiveComponent * OtherComp,
int32 OtherBodyIndex )

On GetCapsuleComponent() Box Overlap Overlap end.

◆ OnConstruction()

void AVR_Player::OnConstruction ( const FTransform & Transform)
overridevirtual

◆ OnResetVR()

void AVR_Player::OnResetVR ( )

Resets HMD orientation and position in VR.

◆ PlayerMeshTick()

void AVR_Player::PlayerMeshTick ( float DeltaTime)

◆ PlayFootstepsSound()

void AVR_Player::PlayFootstepsSound ( bool bHasFallen)

Plays footsteps sound.

Parameters
bHasFallenTrue if player has fallen, false if player is walking

◆ PlayVoiceLine()

float AVR_Player::PlayVoiceLine ( USoundWave * SoundWave)

Play voice line.

◆ PostInitializeComponents()

void AVR_Player::PostInitializeComponents ( )
virtual

◆ R_Trackpad_Touch()

void AVR_Player::R_Trackpad_Touch ( )

Rightg Trackpad beeing Touch.

◆ R_Trackpad_UnTouch()

void AVR_Player::R_Trackpad_UnTouch ( )

Rightg Trackpad beeing Untouch.

◆ RealignCollison()

void AVR_Player::RealignCollison ( )

Moves camera back to the GetCapsuleComponent() position

See also
UpdatePlayerPostion(FVector CurrentCameraPosition, FRotator DeviceRotation) UpdateRoomScalePosition()

◆ ReciveDamage()

void AVR_Player::ReciveDamage ( int Damage)

◆ ReleaseActor_Left()

void AVR_Player::ReleaseActor_Left ( )

Grip button released (Left Motion controller)

◆ ReleaseActor_Multycast()

void AVR_Player::ReleaseActor_Multycast ( bool Hand)

◆ ReleaseActor_Multycast_Implementation()

void AVR_Player::ReleaseActor_Multycast_Implementation ( bool Hand)

◆ ReleaseActor_Multycast_Validate()

bool AVR_Player::ReleaseActor_Multycast_Validate ( bool Hand)

◆ ReleaseActor_Right()

void AVR_Player::ReleaseActor_Right ( )

Grip button released (Right Motion controller)

◆ ReleaseActor_Server()

void AVR_Player::ReleaseActor_Server ( bool Hand)

◆ ReleaseActor_Server_Implementation()

void AVR_Player::ReleaseActor_Server_Implementation ( bool Hand)

◆ ReleaseActor_Server_Validate()

bool AVR_Player::ReleaseActor_Server_Validate ( bool Hand)

◆ ReleaseIndex_Press_Left()

void AVR_Player::ReleaseIndex_Press_Left ( )

Trigger button released (Left Motion controller)

◆ ReleaseIndex_Press_Right()

void AVR_Player::ReleaseIndex_Press_Right ( )

Trigger button released (Right Motion controller)

◆ ReleaseIndex_Touch_Left()

void AVR_Player::ReleaseIndex_Touch_Left ( )

Trigger button untouched , used for Oculus (Left Motion controller)

◆ ReleaseIndex_Touch_Right()

void AVR_Player::ReleaseIndex_Touch_Right ( )

Trigger button untouched , used for Oculus (Right Motion controller)

◆ ReleaseThumb_Press_Left()

void AVR_Player::ReleaseThumb_Press_Left ( )

Trigger button pressed (Right Motion controller)

◆ ReleaseThumb_Press_Right()

void AVR_Player::ReleaseThumb_Press_Right ( )

Used for Oculus HMD Indetify when player untoches upper buttons.

◆ RemoveHeight()

void AVR_Player::RemoveHeight ( )

◆ RightGripAxis()

void AVR_Player::RightGripAxis ( const FInputActionValue & Value)

◆ RightTriggerAxis()

void AVR_Player::RightTriggerAxis ( const FInputActionValue & Value)
Parameters
Value
Note
do not delete

◆ SendUserMode_Multicast()

void AVR_Player::SendUserMode_Multicast ( APawn * Player,
bool VRMode )

◆ SendUserMode_Multicast_Implementation()

void AVR_Player::SendUserMode_Multicast_Implementation ( APawn * Player,
bool VRMode )

◆ SendUserMode_Multicast_Validate()

bool AVR_Player::SendUserMode_Multicast_Validate ( APawn * Player,
bool VRMode )

◆ SendUserMode_Server()

void AVR_Player::SendUserMode_Server ( APawn * Player,
bool VRMode )

◆ SendUserMode_Server_Implementation()

void AVR_Player::SendUserMode_Server_Implementation ( APawn * Player,
bool VRMode )

◆ SendUserMode_Server_Validate()

bool AVR_Player::SendUserMode_Server_Validate ( APawn * Player,
bool VRMode )

◆ SetInventory()

void AVR_Player::SetInventory ( TArray< TSubclassOf< class AActor > > InventoryActors,
TArray< UStaticMesh * > InventoryMeshes,
TArray< int > NewAmmo )

◆ SetMaxSeperationDist()

void AVR_Player::SetMaxSeperationDist ( float NewDist)

Sets MaxSeperationDist(float)

Parameters
NewDistNew distance

CheckCollisionSeperation()

◆ SetupPlayerInputComponent()

void AVR_Player::SetupPlayerInputComponent ( class UInputComponent * PlayerInputComponent)
overridevirtual

◆ SetUserMode()

void AVR_Player::SetUserMode ( bool VRMode)

◆ TeleportActor()

void AVR_Player::TeleportActor ( class AVR_Hands * MotionController)

Teleport Player.

Parameters
MotionControllerMotionController used for telortaion , gets rotation params from it

◆ TeleportPlayerPawn()

void AVR_Player::TeleportPlayerPawn ( FVector DestLocation,
FRotator DestRotation )

◆ TeleportPressed_Left()

void AVR_Player::TeleportPressed_Left ( )

Trigger button pressed (Left Motion controller)

◆ TeleportReleased_Left()

void AVR_Player::TeleportReleased_Left ( )

Trigger button released (Left Motion controller)

◆ Thumb_Press_Left()

void AVR_Player::Thumb_Press_Left ( )

Trigger button pressed (Right Motion controller)

◆ Thumb_Press_Multycast()

void AVR_Player::Thumb_Press_Multycast ( bool Hand,
bool Pressed )

◆ Thumb_Press_Multycast_Implementation()

void AVR_Player::Thumb_Press_Multycast_Implementation ( bool Hand,
bool Pressed )

◆ Thumb_Press_Multycast_Validate()

bool AVR_Player::Thumb_Press_Multycast_Validate ( bool Hand,
bool Pressed )

◆ Thumb_Press_Right()

void AVR_Player::Thumb_Press_Right ( )

Used for Oculus HMD Indetify when player toches upper buttons.

◆ Thumb_Press_Server()

void AVR_Player::Thumb_Press_Server ( bool Hand,
bool Pressed )

◆ Thumb_Press_Server_Implementation()

void AVR_Player::Thumb_Press_Server_Implementation ( bool Hand,
bool Pressed )

◆ Thumb_Press_Server_Validate()

bool AVR_Player::Thumb_Press_Server_Validate ( bool Hand,
bool Pressed )

◆ ThumbsticLeftXAxis()

void AVR_Player::ThumbsticLeftXAxis ( float Value)

Player rotation on right thubmstick.

Parameters
RateRotation rate

◆ ThumbsticLeftYAxis()

void AVR_Player::ThumbsticLeftYAxis ( float Value)

Updates camera pitch in Developer Mode and crouch in VR.

Parameters
Rate
Note
Developer Mode only

◆ ThumbsticRightXAxis()

void AVR_Player::ThumbsticRightXAxis ( const FInputActionValue & Value)

Player rotation on right thubmstick.

Parameters
RateRotation rate

◆ ThumbsticRightYAxis()

void AVR_Player::ThumbsticRightYAxis ( const FInputActionValue & Value)

Updates camera pitch in Developer Mode and crouch in VR.

Parameters
Rate
Note
Developer Mode only

◆ ThumbTrackpadAxis()

void AVR_Player::ThumbTrackpadAxis ( float Value)

Used for Weapons hammer(Pistols)

Parameters
Value
Note
do not delete

◆ Tick()

void AVR_Player::Tick ( float DeltaTime)
overridevirtual

◆ TurnWidgetDev()

void AVR_Player::TurnWidgetDev ( )

Developer Mode , Widget Interaction on/off by pressing "Z" button

Note
do not delete

◆ UpdateClimbingStatus()

void AVR_Player::UpdateClimbingStatus ( )

◆ UpdateCollisionHeight()

void AVR_Player::UpdateCollisionHeight ( FVector DevicePosition)

Updates GetCapsuleComponent() Height.

Parameters
DevicePositionHMD position

◆ UpdateFidelityLevel()

void AVR_Player::UpdateFidelityLevel ( )

◆ UpdateMovment()

void AVR_Player::UpdateMovment ( const FInputActionValue & Value)

Moves player in direction.

Parameters
Value_YThumbstick Y value
Value_XThumbstick x value
DevicePositionCurrent HMD position
DeviceRotationCurrent HMD rotation

◆ UpdatePlayerPostion()

void AVR_Player::UpdatePlayerPostion ( FVector CurrentCameraPosition,
FRotator DeviceRotation )

Updates Actor location to the GetCapsuleComponent() location.

Parameters
CurrentCameraPositionis a Current Camera Position
DeviceRotationis current rotation of the HMD

◆ UpdateRoomScalePosition()

void AVR_Player::UpdateRoomScalePosition ( )

Moves GetCapsuleComponent() to the camera by adding world offset.

◆ UpdateVariables()

void AVR_Player::UpdateVariables ( )

Updates variables , atm only LastCollisionLocation variable.

Member Data Documentation

◆ AmmoBox

UBoxComponent* AVR_Player::AmmoBox
protected

Ammo box in which player can put ammo.

◆ bWeaponInInventory

bool AVR_Player::bWeaponInInventory

◆ CameraCollision

USphereComponent* AVR_Player::CameraCollision
protected

Players camera Collision.

◆ CameraOrigin

USceneComponent* AVR_Player::CameraOrigin
protected

◆ DefaultMappingContext

class UInputMappingContext* AVR_Player::DefaultMappingContext
protected

MappingContext

◆ FloorOrigin

USceneComponent* AVR_Player::FloorOrigin
protected

Players camera scene root.

◆ Footsteps_SoundCue

USoundCue* AVR_Player::Footsteps_SoundCue
protected

◆ FootstepsAudioComponent

UAudioComponent* AVR_Player::FootstepsAudioComponent
protected

◆ IA_APressLeft

class UInputAction* AVR_Player::IA_APressLeft
protected

◆ IA_APressRight

class UInputAction* AVR_Player::IA_APressRight
protected

◆ IA_BPressLeft

class UInputAction* AVR_Player::IA_BPressLeft
protected

◆ IA_BPressRight

class UInputAction* AVR_Player::IA_BPressRight
protected

◆ IA_Dev_Debug_MinusHeight

class UInputAction* AVR_Player::IA_Dev_Debug_MinusHeight
protected

◆ IA_Dev_Debug_PlusHeight

class UInputAction* AVR_Player::IA_Dev_Debug_PlusHeight
protected

◆ IA_Dev_Debug_WidgetInteraction

class UInputAction* AVR_Player::IA_Dev_Debug_WidgetInteraction
protected

◆ IA_EPress

class UInputAction* AVR_Player::IA_EPress
protected

◆ IA_GrabLeft

class UInputAction* AVR_Player::IA_GrabLeft
protected

◆ IA_GrabRight

class UInputAction* AVR_Player::IA_GrabRight
protected

◆ IA_Hand_ThumbStickPress_Left

class UInputAction* AVR_Player::IA_Hand_ThumbStickPress_Left
protected

◆ IA_Hand_ThumbStickPress_Right

class UInputAction* AVR_Player::IA_Hand_ThumbStickPress_Right
protected

◆ IA_IndexCurl_Left

class UInputAction* AVR_Player::IA_IndexCurl_Left
protected

◆ IA_IndexCurl_Right

class UInputAction* AVR_Player::IA_IndexCurl_Right
protected

◆ IA_Move

class UInputAction* AVR_Player::IA_Move
protected

◆ IA_ThumbsticRightXAxis

class UInputAction* AVR_Player::IA_ThumbsticRightXAxis
protected

◆ IA_ThumbsticRightYAxis

class UInputAction* AVR_Player::IA_ThumbsticRightYAxis
protected

◆ LastCameraPosition

FVector AVR_Player::LastCameraPosition

◆ LeftHand

AVR_Hands* AVR_Player::LeftHand
protected

Left Motion Controller.

◆ LeftHandComponent

UChildActorComponent* AVR_Player::LeftHandComponent
protected

◆ LeftMotionController

UVR_MotionControllerComponent* AVR_Player::LeftMotionController
protected

◆ NonVRPhysicsHandleComponent

UPhysicsHandleComponent* AVR_Player::NonVRPhysicsHandleComponent
protected

◆ PlayerMesh

class USkeletalMeshComponent* AVR_Player::PlayerMesh
protected

Players GetCapsuleComponent()

◆ RightHand

AVR_Hands* AVR_Player::RightHand
protected

Right Motion Controller ///.

◆ RightHandComponent

UChildActorComponent* AVR_Player::RightHandComponent
protected

◆ RightMotionController

UVR_MotionControllerComponent* AVR_Player::RightMotionController
protected

◆ RootScene

USceneComponent* AVR_Player::RootScene
protected

Default scene root.

◆ Voice_SoundCue

USoundCue* AVR_Player::Voice_SoundCue
protected

◆ VoiceAudioComponent

UAudioComponent* AVR_Player::VoiceAudioComponent
protected

◆ VRCamera

UVR_CameraComponent* AVR_Player::VRCamera
protected

Players camera.

◆ WeaponInInventory

TSubclassOf<class AActor> AVR_Player::WeaponInInventory

The documentation for this class was generated from the following files: