Bugfix Player Maintains Velocity from Ship when Landing

This commit is contained in:
Rafal Swierczek 2024-02-04 13:58:25 +00:00
parent 412152bebd
commit a2e80dcdf6
4 changed files with 16 additions and 9 deletions

View File

@ -9,11 +9,10 @@
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="dfa3053d-1d51-4dad-9270-4c17e086f627" name="Changes" comment=""> <list default="true" id="dfa3053d-1d51-4dad-9270-4c17e086f627" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.idea/.idea.EndlessVendetta/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.EndlessVendetta/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/.idea.EndlessVendetta/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.EndlessVendetta/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Content/Levels/TempOpenWorld.umap" beforeDir="false" afterPath="$PROJECT_DIR$/Content/Levels/TempOpenWorld.umap" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Content/StarterContent/Architecture/Floor_400x400.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/StarterContent/Architecture/Floor_400x400.uasset" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/EndlessVendettaCharacter.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/EndlessVendettaCharacter.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/MainSaveGameClass.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/MainSaveGameClass.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.h" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -130,6 +129,7 @@
<updated>1706900339638</updated> <updated>1706900339638</updated>
<workItem from="1706900342753" duration="2652000" /> <workItem from="1706900342753" duration="2652000" />
<workItem from="1706972179014" duration="11096000" /> <workItem from="1706972179014" duration="11096000" />
<workItem from="1707046474738" duration="2553000" />
</task> </task>
<servers /> <servers />
</component> </component>

Binary file not shown.

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:466c723985861da68aa9ea25153ae0068833dd6159178b0c033d0f814a8cd6f5 oid sha256:54d78cbc2e7ef625432ee7b2da07e34a29fc46f230ab4ba5105f1efd2c9c7ca3
size 14831 size 14831

View File

@ -734,8 +734,15 @@ void AEndlessVendettaCharacter::EnterShip(FTransform TakeoffLoc)
void AEndlessVendettaCharacter::ExitShip(FTransform ExitLoc) void AEndlessVendettaCharacter::ExitShip(FTransform ExitLoc)
{ {
PlayFadeScreen(); PlayFadeScreen();
SetActorLocation(ExitLoc.GetLocation()); APlayerController* PC = Cast<APlayerController>(GetController());
PC->SetIgnoreMoveInput(true);
PC->SetIgnoreLookInput(true);
SpaceShip->GetCharacterMovement()->Velocity = FVector(0, 0, 0);
GetCharacterMovement()->Velocity = FVector(0, 0, 0);
SetActorLocation(ExitLoc.GetLocation(), false, nullptr, ETeleportType::ResetPhysics);
GetController()->SetControlRotation(ExitLoc.Rotator()); GetController()->SetControlRotation(ExitLoc.Rotator());
SpaceShip->Destroy(); SpaceShip->Destroy();
PlayerOnShip = false; PlayerOnShip = false;
PC->SetIgnoreMoveInput(false);
PC->SetIgnoreLookInput(false);
} }