Skip to content
Snippets Groups Projects
Commit 002dc5c5 authored by Ehret's avatar Ehret
Browse files

add moving up

parent b0cf4ff6
No related branches found
No related tags found
3 merge requests!22Get changes and fixes from 4.26 into 5 as well,!16update 4.27 branch to newest changes in 4.26,!15Improve desktop test interaction
...@@ -56,6 +56,7 @@ void AVirtualRealityPawn::SetupPlayerInputComponent(UInputComponent* PlayerInput ...@@ -56,6 +56,7 @@ void AVirtualRealityPawn::SetupPlayerInputComponent(UInputComponent* PlayerInput
PlayerInputComponent->BindAxis("MoveForward", this, &AVirtualRealityPawn::OnForward); PlayerInputComponent->BindAxis("MoveForward", this, &AVirtualRealityPawn::OnForward);
PlayerInputComponent->BindAxis("MoveRight", this, &AVirtualRealityPawn::OnRight); PlayerInputComponent->BindAxis("MoveRight", this, &AVirtualRealityPawn::OnRight);
PlayerInputComponent->BindAxis("MoveUp", this, &AVirtualRealityPawn::OnUp);
PlayerInputComponent->BindAxis("TurnRate", this, &AVirtualRealityPawn::OnTurnRate); PlayerInputComponent->BindAxis("TurnRate", this, &AVirtualRealityPawn::OnTurnRate);
PlayerInputComponent->BindAxis("LookUpRate", this, &AVirtualRealityPawn::OnLookUpRate); PlayerInputComponent->BindAxis("LookUpRate", this, &AVirtualRealityPawn::OnLookUpRate);
...@@ -90,6 +91,14 @@ void AVirtualRealityPawn::OnRight_Implementation(float Value) ...@@ -90,6 +91,14 @@ void AVirtualRealityPawn::OnRight_Implementation(float Value)
} }
} }
void AVirtualRealityPawn::OnUp_Implementation(float Value)
{
if (RightHand)
{
AddMovementInput(RightHand->GetUpVector(), Value);
}
}
void AVirtualRealityPawn::OnTurnRate_Implementation(float Rate) void AVirtualRealityPawn::OnTurnRate_Implementation(float Rate)
{ {
/* Turning the user externally will make them sick */ /* Turning the user externally will make them sick */
......
...@@ -40,6 +40,7 @@ protected: ...@@ -40,6 +40,7 @@ protected:
/* Movement */ /* Movement */
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Pawn|Movement") void OnForward(float Value); UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Pawn|Movement") void OnForward(float Value);
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Pawn|Movement") void OnRight(float Value); UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Pawn|Movement") void OnRight(float Value);
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Pawn|Movement") void OnUp(float Value);
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Pawn|Movement") void OnTurnRate(float Rate); UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Pawn|Movement") void OnTurnRate(float Rate);
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Pawn|Movement") void OnLookUpRate(float Rate); UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Pawn|Movement") void OnLookUpRate(float Rate);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment