Skip to content
Snippets Groups Projects
Commit 0d01fbd1 authored by Ali Can Demiralp's avatar Ali Can Demiralp
Browse files

Merge branch 'develop'

parents 90cdcfe7 c7f73d16
No related branches found
No related tags found
No related merge requests found
...@@ -71,11 +71,11 @@ void ADisplayClusterPawnCAVE::OnLookUpRate_Implementation(flo ...@@ -71,11 +71,11 @@ void ADisplayClusterPawnCAVE::OnLookUpRate_Implementation(flo
AddControllerPitchInput(BaseTurnRate * Rate * GetWorld()->GetDeltaSeconds() * CustomTimeDilation); AddControllerPitchInput(BaseTurnRate * Rate * GetWorld()->GetDeltaSeconds() * CustomTimeDilation);
} }
} }
void ADisplayClusterPawnCAVE::OnFire_Implementation () void ADisplayClusterPawnCAVE::OnFire_Implementation (bool Pressed)
{ {
} }
void ADisplayClusterPawnCAVE::OnAction_Implementation (int32 Index) void ADisplayClusterPawnCAVE::OnAction_Implementation (bool Pressed, int32 Index)
{ {
} }
...@@ -110,7 +110,7 @@ void ADisplayClusterPawnCAVE::Tick (flo ...@@ -110,7 +110,7 @@ void ADisplayClusterPawnCAVE::Tick (flo
const float Mult = GetWorld()->GetWorldSettings()->WorldToMeters / 100.f; const float Mult = GetWorld()->GetWorldSettings()->WorldToMeters / 100.f;
SetActorScale3D(FVector(Mult, Mult, Mult)); SetActorScale3D(FVector(Mult, Mult, Mult));
if (!Flystick) if (!Flystick && IDisplayCluster::Get().GetOperationMode() == EDisplayClusterOperationMode::Cluster)
Flystick = IDisplayCluster::Get().GetGameMgr()->GetNodeById(TEXT("flystick")); // There MUST be an scene node called flystick in the config. Flystick = IDisplayCluster::Get().GetGameMgr()->GetNodeById(TEXT("flystick")); // There MUST be an scene node called flystick in the config.
} }
void ADisplayClusterPawnCAVE::BeginDestroy () void ADisplayClusterPawnCAVE::BeginDestroy ()
...@@ -128,12 +128,20 @@ void ADisplayClusterPawnCAVE::SetupPlayerInputComponent (UIn ...@@ -128,12 +128,20 @@ void ADisplayClusterPawnCAVE::SetupPlayerInputComponent (UIn
PlayerInputComponent->BindAxis ("MoveRight" , this, &ADisplayClusterPawnCAVE::OnRight ); PlayerInputComponent->BindAxis ("MoveRight" , this, &ADisplayClusterPawnCAVE::OnRight );
PlayerInputComponent->BindAxis ("TurnRate" , this, &ADisplayClusterPawnCAVE::OnTurnRate ); PlayerInputComponent->BindAxis ("TurnRate" , this, &ADisplayClusterPawnCAVE::OnTurnRate );
PlayerInputComponent->BindAxis ("LookUpRate" , this, &ADisplayClusterPawnCAVE::OnLookUpRate ); PlayerInputComponent->BindAxis ("LookUpRate" , this, &ADisplayClusterPawnCAVE::OnLookUpRate );
PlayerInputComponent->BindAction ("Fire" , IE_Pressed , this, &ADisplayClusterPawnCAVE::OnFire );
PlayerInputComponent->BindAction<FButtonDelegate>("Action1" , IE_Pressed , this, &ADisplayClusterPawnCAVE::OnAction , 1); PlayerInputComponent->BindAction<FFireDelegate> ("Fire" , IE_Pressed , this, &ADisplayClusterPawnCAVE::OnFire , true );
PlayerInputComponent->BindAction<FButtonDelegate>("Action2" , IE_Pressed , this, &ADisplayClusterPawnCAVE::OnAction , 2); PlayerInputComponent->BindAction<FActionDelegate>("Action1" , IE_Pressed , this, &ADisplayClusterPawnCAVE::OnAction , true , 1);
PlayerInputComponent->BindAction<FButtonDelegate>("Action3" , IE_Pressed , this, &ADisplayClusterPawnCAVE::OnAction , 3); PlayerInputComponent->BindAction<FActionDelegate>("Action2" , IE_Pressed , this, &ADisplayClusterPawnCAVE::OnAction , true , 2);
PlayerInputComponent->BindAction<FButtonDelegate>("Action4" , IE_Pressed , this, &ADisplayClusterPawnCAVE::OnAction , 4); PlayerInputComponent->BindAction<FActionDelegate>("Action3" , IE_Pressed , this, &ADisplayClusterPawnCAVE::OnAction , true , 3);
PlayerInputComponent->BindAction<FButtonDelegate>("Action5" , IE_Pressed , this, &ADisplayClusterPawnCAVE::OnAction , 5); PlayerInputComponent->BindAction<FActionDelegate>("Action4" , IE_Pressed , this, &ADisplayClusterPawnCAVE::OnAction , true , 4);
PlayerInputComponent->BindAction<FActionDelegate>("Action5" , IE_Pressed , this, &ADisplayClusterPawnCAVE::OnAction , true , 5);
PlayerInputComponent->BindAction<FFireDelegate> ("Fire" , IE_Released, this, &ADisplayClusterPawnCAVE::OnFire , false );
PlayerInputComponent->BindAction<FActionDelegate>("Action1" , IE_Released, this, &ADisplayClusterPawnCAVE::OnAction , false, 1);
PlayerInputComponent->BindAction<FActionDelegate>("Action2" , IE_Released, this, &ADisplayClusterPawnCAVE::OnAction , false, 2);
PlayerInputComponent->BindAction<FActionDelegate>("Action3" , IE_Released, this, &ADisplayClusterPawnCAVE::OnAction , false, 3);
PlayerInputComponent->BindAction<FActionDelegate>("Action4" , IE_Released, this, &ADisplayClusterPawnCAVE::OnAction , false, 4);
PlayerInputComponent->BindAction<FActionDelegate>("Action5" , IE_Released, this, &ADisplayClusterPawnCAVE::OnAction , false, 5);
} }
} }
UPawnMovementComponent* ADisplayClusterPawnCAVE::GetMovementComponent () const UPawnMovementComponent* ADisplayClusterPawnCAVE::GetMovementComponent () const
......
...@@ -19,14 +19,15 @@ public: ...@@ -19,14 +19,15 @@ public:
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Pawn") void OnRight (float Value ); UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Pawn") void OnRight (float Value );
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Pawn") void OnTurnRate (float Rate ); UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Pawn") void OnTurnRate (float Rate );
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Pawn") void OnLookUpRate(float Rate ); UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Pawn") void OnLookUpRate(float Rate );
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Pawn") void OnFire (); UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Pawn") void OnFire (bool Pressed);
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Pawn") void OnAction (int32 Index); UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Pawn") void OnAction (bool Pressed, int32 Index);
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pawn") float BaseTurnRate = 45.0f ; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pawn") float BaseTurnRate = 45.0f ;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pawn") UDisplayClusterSceneComponent* Flystick = nullptr; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pawn") UDisplayClusterSceneComponent* Flystick = nullptr;
protected: protected:
DECLARE_DELEGATE_OneParam(FButtonDelegate, int32); DECLARE_DELEGATE_OneParam (FFireDelegate , bool);
DECLARE_DELEGATE_TwoParams(FActionDelegate, bool, int32);
virtual void BeginPlay () override; virtual void BeginPlay () override;
virtual void Tick (float DeltaSeconds ) override; virtual void Tick (float DeltaSeconds ) override;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment