Skip to content
Snippets Groups Projects
Commit c4e230d6 authored by Jonathan Wendt's avatar Jonathan Wendt
Browse files

Add VR Navigation Mode to disable Flystick flying

parent dc8713ff
Branches
Tags
No related merge requests found
......@@ -38,13 +38,19 @@ AVirtualRealityPawn::AVirtualRealityPawn(const FObjectInitializer& ObjectInitial
}
void AVirtualRealityPawn::OnForward_Implementation (float Value)
{
if (NavigationMode == EVRNavigationModes::NAV_MODE_FLY)
{
AddMovementInput(Forward->GetForwardVector(), Value);
}
}
void AVirtualRealityPawn::OnRight_Implementation(float Value)
{
if (NavigationMode == EVRNavigationModes::NAV_MODE_FLY)
{
AddMovementInput(Forward->GetRightVector(), Value);
}
}
void AVirtualRealityPawn::OnTurnRate_Implementation (float Rate )
{
if (IDisplayCluster::Get().GetOperationMode() == EDisplayClusterOperationMode::Cluster)
......
......@@ -10,6 +10,12 @@
#include "VirtualRealityPawn.generated.h"
UENUM(BlueprintType)
enum class EVRNavigationModes : uint8{
NAV_MODE_NONE UMETA(DisplayName = "Navigation Mode None"),
NAV_MODE_FLY UMETA(DisplayName = "Navigation Mode Fly")
};
UCLASS()
class DISPLAYCLUSTEREXTENSIONS_API AVirtualRealityPawn : public ADisplayClusterPawn
{
......@@ -23,6 +29,8 @@ public:
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Pawn") void OnFire (bool Pressed);
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Pawn") void OnAction (bool Pressed, int32 Index);
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pawn") EVRNavigationModes NavigationMode = EVRNavigationModes::NAV_MODE_FLY;
protected:
DECLARE_DELEGATE_OneParam (FFireDelegate , bool);
DECLARE_DELEGATE_TwoParams(FActionDelegate, bool, int32);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment