diff --git a/EndlessVendetta/Content/FirstPerson/Input/Actions/IA_Interact.uasset b/EndlessVendetta/Content/FirstPerson/Input/Actions/IA_Interact.uasset index ef199a6b..2efaadb5 100644 --- a/EndlessVendetta/Content/FirstPerson/Input/Actions/IA_Interact.uasset +++ b/EndlessVendetta/Content/FirstPerson/Input/Actions/IA_Interact.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:56e5fddda3b901b313fde855f6615339551cedbc06032712cda370c384bab101 -size 1370 +oid sha256:b268e7a4657dfa38394c03659fdcc2c5fe693ba5c88cf3b24782dfbd8a40d528 +size 1720 diff --git a/EndlessVendetta/Content/Ships/BP_SpaceShip.uasset b/EndlessVendetta/Content/Ships/BP_SpaceShip.uasset index 92ea4e0b..1607d88d 100644 --- a/EndlessVendetta/Content/Ships/BP_SpaceShip.uasset +++ b/EndlessVendetta/Content/Ships/BP_SpaceShip.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b44f822f5c6482c3351c981ff00819af201f59f73a9f8a4a84e2eb6ba0bd9d72 -size 59373 +oid sha256:2ac2dac3ac9ae79c98b2298590cb09115146ff1b7238d29200ed5c2eb63d6597 +size 57233 diff --git a/EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset b/EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset index 8b69d027..c2a34afc 100644 --- a/EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset +++ b/EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ff1716523dc0720848b23ad639cd44f353944bafd08e55c49c642f18296a39da -size 14831 +oid sha256:4c0ecf0ac0702cc2bd355ec050232a61c49e10f102448efbeb735a51824adef6 +size 14948 diff --git a/EndlessVendetta/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset b/EndlessVendetta/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset index c5c3b84e..066bc519 100644 --- a/EndlessVendetta/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset +++ b/EndlessVendetta/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4a60a29ad596546d481e43dfb8698842a78cc07f4a4b1000fa397cfba4e72331 -size 158206 +oid sha256:377425bb15b3107e87d7eb1c10673d59758fa7a27311a65bc613f28bef0c044b +size 43745 diff --git a/EndlessVendetta/EndlessVendetta.sln.DotSettings.user b/EndlessVendetta/EndlessVendetta.sln.DotSettings.user new file mode 100644 index 00000000..2b08f3a1 --- /dev/null +++ b/EndlessVendetta/EndlessVendetta.sln.DotSettings.user @@ -0,0 +1,2 @@ + + C:\Users\Rafal\AppData\Local\JetBrains\Rider2023.3\resharper-host\temp\Rider\vAny\CoverageData\_EndlessVendetta.-1253833435\Snapshot\snapshot.utdcvr \ No newline at end of file diff --git a/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.cpp b/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.cpp index 53ef1ced..6f4d5e86 100644 --- a/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.cpp +++ b/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.cpp @@ -215,12 +215,13 @@ void AEndlessVendettaCharacter::SetupPlayerInputComponent(class UInputComponent* //Interacting EnhancedInputComponent->BindAction(InteractAction, ETriggerEvent::Started, this, &AEndlessVendettaCharacter::Interact); + EnhancedInputComponent->BindAction(InteractAction, ETriggerEvent::Triggered, this, &AEndlessVendettaCharacter::HoldInteract); } - UE_LOG(LogTemp, Warning, TEXT("Setup player input on EV character")); } void AEndlessVendettaCharacter::Interact() { + UE_LOG(LogTemp, Warning, TEXT("Interaction Has Been Called")); if (InPauseMenu) return; if (bIsInDialogue) { @@ -740,12 +741,25 @@ void AEndlessVendettaCharacter::UpdateInventorySize(int Cols, int Rows) } } +void AEndlessVendettaCharacter::HoldInteract() +{ + if (PlayerOnShip || InPauseMenu) return; + FTransform TakeOffTransform = GetActorTransform(); + FVector NewLoc = TakeOffTransform.GetLocation(); + NewLoc.Z += BikeRideHeight; + TakeOffTransform.SetLocation(NewLoc); + EnterShip(TakeOffTransform); +} + + void AEndlessVendettaCharacter::EnterShip(FTransform TakeoffLoc) { PlayFadeScreen(); if (IsValid(PrimaryWeapon)) EquipPrimary(); if (IsValid(SecondaryWeapon)) EquipSecondary(); - SpaceShip = GetWorld()->SpawnActor(SpaceShipClass, TakeoffLoc.GetLocation(), TakeoffLoc.Rotator()); + FActorSpawnParameters SpawnParams; + SpawnParams.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn; + SpaceShip = GetWorld()->SpawnActor(SpaceShipClass, TakeoffLoc.GetLocation(), TakeoffLoc.Rotator(), SpawnParams); PlayerOnShip = true; } diff --git a/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.h b/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.h index b2f6e45d..25e1f9ae 100644 --- a/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.h +++ b/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.h @@ -270,13 +270,16 @@ public: bool bIsCurrentlyHoldingWeapon; - // Space Ship + // Hover Bike private: - UPROPERTY(EditDefaultsOnly, Category = "Space Ship") + UPROPERTY(EditDefaultsOnly, Category = "Hover Bike") + float BikeRideHeight = 50; + UPROPERTY(EditDefaultsOnly, Category = "Hover Bike") TSubclassOf SpaceShipClass; ASpaceShip* SpaceShip; protected: bool PlayerOnShip = false; + void HoldInteract(); public: void ExitShip(FTransform ExitLoc); void EnterShip(FTransform TakeoffLoc);