Made some improvemoent for strafing pivot and remove computing of pivot and wasPivot

This commit is contained in:
LongLy 2024-12-02 10:47:44 -07:00
parent 4cbb6ddd5d
commit fab6586e0c
10 changed files with 2 additions and 22 deletions

View File

@ -1,11 +1,11 @@
/Engine=C:/Program Files/Epic Games/UE_5.5/Engine/Shaders
/ShaderAutogen=H:/Projects/OLS/Intermediate/ShaderAutogen
/NFORDenoise=C:/Program Files/Epic Games/UE_5.5/Engine/Plugins/Experimental/NFORDenoise/Shaders
/Plugin/FX/Niagara=C:/Program Files/Epic Games/UE_5.5/Engine/Plugins/FX/Niagara/Shaders
/Plugin/ExrReaderShaders=C:/Program Files/Epic Games/UE_5.5/Engine/Plugins/Media/ImgMedia/Shaders
/Plugin/WmfMedia=C:/Program Files/Epic Games/UE_5.5/Engine/Plugins/Media/WmfMedia/Shaders
/NNEDenoiserShaders=C:/Program Files/Epic Games/UE_5.5/Engine/Plugins/NNE/NNEDenoiser/Shaders
/Plugin/GLTFExporter=C:/Program Files/Epic Games/UE_5.5/Engine/Plugins/Enterprise/GLTFExporter/Shaders
/Plugin/FX/Niagara=C:/Program Files/Epic Games/UE_5.5/Engine/Plugins/FX/Niagara/Shaders
/NFORDenoise=C:/Program Files/Epic Games/UE_5.5/Engine/Plugins/Experimental/NFORDenoise/Shaders
/Plugin/ComputeFramework=C:/Program Files/Epic Games/UE_5.5/Engine/Plugins/Runtime/ComputeFramework/Shaders
/Plugin/Runtime/HairStrands=C:/Program Files/Epic Games/UE_5.5/Engine/Plugins/Runtime/HairStrands/Shaders
/Plugin/HoldoutComposite=C:/Program Files/Epic Games/UE_5.5/Engine/Plugins/Experimental/Compositing/HoldoutComposite/Shaders

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 52 KiB

View File

@ -300,17 +300,6 @@ void UOLSBaseLayerAnimInstance::NativeThreadSafeUpdateAccelerationData(const flo
OwningPawnAcceleration.GetSafeNormal2D(), WorldRotation);
}
const float desiredMaxSpeed = DesiredMaxSpeed * InputAmount;
if (LocalAcceleration2D.GetSafeNormal2D().Dot(LocalVelocity2D.GetSafeNormal2D()) < -0.2f && WorldVelocity.Size2D() >
desiredMaxSpeed * 0.5f && HasAcceleration() && !bIsPivoting)
{
bIsPivoting = true;
}
else if (LocalAcceleration2D.GetSafeNormal2D().Dot(LocalVelocity2D.GetSafeNormal2D()) >= 0.f || !HasAcceleration() && bIsPivoting)
{
bIsPivoting = false;
}
// Call custom logic on blueprint.
BlueprintThreadSafeUpdateAccelerationData(deltaSeconds);
}
@ -361,9 +350,6 @@ void UOLSBaseLayerAnimInstance::NativeThreadSafeUpdateCharacterStateData(const f
{
TimeSinceFiredWeapon = (bGameplayTag_IsFiring) ? 0.f : TimeSinceFiredWeapon + deltaSeconds;
}
const bool wasPivotingLastUpdate = bWasPivoting;
bWasPivoting = (bIsPivoting != wasPivotingLastUpdate);
// In air state.
{

View File

@ -250,12 +250,6 @@ protected:
UPROPERTY(BlueprintReadOnly, Category = "ThreadSafe|AccelerationData")
uint8 bHasAcceleration : 1;
UPROPERTY(BlueprintReadOnly, Category = "ThreadSafe|AccelerationData")
uint8 bIsPivoting : 1;
UPROPERTY(BlueprintReadOnly, Category = "ThreadSafe|AccelerationData")
uint8 bWasPivoting : 1;
UPROPERTY(BlueprintReadOnly, Category = "ThreadSafe|AccelerationData")
FVector PivotDirection2D = FVector::ZeroVector;